diff --git a/README.md b/README.md index 3783d3e..3b67fd1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # MongoDB MCP Server +[![smithery badge](https://smithery.ai/badge/@mongodb-js/mongodb-mcp-server)](https://smithery.ai/server/@mongodb-js/mongodb-mcp-server) + A Model Context Protocol server for interacting with MongoDB Databases and MongoDB Atlas. ## 📚 Table of Contents @@ -34,6 +36,14 @@ node -v ## Setup +### Installing via Smithery + +To install MongoDB MCP Server for Claude Desktop automatically via [Smithery](https://smithery.ai/server/@mongodb-js/mongodb-mcp-server): + +```bash +npx -y @smithery/cli install @mongodb-js/mongodb-mcp-server --client claude +``` + ### Quick Start Most MCP clients require a configuration file to be created or modified to add the MCP server. diff --git a/smithery.yaml b/smithery.yaml new file mode 100644 index 0000000..42f3a8a --- /dev/null +++ b/smithery.yaml @@ -0,0 +1,26 @@ +# Smithery configuration file: https://smithery.ai/docs/build/project-config + +build: + dockerfile: Dockerfile + dockerBuildPath: ../ +startCommand: + type: stdio + configSchema: + # JSON Schema defining the configuration options for the MCP. + type: object + properties: + connectionString: + type: string + description: The connection string to use to connect to MongoDB. + commandFunction: + # A JS function that produces the CLI command based on the given config to start the MCP on stdio. + |- + (config) => ({ + "command": "node", + "args": [ + "dist/index.js" + ], + "env": { + "MDB_MCP_CONNECTION_STRING": config.connectionString + } + })