mcp4gql

by jorgeraad
MIT License
0
1

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から MCP Serverクラスを実装します。
  • **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コマンドを実行するようにクライアントを構成する必要があります。

カーソル

  1. カーソルMCP設定に移動します(カーソル > 設定 > カーソル設定 > MCP)
    • 新しいグローバルMCPサーバーを追加に移動します
  2. カーソル MCP 構成に以下を追加します。
    { "mcpServers": { "mcp4gql": { "command": "npx", "type": "stdio", "args": ["-y", "mcp4gql"], "env": { "GRAPHQL_ENDPOINT": "YOUR_GRAPHQL_ENDPOINT_URL", "AUTH_TOKEN": "YOUR_OPTIONAL_AUTH_TOKEN" } } } }

クロードデスクトップ

  1. Claude デスクトップの設定を開きます (Claude > 設定)。
  2. 「開発者 > 構成の編集」に移動します。
  3. 設定に追加:
    { "mcpServers": { "mcp4gql": { "command": "npx", "args": ["-y", "mcp4gql"], "env": { "GRAPHQL_ENDPOINT": "YOUR_GRAPHQL_ENDPOINT_URL", "AUTH_TOKEN": "YOUR_OPTIONAL_AUTH_TOKEN" } } } }

設定が完了すると、MCPクライアントは、このサーバーが提供するintrospectGraphQLSchemaおよびexecuteGraphQLOperationツールを必要に応じて一覧表示し、呼び出すことができるようになります。サーバーがAPIに接続できるように、必要な環境変数( GRAPHQL_ENDPOINTおよびオプションでAUTH_TOKEN )を設定してください。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

GraphQL MCP サーバーはブリッジとして機能し、MCP クライアント (Cursor や Claude Desktop など) がスキーマ イントロスペクションと操作実行のための標準ツールを通じてターゲット GraphQL API と対話できるようにします。

  1. Features
    1. Configuration
      1. Client Configuration
        1. Cursor
        2. Claude Desktop

      Related MCP Servers

      • A
        security
        A
        license
        A
        quality
        MCP for working with GraphQL servers.
        Last updated -
        2
        536
        103
        TypeScript
        MIT License
        • Apple
      • -
        security
        F
        license
        -
        quality
        An MCP server that enables graph database interactions with Neo4j, allowing users to access and manipulate graph data through natural language commands.
        Last updated -
        Python
      • -
        security
        F
        license
        -
        quality
        A 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 context
        Last updated -
        14
        1
        JavaScript
        • Apple
        • Linux
      • -
        security
        A
        license
        -
        quality
        A Model Context Protocol server that enables LLMs to interact with GraphQL APIs by providing schema introspection and query execution capabilities.
        Last updated -
        536
        1
        MIT License
        • Apple

      View all related MCP servers

      ID: bfuylp4yph