Configuration-driven MCP server for GraphQL endpoints

Configuration-driven MCP server for GraphQL endpoints

mcp-graphql-forge•byunitvectory-labs

Turns a GraphQL endpoint into an MCP server whose tools are defined in YAML files specifying the GraphQL queries and their parameters.

License: MIT•Runtime: Awaiting documentation review•Category: developer tools

WHAT IT DOES

  • •Exposes curated GraphQL queries as modular MCP tools defined in YAML configuration files.
  • •Each tool configuration specifies a name, description, GraphQL query, and typed inputs with required flags.
  • •Supports an optional token_command to request a Bearer token, or passes through the incoming Authorization header if no token command is set.
  • •Offers raw, minimized JSON, or TOON output formats for GraphQL responses.

BEST FOR

  • •Agents that need intentional, curated GraphQL API access instead of unrestricted queries.
  • •Adding new GraphQL operations without modifying application code.
  • •Reducing token usage when returning tabular GraphQL data to LLMs.

ABOUT MCP-GRAPHQL-FORGE

Configuration-driven MCP server for GraphQL endpoints is cataloged as an MCP server attributed to unitvectory-labs. Turns a GraphQL endpoint into an MCP server whose tools are defined in YAML files specifying the GraphQL queries and their parameters. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: MIT. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for Configuration-driven MCP server for GraphQL endpoints are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

Can one instance connect to multiple GraphQL servers?

No, each instance is limited to a single GraphQL server at a single URL.

Are GraphQL queries exposed as MCP Tools or Resources?

They are exposed as Tools, not as Resources, even if they are not mutations.

Does the server support HTTP transport in addition to stdio?

Yes, a --http flag runs the server in streamable HTTP mode with a /mcp endpoint; otherwise it defaults to stdio.

上游原版 README

在 GitHub 查看同一版本原文

README.md · bca9aa7b0504 · 采集于 2026-11-13 10:31:52 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

GitHub release License Active

mcp-graphql-forge

A lightweight, configuration-driven MCP server that exposes curated GraphQL queries as modular tools, enabling intentional API interactions from your agents.

Purpose

mcp-graphql-forge lets you turn any GraphQL endpoint into an MCP server whose tools are defined in YAML files that specify the GraphQL queries and their parameters. This allows you to create a modular, secure, and minimal server that can be easily extended without modifying the application code.

Releases

All official versions of mcp-graphql-forge are published on GitHub Releases. Since this MCP server is written in Go, each release provides pre-compiled executables for macOS, Linux, and Windows—ready to download and run.

Alternatively, if you have Go installed, you can install mcp-graphql-forge directly from source using the following command:

go install github.com/UnitVectorY-Labs/mcp-graphql-forge@latest

Configuration

The server is configured using command line parameters, environment variables, and YAML files.

Command Line Parameters

  • --forgeConfig: Specifies the path to the folder containing the YAML configuration files (forge.yaml and tool definitions). If set, this takes precedence over the FORGE_CONFIG environment variable. If neither is set, the application will return an error and exit.
  • --forgeDebug: If provided, enables detailed debug logging to stderr, including the obtained token and the full HTTP request/response for GraphQL calls. If set, this takes precedence over the FORGE_DEBUG environment variable.

Environment Variables

  • FORGE_CONFIG: Specifies the path to the folder containing the YAML configuration files (forge.yaml and tool definitions). Used if --forgeConfig is not set.
  • FORGE_DEBUG: If set to true (case-insensitive), enables detailed debug logging to stderr, including the obtained token and the full HTTP request/response for GraphQL calls. Used if --forgeDebug is not set.

forge.yaml

The configuration folder uses a special configuration file forge.yaml that specifies the common configuration attributes.

The following attributes can be specified in the file:

  • name: The name of the MCP server
  • url: The URL of the GraphQL endpoint
  • token_command: The command to use to request the Bearer token for the Authorization header (optional)
  • env: A map of environment variables to pass to the token command (optional)
  • env_passthrough: If set to true, passes all environment variables used when invoking mcp-graphql-forge to the token command; if used in conjunction with env, the variables from env will take precedence (optional, defaults to false)

