An MCP server for MonkDB
Project description
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>",
}
}
}
}
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.
Environment Variables
The following environment variables are used to configure the MonkDB connection:
Required Variables
MONKDB_HOST: The hostname of your MonkDB serverMONKDB_USER: The username for authenticationMONKDB_PASSWORD: The password for authenticationMONKDB_API_PORT: The API port of MonkDB which is4200.
[!CAUTION] It is important to treat your MCP database user as you would any external client connecting to your database, granting only the minimum necessary privileges required for its operation. The use of default or administrative users should be strictly avoided at all times.
Optional Variables
MONKDB_SCHEMA: The schema of MonkDB. By default, MonkDB provides a universal schemamonkdbunder which tables are created. Access to these tables are restricted by RBAC policies provided by MonkDB.
Example Configurations
MONKDB_HOST=xx.xx.xx.xxx #update the hostname or ip address of monkdb
MONKDB_USER=testuser
MONKDB_PASSWORD=testpassword
MONKDB_API_PORT=4200
# Not needed as by default it is monkdb.
MONKDB_SCHEMA=monkdb
You can set these variables in your environment, in a .env file, or in the Claude Desktop configuration:
{
"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>",
}
}
}
}
Running tests
cd in to mcp_monkdb folder and then run the below command to execute unit tests.
python3 -m unittest discover -s tests
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcp_monkdb-0.1.0-py3-none-any.whl.
File metadata
- Download URL: mcp_monkdb-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.1 CPython/3.13.2 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8679805d4c169bdf9ae6d7c1fa39bd572e238d2f0b9d071a1e03234fcc617ef
|
|
| MD5 |
6a97a310d4df90147b44169afd439c9c
|
|
| BLAKE2b-256 |
f664fdfe8e6b10a221105269b9a6728bb635443869652d141ba8eac133554be7
|