GraphQL.MCP.Core 0.1.0

dotnet add package GraphQL.MCP.Core --version 0.1.0
                    
NuGet\Install-Package GraphQL.MCP.Core -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GraphQL.MCP.Core" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GraphQL.MCP.Core" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="GraphQL.MCP.Core" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GraphQL.MCP.Core --version 0.1.0
                    
#r "nuget: GraphQL.MCP.Core, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GraphQL.MCP.Core@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GraphQL.MCP.Core&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=GraphQL.MCP.Core&version=0.1.0
                    
Install as a Cake Tool

graphql-mcp

MCP capabilities for every GraphQL server - Hot Chocolate, graphql-dotnet, Spring GraphQL, and more. Cross-framework curation, policy controls, and AI-friendly capability discovery.

NuGet NuGet Maven Central License: MIT .NET CI


What is this?

graphql-mcp is a cross-framework GraphQL AI capability layer. It turns your existing GraphQL API into an MCP server that AI clients can use directly, with curation, policy controls, and safety built in.

No schema duplication. No sidecar process. Just your GraphQL API, now speaking MCP.

Why graphql-mcp?

Some frameworks are adding native MCP support. graphql-mcp goes further:

Native framework MCP graphql-mcp
Cross-framework support One framework only Hot Chocolate, graphql-dotnet, Spring
Curation and policy engine Varies Presets, shared profile packs, reusable profiles, glob-pattern field/type exclusion, mutation blocking, depth limits
AI-friendly naming Varies VerbNoun, Raw, PrefixedRaw policies with tool prefixes
Observability Varies Built-in OpenTelemetry traces and metrics
Portable core No Framework-agnostic engine, adapters are thin

Use native MCP when your framework ships it and it covers your needs. Use graphql-mcp when you need cross-framework support, advanced curation, or operate across multiple GraphQL backends.

Discovery

graphql-mcp ships layered discovery surfaces plus MCP prompt workflows:

  • tools/list includes per-tool domain, category, tags, and semanticHints annotations
  • prompts/list and prompts/get expose reusable exploration, planning, comparison, and safe-call templates
  • resources/list and resources/read expose stable overview, domain, tool, and discovery playbook documents
  • catalog/list returns grouped domain summaries, semantic hints, and tool metadata for exploration UIs, with stronger grouping for generic wrappers and search-style schemas
  • catalog/search returns ranked matches with optional query, domain, category, and tag filters for discovery UIs
  • initialize, resources/read graphql-mcp://auth/metadata, and /.well-known/oauth-authorization-server expose OAuth metadata and required scopes for authenticated clients

Use docs/exploration.md and examples/discovery-workflow for a hands-on discovery walkthrough against the sample apps.

Supported AI Clients

Client Status
Claude Desktop Tested
GitHub Copilot Compatible
Cursor Compatible
Windsurf Compatible
Any MCP-compatible client Compatible

Supported GraphQL Frameworks

Framework Status Package
Hot Chocolate (.NET) Stable-ready GraphQL.MCP.HotChocolate
graphql-dotnet (.NET) Stable-ready GraphQL.MCP.GraphQLDotNet
Spring GraphQL (Java) Stable-ready dev.graphql-mcp:graphql-mcp-spring-boot-starter
Netflix DGS (Java) Stable-ready in repo dev.graphql-mcp:graphql-mcp-dgs

Install

Hot Chocolate

dotnet add package GraphQL.MCP.HotChocolate

graphql-dotnet

dotnet add package GraphQL.MCP.GraphQLDotNet

Java (Spring)

Use the latest published version from Maven Central:

<dependency>
    <groupId>dev.graphql-mcp</groupId>
    <artifactId>graphql-mcp-spring-boot-starter</artifactId>
    <version>REPLACE_WITH_LATEST_VERSION</version>
</dependency>

Java (Netflix DGS)

Use the same latest published graphql-mcp version when the DGS package ships on the stable Java line:

