multi-monetdb-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@multi-monetdb-mcp-server list my MonetDB databases and show the schema of the analytics one"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
multi-monetdb-mcp-server
One MCP server for all your MonetDB databases.
A companion to multi-postgres-mcp-server, built for MonetDB column-store databases.
Documentation
Document | Audience | Contents |
AI agents & developers | Tool call sequences, decision flow, examples | |
Operators | Config file template | |
This README | Setup | Install, Cursor config, environment restriction |
Related MCP server: Portable Database MCP
Features
One server for all MonetDB databases
Config file with named labels (
analytics,staging, …)Dynamic connect — user provides credentials at runtime via
mdb_connectHot reload — config changes apply within ~5 seconds, no restart
--labelfilter — expose only one database per Cursor project--no-dynamic— block runtimemdb_connectfor locked-down projectsRead-only by default — writes blocked unless
readOnly: false
Two connection modes
Always call mdb_list_databases first — it tells the AI which mode applies.
Mode | When | How |
A — Config label | DB defined in |
|
B — Dynamic | User gives credentials in chat |
|
See USAGE.md for full examples and AI workflow.
Quick Start
1. Install & build
cd multi-monetdb-mcp-server
npm install
npm run build2. Add to Cursor
Global or project .cursor/mcp.json:
{
"mcpServers": {
"monetdb": {
"command": "node",
"args": ["C:/Code/MCPServer/multi-monetdb-mcp-server/dist/index.js"]
}
}
}3. First use
Ask the AI to call mdb_list_databases. It will show config labels or guide you through mdb_connect.
Restricting access per project (Cursor)
When multiple environments exist (production, staging, dev), you can limit what the AI sees per Cursor project using .cursor/mcp.json in each project folder.
Option 1: --label (single database from shared config)
One global ~/.mcp-monetdb/config.json holds all environments. Each project exposes only its label:
~/.mcp-monetdb/config.json (shared):
{
"connections": [
{ "label": "production", "host": "prod.db.com", "port": 50000, "user": "ro", "password": "...", "database": "warehouse", "readOnly": true },
{ "label": "staging", "host": "stg.db.com", "port": 50000, "user": "dev", "password": "...", "database": "warehouse", "readOnly": true },
{ "label": "local", "host": "localhost", "port": 50000, "user": "monetdb", "password": "monetdb", "database": "demo", "readOnly": false }
]
}Project A — .cursor/mcp.json (production only):
{
"mcpServers": {
"monetdb": {
"command": "node",
"args": [
"C:/Code/MCPServer/multi-monetdb-mcp-server/dist/index.js",
"--label",
"production"
]
}
}
}Project B — .cursor/mcp.json (staging only):
{
"mcpServers": {
"monetdb": {
"command": "node",
"args": [
"C:/Code/MCPServer/multi-monetdb-mcp-server/dist/index.js",
"--label",
"staging"
]
}
}
}Effect:
mdb_list_databasesshows only the filtered labelAI cannot see other environment names
AI uses
database="production"(or"staging") on tool calls
Option 2: Project-specific config file
Each project has its own config with only the connections it needs:
Project A — .cursor/mcp.json:
{
"mcpServers": {
"monetdb": {
"command": "node",
"args": [
"C:/Code/MCPServer/multi-monetdb-mcp-server/dist/index.js",
"--config",
"C:/Projects/ProjectA/.cursor/monetdb.json"
]
}
}
}ProjectA/.cursor/monetdb.json:
{
"connections": [
{
"label": "production",
"host": "prod.db.com",
"port": 50000,
"user": "readonly",
"password": "secret",
"database": "warehouse",
"readOnly": true
}
]
}Effect:
Other environments are not in the file at all
No
--labelneeded — only one connection existsBest for strongest isolation between teams/projects
Option 3: --no-dynamic (block runtime credentials)
Prevent the AI from calling mdb_connect with arbitrary credentials. Use with --label or a project config:
{
"mcpServers": {
"monetdb": {
"command": "node",
"args": [
"C:/Code/MCPServer/multi-monetdb-mcp-server/dist/index.js",
"--label",
"production",
"--no-dynamic"
]
}
}
}Effect:
mdb_connectis rejected — config labels onlyUser cannot bypass restriction by pasting credentials in chat
Recommended for production-facing projects
Option 4: Combine all restrictions (recommended for production)
{
"mcpServers": {
"monetdb": {
"command": "node",
"args": [
"C:/Code/MCPServer/multi-monetdb-mcp-server/dist/index.js",
"--config",
"C:/Projects/MyApp/.cursor/monetdb.json",
"--label",
"production",
"--no-dynamic"
]
}
}
}Restriction summary
Flag / setting | What it restricts |
| Only one config label visible to AI |
| Which config file to load (project-specific) |
| Blocks |
| Blocks INSERT/UPDATE/DELETE/DROP in SQL |
| Hides a connection from shared config (soft disable) |
Custom config via environment variable
Alternative to --config in args:
{
"mcpServers": {
"monetdb": {
"command": "node",
"args": ["C:/Code/MCPServer/multi-monetdb-mcp-server/dist/index.js", "--label", "staging"],
"env": {
"MCP_MONETDB_CONFIG": "C:/Projects/MyApp/.cursor/monetdb.json"
}
}
}
}Default config path: ~/.mcp-monetdb/config.json
Config file reference
{
"connections": [
{
"label": "analytics",
"host": "db.example.com",
"port": 50000,
"user": "readonly_user",
"password": "secret",
"database": "analytics",
"enabled": true,
"readOnly": true
}
]
}Field | Default | Description |
| (required) | Name used as |
| — | MonetDB server hostname |
|
| MAPI port |
| — | Username |
|
| Password |
| — | Database name |
| — | Full MAPI URL (alternative to host/user/password/database) |
|
| Set |
|
| Block write queries |
|
| Connection timeout (ms) |
Environment variable substitution in config values:
{ "password": "${MONETDB_PASSWORD:-monetdb}" }Tools
Tool | Description |
| Start here. Labels, session status, connection guide |
| Runtime credentials (blocked when |
| Close dynamic session |
| Execute SQL |
| List tables |
| Column types |
| List schemas |
| Connectivity check |
| EXPLAIN plan |
Security
Read-only by default (
readOnly: true)Use
--no-dynamic+--labelin production Cursor projectsDynamic credentials never saved to config
Multi-statement queries rejected
Config passwords excluded from git via
.gitignore
Source layout
src/
index.ts Entry point
types.ts Shared types
config/ CLI, schemas, loader
connection/ Pool, dynamic session
sql/ Safety, query execution
guidance/ AI connection guide
tools/ MCP tool registrationsLicense
Available Tools
9 toolsmdb_connectA
Connect to MonetDB at runtime with user-provided credentials (NOT from config.json). Always call this first when the user gives you host/user/password/database directly. Runs a health check; on success all other mdb_* tools use this session — omit the database parameter on subsequent calls. Replaces any previous dynamic session.
Inputs: url, host, port, user, +4 more.
mdb_describe_tableB
Describe table columns and types. Omit database if dynamic session active; otherwise pass database="config_label".
Inputs: table (required), schema, database.
mdb_disconnectA
Close the active dynamic connection set via mdb_connect. Config-based connections are unaffected.
Inputs: no named parameters.
mdb_explainB
Run EXPLAIN on a query. Omit database if dynamic session active; otherwise pass database="config_label". Always rolled back.
Inputs: query (required), database.
mdb_health_checkA
Test connectivity and return MonetDB version. Omit database if dynamic session active; otherwise pass database="config_label".
Inputs: database.
mdb_list_databasesA
ALWAYS call this first to discover how to connect. Returns configured database labels from config.json, active dynamic session status, and step-by-step connection instructions for the AI.
Inputs: no named parameters.
mdb_list_schemasA
List schemas. Omit database if dynamic session active; otherwise pass database="config_label".
Inputs: database.
mdb_list_tablesA
List tables in MonetDB. Omit database if dynamic session active; otherwise pass database="config_label". Call mdb_list_databases first if unsure.
Inputs: schema, database.
mdb_queryA
Execute SQL against MonetDB. Connection: (1) active dynamic session from mdb_connect — omit database; (2) config label — pass database="label". Call mdb_list_databases first if unsure.
Inputs: query (required), limit, database.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Tools mostly target distinct operations (connect, disconnect, list metadata, query, explain, health check), but connection bootstrapping has slight overlap and conflicting guidance between mdb_connect and mdb_list_databases over which to call first. mdb_health_check also partially duplicates the health check performed by mdb_connect.
All tools share the mdb_ prefix and snake_case naming, with most following a predictable verb_noun pattern (mdb_list_tables, mdb_describe_table, mdb_query). mdb_health_check is a minor deviation as a noun phrase rather than verb_noun, but the set remains highly consistent overall.
Nine tools is well-scoped for a MonetDB MCP server, covering connection management, metadata discovery, query execution, and diagnostics without bloating the surface. Each tool earns its place and the count sits comfortably in the ideal 3–15 range.
The set covers core lifecycle operations: connect/disconnect, discover databases, schemas, tables, describe columns, run queries, explain plans, and health check. Minor gaps exist for dedicated DDL/DML or transaction helpers, though mdb_query can execute arbitrary SQL, and listing views/indexes is not directly supported.
Related MCP Connectors
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Query, explore, and manage your databases through natural conversation.
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
Draxlr's remote MCP server connects AI assistants to your SQL databases and dashboards. Explore schemas, run read-only queries, manage saved queries and dashboards, and export results, all with row-level security so each user sees only their own data.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to safely query PostgreSQL or SQLite databases read-only through AST-validated guardrails, schema introspection, and statistical table profiling. It returns results as Markdown tables, JSON audit reports, and database health checks.MIT
- AlicenseBqualityCmaintenanceEnables MCP clients to inspect and operate SQLite, PostgreSQL, MySQL/MariaDB, Oracle, SQL Server and MongoDB through 16 tools covering schema discovery, parameterized SQL reads and transactions, MongoDB document operations, and concurrent hybrid SQL/MongoDB queries. Runs locally over stdio or loopback HTTP with pooled connections, bounded concurrency, row and response limits, and read-only defaults.16MIT
- AlicenseAqualityBmaintenanceRead-only-by-default MySQL/MariaDB, PostgreSQL and SQLite access for AI agents: explore schemas and foreign keys, search, sample, query and EXPLAIN with token-efficient TOON output. Writes only when enabled, always previewed and atomic.1138 PyPI1Apache 2.0
- AlicenseAqualityBmaintenanceEnables LLM agents to explore schemas, run guarded read-only queries, inspect execution plans and check database health across a fleet of PostgreSQL databases, selecting a connection by id while credentials stay on the server. Supports multiple databases in one session, exposing schema search, table descriptions, health checks and cross-database relationship lookups over stdio MCP.12MIT