mquery
An HTTP API and MCP server for mining language corpora using Manatee-Open engine.
Install / Use
claude mcp add czcorpus -- npx -y github:czcorpus/mqueryIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
Development & EngineeringSupported Platforms
Our assessment of mquery
mquery scores 76/100 on our quality scale, 699th of 1,620 Development & Engineering skills we index (top 44%).
Its MCP Server is 6.9 KB long, well organised into 13 sections with 3 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated today, so mquery is actively maintained.
- Our last check on 2026-09-16 found the source still online.
- It is released under GPL-3.0, a copyleft license: you can use it, but modified versions you distribute must carry the same license.
- Its trust signals score 87/100, with 2 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-25. Automated pattern scan on 2026-09-25. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
mquery compared with similar skills
All 4 of these similar skills score higher than mquery; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| mquery (this skill)by czcorpus | 76 | 3 | today | MCP Server |
| Agent-Reachby Panniantong | 100 | 85.3k | 9d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 73.7k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 73.2k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.1k | today | CLAUDE.md |
Frequently asked questions
- How do I install mquery?
- Run
claude mcp add czcorpus -- npx -y github:czcorpus/mquery. The install tabs above show the steps for each supported agent. - Which AI agents does mquery work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is mquery safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is GPL-3.0-licensed and scores 87/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is mquery still maintained?
- The repository was last updated today, so mquery is actively maintained.
Skill content
View source on GitHubMQuery
MQuery is an HTTP API server for mining language corpora using Manatee-Open engine. Unlike other Manatee-based solutions, MQuery uses more fine-tuned C bindings without relying on SWIG, and naturally leverages a worker queue architecture for efficient query processing and scalability. It also ships an MCP server (see MCP Support) so LLM agents can query corpora directly.
Running with Docker (Easiest Method)
The simplest way to run MQuery is using Docker Compose, which automatically sets up the server, worker, and Redis:
Prerequisites
Quick Start
-
Clone the repository:
git clone https://github.com/czcorpus/mquery.git cd mquery -
Create a Docker configuration file
conf-docker.jsonbased onconf.sample.json:cp conf.sample.json conf-docker.json -
Edit
conf-docker.jsonto match your setup:- Set
listenAddressto0.0.0.0(to accept connections from outside the container) - Set
listenPortto8989 - Set Redis host to
redis(the service name in docker-compose.yml) - Configure your corpora paths:
registryDir:/var/lib/manatee/registrysplitCorporaDir:/var/lib/manatee/split
- Set
-
Place your corpus data and registry files in directories that will be mounted:
- The docker-compose setup creates volumes for corpus data at
/var/lib/manatee - You can modify the volume mounts in
docker-compose.ymlto point to your existing corpus directories
- The docker-compose setup creates volumes for corpus data at
-
Start the services:
docker-compose up -d -
Access the API at
http://localhost:8989
Docker Architecture
The Docker Compose setup includes:
- mquery-server: HTTP API server (port 8989)
- mquery-worker: Background worker for processing corpus queries
- redis: Redis database for job queuing and results caching
Managing the Services
- View logs:
docker-compose logs -f - Stop services:
docker-compose down - Rebuild after code changes:
docker-compose up -d --build
Manual Installation
If you prefer to install MQuery manually without Docker:
Requirements
- a working Linux server with installed Manatee-open library
- Redis database
- Go language compiler and tools
- (optional) an HTTP proxy server (Nginx, Apache, ...)
How to install
- Install
Golanguage environment, either via a package manager or manually from Go download page- make sure
/usr/local/go/binand~/go/binare in your$PATHso you can run any installed Go tools without specifying a full path
- make sure
- Install Manatee-open from the download page. No specific language bindings are required.
configure --with-pcre --disable-python && make && sudo make install && sudo ldconfig
- Get MQuery sources (
git clone --depth 1 https://github.com/czcorpus/mquery.git) - Run
./configure - Run
make - Run
make install- the application will be installed in
/opt/mquery - for data and registry,
/var/opt/corpora/dataand/var/opt/corpora/registrydirectories will be created - systemd services
mquery-server.serviceandmquery-worker-all.targetwill be created
- the application will be installed in
- Copy at least one corpus and its configuration (registry) into respective directories (
/var/opt/corpora/data,/var/opt/corpora/registry) - Update corpora entries in
/opt/mquery/conf.jsonfile to match your installed corpora - start the service:
systemctl start mquery-serversystemctl start mquery-worker-all.target
Authentication
MQuery supports optional token-based authentication via a configurable HTTP header. When enabled, every request must include the header with a valid token.
Relevant configuration fields in conf.json:
{
"authHeaderName": "X-API-Key",
"authTokens": [
"sha256:a3f1c8d2...",
"sha256:9e107d9d..."
],
"localNetworks": [
"127.0.0.0/8",
"192.168.1.0/24"
],
"knownProxies": [
"192.168.1.10"
]
}
Tokens in authTokens can be stored either as plaintext (not recommended) or as SHA-256 hashes prefixed with sha256: (recommended).
Generating a hashed token
-
Choose a secret token (use a long random string):
openssl rand -hex 32 # example output: 4a7b9c2e1f3d8a6b... -
Hash it for storage in
conf.json:echo -n "your-secret-token" | sha256sum | awk '{print "sha256:" $1}' # output: sha256:a3f1c8d2... -
Paste the
sha256:...value intoauthTokensin your config.
Clients send the original (unhashed) token in the configured header:
X-API-Key: your-secret-token
Requests from IPs within any localNetworks CIDR range are exempt from auth token checks, provided the source IP is not also listed in knownProxies. If localNetworks is not set, only the exact listenAddress is treated as local.
If a reverse proxy shares an IP with a local network (e.g. runs on the same host), add its IP to knownProxies to ensure its forwarded requests still require auth.
API
For the most recent API Docs, please see https://korpus.cz/mquery-test/docs/
MCP Support
MQuery ships a separate mqmcp binary (cmd/mqmcp) exposing corpus querying as MCP tools, so LLM agents can call the MQuery API directly. It acts as a thin client that translates MCP tool calls into HTTP requests against a running MQuery API instance.
Available tools:
corpus_info,concordance,term_frequency,freqs,collocations,text_types,text_types_overview,text_types_avail_values.
It is built alongside the main binary by make build (output: ./mqmcp) and run in one of two modes, selected via the MODE env var:
stdio(default) - for local MCP clients (e.g. desktop AI assistants); talks tohttps://www.korpus.cz/mqueryunless overriddenhttp- runs a Streamable HTTP MCP server for shared/remote deployments
Configuration can be provided via a JSON config file (CONF_PATH env var) and/or environment variables:
MQUERY_API_URL- MQuery API base URL (required inhttpmode)MQUERY_API_HEADER_<NAME>- forwards a header to the MQuery API, e.g.MQUERY_API_HEADER_X_API_KEY=secretsendsX-Api-Key: secret(useful for the token-based authentication described above)LISTEN_ADDRESS- listen address (required inhttpmode)LOG_PATH/LOG_LEVEL- logging destination and level (stdiomode logs to a file by default; setLOG_PATH=stderrto log to stderr instead)
Example config file:
{
"apiUrl": "http://localhost:8989",
"apiHeaders": {
"X-Api-Key": "your-secret-token"
},
"server": {
"listenAddress": "0.0.0.0:8990"
},
"logging": {
"level": "info"
}
}
Related Skills
Agent-Reach
85.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
73.7kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.2k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
CowAgent
47.1kOpen-source super AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
