Skip to main content
Glama

MongoDB MCP Server

Official
by mongodb-js
createDeployment.test.ts2.6 kB
import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js"; import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js"; describeAccuracyTests([ { prompt: "Setup a local MongoDB cluster named 'local-cluster'", expectedToolCalls: [ { toolName: "atlas-local-create-deployment", parameters: { deploymentName: "local-cluster", }, }, ], }, { prompt: "Create a local MongoDB instance named 'local-cluster'", expectedToolCalls: [ { toolName: "atlas-local-create-deployment", parameters: { deploymentName: "local-cluster", }, }, ], }, { prompt: "Setup a local MongoDB database named 'local-cluster'", expectedToolCalls: [ { toolName: "atlas-local-create-deployment", parameters: { deploymentName: "local-cluster", }, }, ], }, { prompt: "Setup a local MongoDB cluster, do not specify a name", expectedToolCalls: [ { toolName: "atlas-local-create-deployment", parameters: {}, }, ], }, { prompt: "If and only if, the local MongoDB deployment 'new-database' does not exist, then create it", expectedToolCalls: [ { toolName: "atlas-local-list-deployments", parameters: {}, }, { toolName: "atlas-local-create-deployment", parameters: { deploymentName: "new-database", }, }, ], }, { prompt: "If and only if, the local MongoDB deployment 'existing-database' does not exist, then create it", mockedTools: { "atlas-local-list-deployments": (): CallToolResult => ({ content: [ { type: "text", text: "Found 1 deployment:" }, { type: "text", text: "Deployment Name | State | MongoDB Version\n----------------|----------------|----------------\nexisting-database | Running | 6.0", }, ], }), }, expectedToolCalls: [ { toolName: "atlas-local-list-deployments", parameters: {}, }, ], }, ]);

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/mongodb-js/mongodb-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server