Overview
what is mcp4gql?
mcp4gql is a Node.js/TypeScript server that implements the Model Context Protocol (MCP), acting as a bridge for MCP clients to interact with a target GraphQL API.
how to use mcp4gql?
To use mcp4gql, configure your MCP client (like Cursor or Claude Desktop) to run the npx command with the necessary environment variables for the GraphQL endpoint and optional authentication token.
key features of mcp4gql?
- Implements the MCP
Serverclass from@modelcontextprotocol/sdk. - Communicates with clients via standard input/output (stdio).
- Uses
axiosto send requests to the configured GraphQL endpoint. - Provides tools for clients to introspect the GraphQL schema and execute GraphQL operations.
use cases of mcp4gql?
- Enabling MCP clients to interact with various GraphQL APIs.
- Facilitating the execution of complex GraphQL queries and mutations.
- Allowing clients to introspect GraphQL schemas for better integration.
FAQ from mcp4gql?
- What is the purpose of mcp4gql?
mcp4gql serves as a bridge for MCP clients to communicate with GraphQL APIs, simplifying the integration process.
- How do I configure my MCP client?
Follow the provided configuration steps for Cursor or Claude Desktop to set up the MCP server.
- What environment variables are required?
You need to set
GRAPHQL_ENDPOINTfor the target API URL and optionallyAUTH_TOKENfor authentication.