Open4

Claude CodeからMongoDBのMCPサーバを使いたい

すふーすふー

https://www.mongodb.com/ja-jp/docs/mongodb-vscode/commands/#mongodb-mcp-server-commands

  1. コマンドパレットから「Start MCP Server」でMCPサーバを起動
  2. 「Get MCP Server Config」で一時的な接続情報を取得
  3. .mcp.jsonに追加
    基本的には取得した情報で、"type": "http"だけ追加するとClaude Codeで使えるようになった
{
  "mcpServers": {
    "MongoDB MCP Server": {
      "type": "http",
      "url": "xxxxxxxxxxxxxxxxxxxxx",
      "headers": {
        "authorization": "xxxxxxxxxxxxxxxxxxxxx"
      }
    }
  }
}