Skip to content

lucent-data/apollo-mcp-server

 
 

Repository files navigation

Apollo Client

Apollo MCP Server

An MCP Server to expose GraphQL operations as MCP tools.

See the documentation for details.

Modification Notice

This is a modified version of the Apollo MCP Server that enables Authorization header pass-through. This allows the MCP client to send a Bearer token which is automatically forwarded by the MCP server to the backend GraphQL service for authentication and authorization, enabling seamless integration with protected APIs that require user authentication.

Installation & Usage

Prerequisites

  • Rust (latest stable version)

Building the Server

  1. Clone this repository:

    git clone <repository-url>
    cd apollo-mcp-server
  2. Build the project:

    cargo build --release

Running the Server

Run the server with your GraphQL schema and endpoint:

./target/release/apollo-mcp-server \
  --schema path/to/your/schema.graphql \
  --endpoint http://your-graphql-endpoint \
  --http-port 5000 \
  --introspection \
  --operations path/to/your/operations \
  --allow-mutations all \
  --log debug

Configuration Options

  • --schema: Path to your GraphQL schema file (required, unless using Apollo registry)
  • --endpoint: Base URL of your GraphQL endpoint (optional, defaults to http://127.0.0.1:4000)
  • --http-port: Port for HTTP transport (optional, enables HTTP mode; defaults to 5000 if specified)
  • --introspection: Enable GraphQL introspection (optional)
  • --operations: Path to directory containing GraphQL operation files (optional, but either this or --introspection must be provided)
  • --allow-mutations: Controls mutation permissions (all, none, or specific operations) (optional, defaults to none)
  • --log: Log level (debug, info, warn, error) (optional, defaults to info)

Note: This is a selection of the most commonly used configuration options. Run ./target/release/apollo-mcp-server --help to see all available options.

Transport Modes: Specifying either the SSE port or address (or both) will enable the SSE transport. Specifying either the HTTP port or address (or both) will enable the Streamable HTTP transport.

Licensing

This project is licensed under the MIT License. See the LICENSE file for the full license text.

About

Apollo MCP Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 68.6%
  • Nix 29.3%
  • Shell 1.4%
  • PowerShell 0.7%