<dependency>
    <groupId>dev.graphql-mcp</groupId>
    <artifactId>graphql-mcp-dgs</artifactId>
    <version>REPLACE_WITH_LATEST_VERSION</version>
</dependency>

Quick Start

Hot Chocolate - Zero Config

using GraphQL.MCP.HotChocolate;

var builder = WebApplication.CreateBuilder(args);

builder.Services
    .AddGraphQLServer()
    .AddQueryType<Query>();

builder.Services.AddHotChocolateMcp();

var app = builder.Build();
app.UseGraphQLMcp();
app.Run();

graphql-dotnet - Zero Config

using GraphQL.MCP.AspNetCore;
using GraphQL.MCP.GraphQLDotNet;

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddGraphQL(b => b
    .AddSchema<MySchema>()
    .AddSystemTextJson());

builder.Services.AddGraphQLDotNetMcp();

var app = builder.Build();
app.UseGraphQL("/graphql");
app.UseGraphQLMcp();
app.Run();

Full Config (any adapter)

builder.Services.AddHotChocolateMcp(options =>
{
    options.PolicyPreset = McpPolicyPreset.Curated;
    options.PolicyPack = McpPolicyPack.Commerce;
    options.PolicyProfile = new McpPolicyProfile
    {
        Name = "commerce-api",
        IncludedDomains = ["order", "invoice"],
        MinDescriptionLength = 12,
        MaxArgumentComplexity = 60
    };

    options.ToolPrefix = "myapi";
    options.NamingPolicy = ToolNamingPolicy.VerbNoun;

    options.AllowMutations = false;
    options.ExcludedFields.Add("internalNotes");
    options.ExcludedTypes.Add("AdminPanel");
    options.ExcludedDomains.Add("admin");

    options.Authorization.Mode = McpAuthMode.Passthrough;
    options.Authorization.RequiredScopes.Add("orders.read");
    options.Authorization.Metadata.Issuer = "https://auth.example.com";
    options.Authorization.Metadata.AuthorizationEndpoint = "https://auth.example.com/authorize";
    options.Authorization.Metadata.TokenEndpoint = "https://auth.example.com/token";
    options.Transport = McpTransport.StreamableHttp; // or McpTransport.Stdio
});

Java - Zero Config

@EnableGraphQLMCP
@SpringBootApplication
public class App {
    public static void main(String[] args) {
        SpringApplication.run(App.class, args);
    }
}

Java - Full Config (application.yml)

graphql:
  mcp:
    enabled: true
    policy-preset: curated
    policy-pack: commerce
    policy-profile:
      name: commerce-api
      included-domains:
        - book
      min-description-length: 12
      max-argument-complexity: 60
    tool-prefix: myapi
    naming-policy: verb-noun
    allow-mutations: false
    excluded-fields:
      - internalData
    excluded-domains:
      - admin
    authorization:
      mode: passthrough
      required-scopes:
        - orders.read
      metadata:
        issuer: https://auth.example.com
        authorization-endpoint: https://auth.example.com/authorize
        token-endpoint: https://auth.example.com/token
    transport: streamable-http # or stdio

How It Works

GraphQL Schema --> Schema Canonicalization --> Policy Engine --> MCP Tools
                                                                    |
AI Client --> POST /mcp --> Tool Executor --> GraphQL Execution --> Result
  1. Introspects your GraphQL schema at startup
  2. Canonicalizes operations into a framework-agnostic model
  3. Applies policies - field and type exclusions, naming, depth limits, mutation safety
  4. Publishes tools as MCP tool descriptors with JSON Schema inputs
  5. Executes GraphQL queries when AI clients invoke tools

Safety by Default

Feature Default
Mutations exposed No - opt-in only
Max output depth 3 levels
Max tool count 50
Auth forwarded No - opt-in passthrough
Sensitive fields You configure ExcludedFields with glob patterns
Selection set exclusion Yes - excluded fields filtered from nested types too

Observability

Built-in OpenTelemetry support:

builder.Services.AddOpenTelemetry()
    .WithTracing(t => t.AddSource("GraphQL.MCP"))
    .WithMetrics(m => m.AddMeter("GraphQL.MCP"));

