Integrations
Uses Axios to send requests to GraphQL endpoints, allowing for authenticated API interactions with configurable authorization tokens.
Acts as a bridge to any GraphQL API, providing tools to introspect schemas and execute arbitrary queries or mutations against the target GraphQL endpoint.
Built on Node.js to implement the Model Context Protocol server functionality, enabling GraphQL API interactions through standard I/O.
mcp4gql - GraphQL MCP サーバー
このプロジェクトは、Model Context Protocol(MCP)を実装したNode.js/TypeScriptサーバーです。MCPクライアント(Cursorなど)が対象のGraphQL APIとやり取りできるようにするブリッジとして機能します。
特徴
- MCP サーバー:
@modelcontextprotocol/sdk
から MCPServer
クラスを実装します。 - **Stdio トランスポート:**標準入出力を介してクライアントと通信します。
- GraphQL クライアント:
axios
を使用して、構成された GraphQL エンドポイントにリクエストを送信します。 - **汎用 GraphQL ツール:**次のツールを MCP クライアントに公開します。
introspectGraphQLSchema
: イントロスペクションを使用してターゲットの GraphQL API スキーマを取得します。executeGraphQLOperation
:query
、オプションのvariables
、およびオプションのoperationName
を入力として、ターゲット API に対して任意の GraphQL クエリまたはミューテーションを実行します。
構成
サーバーには次の環境変数が必要です。
GRAPHQL_ENDPOINT
: ターゲット GraphQL API の URL。AUTH_TOKEN
: GraphQL API で認証するためのオプションのAuthorization: Bearer <token>
ヘッダーのベアラー トークン。
クライアント構成
Cursor や Claude Desktop などのクライアントがこのサーバーが提供するツールを使用できるようにするには、 npx
コマンドを実行するようにクライアントを構成する必要があります。
カーソル
- カーソルMCP設定に移動します(カーソル > 設定 > カーソル設定 > MCP)
- 新しいグローバルMCPサーバーを追加に移動します
- カーソル MCP 構成に以下を追加します。Copy
クロードデスクトップ
- Claude デスクトップの設定を開きます (Claude > 設定)。
- 「開発者 > 構成の編集」に移動します。
- 設定に追加:Copy
設定が完了すると、MCPクライアントは、このサーバーが提供するintrospectGraphQLSchema
およびexecuteGraphQLOperation
ツールを必要に応じて一覧表示し、呼び出すことができるようになります。サーバーがAPIに接続できるように、必要な環境変数( GRAPHQL_ENDPOINT
およびオプションでAUTH_TOKEN
)を設定してください。
You must be authenticated.
GraphQL MCP サーバーはブリッジとして機能し、MCP クライアント (Cursor や Claude Desktop など) がスキーマ イントロスペクションと操作実行のための標準ツールを通じてターゲット GraphQL API と対話できるようにします。
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityMCP for working with GraphQL servers.Last updated -2536103TypeScriptMIT License
- -securityFlicense-qualityAn MCP server that enables graph database interactions with Neo4j, allowing users to access and manipulate graph data through natural language commands.Last updated -Python
- -securityFlicense-qualityA MCP server that exposes GraphQL schema information to LLMs like Claude. This server allows an LLM to explore and understand large GraphQL schemas through a set of specialized tools, without needing to load the whole schema into the contextLast updated -141JavaScript
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.Last updated -5361MIT License