Official MonkDB MCP Server
An MCP (Modular Command Protocol) server for interacting with MonkDB, enabling Claude like LLMs to execute database-related tools such as querying, table inspection, and server health checks.
Features
Tools
-
run_select_query- Execute SQL queries on your MonkDB cluster.
- Input:
sql(string): The SQL query to execute. - Rejects non-select queries
-
list_tables- List all tables in
monkdbschema.
- List all tables in
-
health_check- Does a health check ping on MonkDB.
- Returns either
okor an error message.
-
get_server_version- Returns the server version of MonkDB.
-
describe_table- Describe a table's columns in MonkDB.
Configuration
-
Open the Claude Desktop configuration file located at:
- On macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - On Windows:
%APPDATA%/Claude/claude_desktop_config.json
- On macOS:
-
Add the following:
{
"mcpServers": {
"mcp-monkdb": {
"command": "uv",
"args": [
"run",
"--with",
"mcp-monkdb",
"--python",
"3.13",
"mcp-monkdb"
],
"env": {
"MONKDB_HOST": "<monkdb-host>",
"MONKDB_API_PORT": "<monkdb-port>",
"MONKDB_USER": "<monkdb-user>",
"MONKDB_PASSWORD": "<monkdb-password>",
// Optional OTEL Configuration
"MONKDB_OTEL_ENABLED": "true",
"MONKDB_OTEL_EXPORTER_OTLP_ENDPOINT": "https://your-otel-endpoint:4318",
"MONKDB_OTEL_SERVICE_NAME": "mcp-monkdb",
"MONKDB_OTEL_AUTH_HEADER": "Authorization=Bearer your-token-here"
}
}
}
}
Update the environment variables to point to your own MonkDB cluster.
-
Locate the command entry for
uvand replace it with the absolute path to theuvexecutable. This ensures that the correct version ofuvis used when starting the server. On a mac, you can find this path usingwhich uv. -
Restart Claude Desktop to apply the changes.
Note: you may also use poetry instead of uv.
{
"mcpServers": {
"mcp-monkdb": {
"command": "poetry",
"args": [
"run",
"python",
"-m",
"mcp_monkdb"
],
"env": {
"MONKDB_HOST": "<monkdb-host>",
"MONKDB_API_PORT": "<monkdb-port>",
"MONKDB_USER": "<monkdb-user>",
"MONKDB_PASSWORD": "<monkdb-password>",
// Optional OTEL Configuration
"MONKDB_OTEL_ENABLED": "true",
"MONKDB_OTEL_EXPORTER_OTLP_ENDPOINT": "https://your-otel-endpoint:4318",
"MONKDB_OTEL_SERVICE_NAME": "mcp-monkdb",
"MONKDB_OTEL_AUTH_HEADER": "Authorization=Bearer your-token-here"
}
}
}
}
Environment Variables
The following environment variables are used to configure the MonkDB connection and optional OpenTelemetry (OTEL) tracing.
Required Variables
MONKDB_HOST: The hostname or IP address of your MonkDB server.MONKDB_USER: The username for authentication.MONKDB_PASSWORD: The password for authentication.MONKDB_API_PORT: The API port of MonkDB (default is4200).
Optional Variables
MONKDB_SCHEMA: The schema of MonkDB. Defaults tomonkdb. Tables under this schema are protected by RBAC policies.
Optional OTEL Tracing Variables
To enable distributed tracing using OpenTelemetry:
MONKDB_OTEL_ENABLED: Set totrueto enable tracing.MONKDB_OTEL_EXPORTER_OTLP_ENDPOINT: The OTLP HTTP endpoint (e.g.http://localhost:4318orhttps://your-collector.com:4318).MONKDB_OTEL_SERVICE_NAME: Logical name for trace viewers (e.g.,mcp-monkdb).MONKDB_OTEL_AUTH_HEADER: (Optional) Auth header if your OTEL collector requires it.
Format:Authorization=Bearer <token>orapi-key=XYZ123.
Note
If you're using a local OTEL collector with no auth,MONKDB_OTEL_AUTH_HEADERcan be omitted.
Example .env Configuration
MONKDB_HOST=xx.xx.xx.xxx
MONKDB_USER=testuser
MONKDB_PASSWORD=testpassword
MONKDB_API_PORT=4200
MONKDB_SCHEMA=monkdb
# OpenTelemetry tracing (optional)
MONKDB_OTEL_ENABLED=true
MONKDB_OTEL_EXPORTER_OTLP_ENDPOINT=https://my-otel-collector:4318
MONKDB_OTEL_SERVICE_NAME=mcp-monkdb
MONKDB_OTEL_AUTH_HEADER=Authorization=Bearer xyz123
These can also be configured directly inside your Claude Desktop config:
{
"mcpServers": {
"mcp-monkdb": {
"command": "poetry",
"args": ["run", "python", "-m", "mcp_monkdb"],
"env": {
"MONKDB_HOST": "<monkdb-host>",
"MONKDB_API_PORT": "<monkdb-port>",
"MONKDB_USER": "<monkdb-user>",
"MONKDB_PASSWORD": "<monkdb-password>",
"MONKDB_OTEL_ENABLED": "true",
"MONKDB_OTEL_EXPORTER_OTLP_ENDPOINT": "https://your-otel-host:4318",
"MONKDB_OTEL_SERVICE_NAME": "mcp-monkdb",
"MONKDB_OTEL_AUTH_HEADER": "Authorization=Bearer your-token"
}
}
}
}
Traced Operations
| Operation | ToolTraced? | Captured Attributes |
|---|---|---|
| run_select_query | ✅ | monkdb.query, monkdb.query.type (select), monkdb.query.rows, status |
Running tests
cd in to mcp_monkdb folder and then run the below command to execute unit tests.
python3 -m unittest discover -s tests
Metadata
Release files for mcp-monkdb 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp_monkdb-0.2.4.tar.gz | 40.1 kB | Without provenance | Details for mcp_monkdb-0.2.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp_monkdb-0.2.4-py3-none-any.whl | Python 3 | none | any | Details for mcp_monkdb-0.2.4-py3-none-any.whl |
Total release size: 48.7 kB
Release files / mcp_monkdb-0.2.4.tar.gz
| Download URL | mcp_monkdb-0.2.4.tar.gz |
|---|---|
| Size | 40.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d29d89e3c533358fd7c336adddfeb141ea5d8c338ea8bd7578b2c4cdbe6881c6
|
|
BLAKE2b-256 checksum How to use checksums |
865e96c2a9fb5aeb95b498bacedd15abcca3a347a13bbb53077669fd52bc0c30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.13.2 Darwin/25.1.0
|
Release files / mcp_monkdb-0.2.4-py3-none-any.whl
| Download URL | mcp_monkdb-0.2.4-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
144baa622d66481bbf9f06f64e2a23787cc476704a6408ebd8c909bc06f5baae
|
|
BLAKE2b-256 checksum How to use checksums |
4c9303b743936dbb7a1c64e83b8b3576593b36242dfea1947b39013cfd9bdd4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.1.1 CPython/3.13.2 Darwin/25.1.0
|
Security for mcp-monkdb 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.