MCP server
Connect an AI agent to TeselaDB with the MongoDB MCP Server tools.
Every node has a Model Context Protocol server. It offers the database tools of MongoDB MCP Server with the same names
and arguments: find, aggregate, count, insert-many, update-many, delete-many, create-index,
collection-indexes, collection-schema and the rest.
Two ways to connect
- Streamable HTTP at
https://<node>:27080/mcp, with an API key inAuthorization: Bearer. - stdio with
teseladb mcp, which forwards to the HTTP port. The credential goes in theTESELADB_API_KEYenvironment variable, never in the arguments.
JSON
{
"mcpServers": {
"teseladb": {
"command": "teseladb",
"args": ["mcp", "--uri", "https://node-01:27080"],
"env": { "TESELADB_API_KEY": "tdb_…" }
}
}
}Read-only by default
The MCP server starts read-only: the tools that write are not available until you turn them on with the mcpOptions
cluster parameter. aggregate rejects $out and $merge. Each tool checks the privileges of the equivalent command
with the key's roles, and every call is recorded in the audit log.
A step-by-step guide is in Connect an agent with MCP.