Metrics: mcp.tool.invocations, mcp.tool.errors, mcp.tool.duration


Architecture

+---------------------------------------------+
|  GraphQL.MCP.Abstractions                   |  Contracts (zero deps)
+---------------------------------------------+
|  GraphQL.MCP.Core                           |  Engine (canonicalize, policy, publish, execute)
+---------------------------------------------+
|  GraphQL.MCP.AspNetCore                     |  HTTP transport (Streamable HTTP and stdio)
+----------------------+----------------------+
|  GraphQL.MCP.        |  GraphQL.MCP.        |
|  HotChocolate        |  GraphQLDotNet       |  Framework adapters
+----------------------+----------------------+

The core engine is fully framework-agnostic. Adding a new framework adapter means implementing two interfaces: IGraphQLSchemaSource and IGraphQLExecutor.

See docs/architecture.md for the full design.


Release Readiness

  • The repository is prepared for stable .NET and Java release lines.
  • Existing -alpha, -beta, or -rc tags remain prereleases in GitHub Releases, but stable tags without a prerelease suffix become the normal latest release line.
  • Spring GraphQL is already published, and the DGS adapter is part of the stable-ready Java surface for the next stable Java tag.

For the full stable release checklist, see docs/releases.md.


Claude Desktop Setup

Start your GraphQL MCP server, then add to claude_desktop_config.json:

{
  "mcpServers": {
    "my-graphql-api": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://localhost:5000/mcp"]
    }
  }
}

Restart Claude Desktop. Your GraphQL operations will appear as tools.


Documentation

Topic Link
Getting Started (.NET) docs/dotnet/getting-started.md
Configuration (.NET) docs/dotnet/configuration.md
Getting Started (Java) docs/java/getting-started.md
Getting Started (DGS) docs/java/dgs-getting-started.md
Configuration (Java) docs/java/configuration.md
Discovery docs/discovery.md
Prompts docs/prompts.md
Resources docs/resources.md
Exploration Workflow docs/exploration.md
Policies docs/policies.md
Adapters docs/adapters.md
Releases docs/releases.md
Roadmap docs/roadmap.md
How Mapping Works docs/mapping.md
Security Model docs/security.md
Transports docs/transports.md
Observability docs/observability.md
Architecture docs/architecture.md

Roadmap

  • .NET Core engine (framework-agnostic)
  • Hot Chocolate adapter
  • graphql-dotnet adapter
  • Streamable HTTP transport
  • MCP prompts for discovery and tool-selection workflows
  • MCP resources for catalog overview and domain summaries
  • Policy engine (field/type exclusion with globs, domain curation, naming, depth, mutation blocking, complexity gates)
  • Selection set field exclusion (nested types)
  • OpenTelemetry instrumentation
  • Spring GraphQL starter
  • Advanced MCP resources (tool summaries, discovery playbooks)
  • Advanced MCP prompts (workflow planning, candidate comparison, safe-call prep)
  • AI-friendly discovery (domain grouping, semantic hints, grouped catalogs, and catalog search)
  • Curated exploration workflow and reusable request assets for the sample apps
  • Reusable policy presets and profiles
  • Shared policy packs for common schema families and industry domains
  • OAuth 2.1 metadata support
  • stdio transport
  • Netflix DGS adapter

Contributing

See CONTRIBUTING.md for development setup and guidelines.

License

MIT - use it however you want.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on GraphQL.MCP.Core:

Package Downloads
GraphQL.MCP.AspNetCore

ASP.NET Core hosting for graphql-mcp — Streamable HTTP transport and endpoint routing.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.1.0 164 3/31/2026
0.1.0-alpha.6 61 3/30/2026
0.1.0-alpha.5 60 3/26/2026
0.1.0-alpha.4 57 3/26/2026
0.1.0-alpha.3 60 3/26/2026
0.1.0-alpha.2 59 3/24/2026
0.1.0-alpha.1 64 3/21/2026
0.0.1-alpha.2 60 3/21/2026