Skip to main content
Glama
hummusonrails

Couchbase MCP Server

Couchbase MCP サーバー

モデルコンテキストプロトコル(MCP)は、大規模言語モデル(LLM)と外部システム間の相互作用を処理するためのプロトコルです。このリポジトリは、Couchbase Node.js SDKを使用してCouchbase MCPサーバーを実装し、MCPクライアント(Claude Desktopなど)がCouchbase Capellaクラスタ上で自然言語クエリを実行できるようにします。

このサーバーでは次のようなコマンドを使用できます:

  • Show me the results of SELECT * FROM my_bucket LIMIT 10

  • Execute this query: SELECT name, age FROM users WHERE active = true

  • Get me the latest 5 documents from my_bucket

  • Summarize the latest 5 orders from the orders bucket for me

例

以下のスクリーンショットは、Claude DesktopクライアントでMCPサーバーが動作している様子を示しています。ユーザーは平易な英語で一般的なリクエストを発行し、MCPサーバーはそれをSQL++クエリに変換してCouchbase Capellaクラスターに対して実行します。そして、その結果はユーザーに読みやすい形式で返されます。

Related MCP server: Couchbase MCP Server

設定

  1. リポジトリをクローンし、依存関係をインストールします。

git clone git@github.com:hummusonrails/couchbase-mcp-server.git
cd couchbase-mcp-server
npm install
  1. ルート ディレクトリに.envファイルを作成し、Couchbase 接続文字列、ユーザー名、パスワードを追加します。

COUCHBASE_CONNECTION_STRING=couchbases://your-cluster.cloud.couchbase.com
COUCHBASE_USERNAME=your_username
COUCHBASE_PASSWORD=your_password

必要な環境変数については、 .env.sampleファイルを参照してください。

  1. プロジェクトをビルドします。

npm run build
  1. Stdio トランスポートを使用してサーバーを実行します。

npx couchbase-mcp-server

[!NOTE] MCPサーバーはStdioServerTransportを使用するため、標準入出力を介して通信します。MCPクライアント(例:Claude Desktop)がローカルMCPサーバーを使用するように設定されていることを確認してください。Claude Desktopのドキュメントに従って、MCPクライアントをローカルサーバーに接続するための設定を行ってください。

特徴

Couchbase クエリツール

  • ツール名: query-couchbase

  • 説明: Couchbase Capella クラスターで SQL++ クエリ ステートメントを実行します。

  • 使用方法: 呼び出されると、サーバーは Couchbase Node.js SDK を使用して、提供された SQL++ クエリを実行し、結果を返します。

現像

プロジェクトをローカルで作業するには:

  1. 依存関係をインストールします:

npm install
npm run build
  1. MCP クライアントを使用してサーバーをテストします。

接続するように構成された MCP クライアント (例: Claude Desktop) を起動し、サンプル クエリを使用してツールを呼び出します。

  1. デバッグ

stdout MCPプロトコルのJSONのみが含まれるように、すべてのログメッセージはstderrに送信されます。詳細な接続メッセージとエラーメッセージについては、ログをご確認ください。

貢献

貢献を歓迎します!プルリクエストを送信したり、提案をIssueで公開したりしてお気軽にご連絡ください。変更を加える際は、プロジェクトのコードスタイルに従ってください。

ライセンス

このプロジェクトはMITライセンスの下で提供されています。詳細はLICENSEファイルをご覧ください。

Related MCP Connectors

  • GibsonAI MCP server: manage your databases with natural language

  • Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema

  • The BigQuery remote MCP server is a fully managed service that uses the Model Context Protocol to connect AI applications and LLMs to BigQuery data sources. It provides secure, standardized tools for AI agents to list datasets and tables, retrieve schemas, generate and execute SQL queries through natural language, and analyze data—enabling direct access to enterprise analytics data without requiring manual SQL coding.

  • The Grafbase MCP server sits in front of a GraphQL API and exposes an MCP protocol-compliant interface that allows AI agents and LLMs to explore and query GraphQL APIs using natural language. It provides tools to search schemas, introspect types and fields, and execute GraphQL queries while minimizing context bloat by returning only relevant schema subsets, with built-in support for authentication, authorization, and configurable access control.

Related MCP Servers