An example configuration would look like:

name: "ExampleServer"
url: "https://api.github.com/graphql"
token_command: "gh auth token"

Tool Configuration

All other YAML files located in the folder are treated as configuration files. Each YAML file defines a tool for the MCP server.

The following attributes can be specified in the file:

  • name: The name of the MCP tool
  • description: The description of the MCP tool
  • query: The GraphQL query to execute
  • inputs: The list of inputs defined by the MCP tool and passed into the GraphQL query as variables
    • name: The name of the input
    • type: The parameter type; can be 'string' or 'number'
    • description: The description of the parameter for the MCP tool to use
    • required: Boolean value specifying if the attribute is required
  • annotations: MCP annotations that provide hints about the tool's behavior (optional)
    • title: A human-readable title for the tool, useful for UI display (optional)
    • readOnlyHint: If true, indicates the tool does not modify its environment (optional, default: false)
    • destructiveHint: If true, the tool may perform destructive updates (only meaningful when readOnlyHint is false) (optional, default: true)
    • idempotentHint: If true, calling the tool repeatedly with the same arguments has no additional effect (only meaningful when readOnlyHint is false) (optional, default: false)
    • openWorldHint: If true, the tool may interact with an "open world" of external entities (optional, default: true)
  • output: The output format for the GraphQL response (optional, defaults to "raw")
    • raw: Passes through the server response as-is (default)
    • json: Returns minimized JSON with unnecessary spacing removed
    • toon: Converts JSON response to TOON format (Token-Oriented Object Notation) for efficient token usage with LLMs

An example configuration would look like:

name: "getUser"
description: "Fetch basic information about a user by `login`, including their name, URL, and location."
query: |
  query ($login: String!) {
    user(login: $login) {
      id
      name
      url
      location
    }
  }
inputs:
  - name: "login"
    type: "string"
    description: "The user `login` that uniquely identifies their account."
    required: true
annotations:
  title: "Get User Information"
  readOnlyHint: true
  destructiveHint: false
  idempotentHint: true
  openWorldHint: true
output: "toon"  # Optional: "raw" (default), "json", or "toon"

Output Formats

The output configuration parameter allows you to specify how the GraphQL response should be formatted. This is particularly useful when working with LLMs, as different formats can optimize for token efficiency.

Available Output Formats

raw (default)

  • Passes through the GraphQL server response exactly as received
  • No transformation or modification is applied
  • Use when you need the original formatting from the server

json

  • Returns minimized JSON with all unnecessary whitespace removed
  • Reduces token usage compared to formatted JSON
  • Ideal for reducing payload size while maintaining JSON compatibility
  • Automatically falls back to raw output if the response is not valid JSON

toon

  • Converts the JSON response to TOON format (Token-Oriented Object Notation)
  • Can reduce token usage by 30-60% for uniform, tabular data
  • Optimized for LLM consumption with compact, human-readable output
  • Uses the toon-format/toon-go library
  • Automatically falls back to raw output if the response is not valid JSON or conversion fails

Run in Streamable HTTP Mode

By default the server runs in stdio mode, but if you want to run in streamable HTTP mode, you can specify the --http command line flag with the server address and port (ex: --http 8080). This will run the server with the following endpoint that your MCP client can connect to:

http://localhost:8080/mcp

./mcp-graphql-forge --http 8080

If you do not specify token_command in the configuration, the "Authorization" header, if passed to the MCP server, will be passed through from the incoming MCP request to the backend GraphQL endpoint.

Limitations

  • Each instance of mcp-graphql-forge can only be used with a single GraphQL server at a single URL.
  • The GraphQL queries are all exposed as Tools and not as Resources, even if they are not mutations.

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for Configuration-driven MCP server for GraphQL endpoints from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/mcp-graphql-forge)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related developer tools MCP Servers

Alternative and complementary servers in the same category

View all in developer tools →
Postbye
postbye-mcp•postbye-team

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools
Singapore Proxy MCP
singapore-proxy-mcp•Xavierfok

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

0
Developer Tools

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.

Repository stats unavailable
Developer Tools