Integrates Galley's GraphQL API with MCP clients. It automatically introspects the GraphQL schema for seamless use with tools like Claude and VS Code.
A Model Context Protocol (MCP) server for Galley GraphQL API integration using Apollo MCP Server with mandatory automatic schema introspection. The server introspects your Galley GraphQL schema on startup and provides seamless integration with MCP clients like Claude, Cursor, and VS Code.
# Option 1: Use pre-built image from public ECR (recommended)
docker run -i -e X_API_KEY="your_api_key_here" public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Option 2: Build from source
# Clone the repository
git clone <your-repo-url>
cd galley-mcp
# Build the Docker image
docker build -t galley-mcp .
# Run with X-API-KEY authentication
docker run -i -e X_API_KEY="your_api_key_here" galley-mcp
# Or run with x-user-api-key authentication
docker run -i -e X_USER_API_KEY="your_user_api_key_here" galley-mcp
# Or run with Bearer token authentication
docker run -i -e GALLEY_AUTH_TOKEN="your_bearer_token_here" galley-mcp
Pre-built multi-architecture Docker images are available from Amazon ECR Public Gallery:
public.ecr.aws/o0r1r5q2/galley-mcp
public.ecr.aws/o0r1r5q2/galley-mcp:latest
linux/amd64
, linux/arm64
Version Tags Available:
latest
- Latest stable version from master branchv1.0.0
, v1.1.0
, etc. - Semantic version tags from releases1.0.0
, 1.1.0
, etc. - Version tags without 'v' prefixdevelop
- Latest development version from develop branchhttps://app.galleysolutions.com/graphql
MCP servers need to run in interactive mode (-i
flag) to communicate with MCP clients. This allows:
Always use docker run -i
when running the container for MCP client integration.
# Update package index
sudo apt-get update
# Install required packages
sudo apt-get install ca-certificates curl gnupg lsb-release
# Add Docker's official GPG key
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# Add Docker repository
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
# Install Docker Engine
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin
# Add your user to docker group (optional, to run without sudo)
sudo usermod -aG docker $USER
newgrp docker
# Verify installation
docker --version
.dmg
filedocker --version
# Install Homebrew if not already installed
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
# Install Docker
brew install --cask docker
# Launch Docker Desktop
open /Applications/Docker.app
# Verify installation
docker --version
docker --version
# Enable WSL2
wsl --install
# Install Docker in WSL2
# Follow Linux installation steps inside WSL2
Variable | Description | Default | Required |
---|---|---|---|
X_API_KEY | Galley X-API-KEY authentication | - | * |
X_USER_API_KEY | Galley x-user-api-key authentication | - | * |
GALLEY_AUTH_TOKEN | Galley Bearer token authentication | - | * |
STAGING | Use staging environment endpoints | false | No |
ENDPOINT | GraphQL endpoint URL for MCP operations | https://app.galleysolutions.com/graphql (prod) or https://staging-app.galleysolutions.com/graphql (staging) | No |
INTROSPECT_ENDPOINT | Schema introspection endpoint | Same as ENDPOINT | No |
USER_DIRECTORY | Additional operations directory to mount | - | No |
APOLLOGRAPHQL_CLIENT_NAME | Client identification header | galley-mcp-server@{hostname} | No |
SCHEMA_OUTPUT | Schema output file path | /app/schema.graphql | No |
MCP_DEBUG | Enable debug mode with verbose logging | false | No |
DISABLE_INTROSPECTION | Disable introspection capability on MCP server | false | No |
ALLOW_MUTATIONS | Control mutation permissions: none , explicit , or all | none | No |
Authentication Priority: X_API_KEY
takes precedence over X_USER_API_KEY
, which takes precedence over GALLEY_AUTH_TOKEN
if multiple are provided.
The server supports both production and staging environments:
# Uses production endpoints by default
docker run -i -e X_API_KEY="your_key" public.ecr.aws/o0r1r5q2/galley-mcp:latest
https://app.galleysolutions.com/graphql
https://app.galleysolutions.com/graphql
# Enable staging mode
docker run -i -e X_API_KEY="your_key" -e STAGING=true public.ecr.aws/o0r1r5q2/galley-mcp:latest
https://staging-app.galleysolutions.com/graphql
https://staging-app.galleysolutions.com/graphql
# Override specific endpoints (takes precedence over STAGING flag)
docker run -i \
-e X_API_KEY="your_key" \
-e ENDPOINT="https://custom.galleysolutions.com/graphql" \
-e INTROSPECT_ENDPOINT="https://custom-introspect.galleysolutions.com/graphql" \
public.ecr.aws/o0r1r5q2/galley-mcp:latest
Set MCP_DEBUG=true
to enable verbose logging and detailed output:
--log DEBUG
MCP_DEBUG=false
(default), minimal output for production use# Enable debug mode
docker run -i -e X_API_KEY="your_key" -e MCP_DEBUG=true public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Silent mode (default)
docker run -i -e X_API_KEY="your_key" public.ecr.aws/o0r1r5q2/galley-mcp:latest
/app/schema.graphql
and used by Apollo MCP ServerThe MCP server supports introspection capabilities that allow clients to explore the GraphQL schema dynamically. You can control this behavior with the DISABLE_INTROSPECTION
environment variable:
DISABLE_INTROSPECTION=false
)# Enable introspection (default)
docker run -i -e X_API_KEY="your_key" public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Disable introspection for production
docker run -i -e X_API_KEY="your_key" -e DISABLE_INTROSPECTION=true public.ecr.aws/o0r1r5q2/galley-mcp:latest
The MCP server provides fine-grained control over GraphQL mutations through the ALLOW_MUTATIONS
environment variable. This helps maintain data safety and control what operations MCP clients can perform:
none
(default): Don't allow any mutations - read-only accessexplicit
: Allow only pre-defined mutations from operation files, but don't allow the LLM to build new mutations dynamicallyall
: Allow the LLM to build and execute mutations dynamically (highest risk)# Read-only mode (default)
docker run -i -e X_API_KEY="your_key" public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Allow only explicit mutations from operation files
docker run -i -e X_API_KEY="your_key" -e ALLOW_MUTATIONS=explicit public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Allow LLM to build mutations (use with caution)
docker run -i -e X_API_KEY="your_key" -e ALLOW_MUTATIONS=all public.ecr.aws/o0r1r5q2/galley-mcp:latest
Security Recommendation: Use none
or explicit
in production environments to prevent unintended data modifications.
docker run -i \
-e X_API_KEY="prod_api_key_here" \
-e ENDPOINT="https://app.galleysolutions.com/graphql" \
-e INTROSPECT_ENDPOINT="https://app.galleysolutions.com/graphql" \
-e APOLLOGRAPHQL_CLIENT_NAME="production-server@prod-host" \
-e DISABLE_INTROSPECTION=true \
-e ALLOW_MUTATIONS=none \
public.ecr.aws/o0r1r5q2/galley-mcp:latest
docker run -i \
-e X_API_KEY="prod_api_key_here" \
-e ENDPOINT="https://app.galleysolutions.com/graphql" \
-e INTROSPECT_ENDPOINT="https://app.galleysolutions.com/graphql" \
-e APOLLOGRAPHQL_CLIENT_NAME="production-server@prod-host" \
-e DISABLE_INTROSPECTION=true \
-e ALLOW_MUTATIONS=explicit \
public.ecr.aws/o0r1r5q2/galley-mcp:latest
docker run -i \
-e X_API_KEY="dev_api_key_here" \
-e USER_DIRECTORY="/custom/operations" \
-e MCP_DEBUG=true \
-e ALLOW_MUTATIONS=all \
-v ./custom-operations:/custom/operations \
public.ecr.aws/o0r1r5q2/galley-mcp:latest
docker run -i \
-e X_API_KEY="staging_api_key_here" \
-e STAGING=true \
-e APOLLOGRAPHQL_CLIENT_NAME="staging-server@staging-host" \
public.ecr.aws/o0r1r5q2/galley-mcp:latest
Install Claude Desktop from https://claude.ai/download
Configure MCP Server in Claude's settings:
Read-only configuration (recommended):
{
"mcpServers": {
"galley": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "X_API_KEY=your_api_key_here",
"-e", "DISABLE_INTROSPECTION=true",
"-e", "ALLOW_MUTATIONS=none",
"public.ecr.aws/o0r1r5q2/galley-mcp:latest"
],
"env": {}
}
}
}
Allow explicit mutations:
{
"mcpServers": {
"galley": {
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"-e", "X_API_KEY=your_api_key_here",
"-e", "ALLOW_MUTATIONS=explicit",
"public.ecr.aws/o0r1r5q2/galley-mcp:latest"
],
"env": {}
}
}
}
Restart Claude Desktop to load the MCP server
Install Cursor from https://cursor.sh
Add MCP Configuration in Cursor settings:
{
"name": "galley",
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "X_API_KEY=your_api_key_here",
"public.ecr.aws/o0r1r5q2/galley-mcp:latest"
]
}
Enable the MCP server in Cursor's MCP panel
Install VS Code from https://code.visualstudio.com
Install MCP Extension:
Ctrl+Shift+X
)Configure MCP Server:
Ctrl+,
){
"mcp.servers": {
"galley": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "X_API_KEY=your_api_key_here",
"public.ecr.aws/o0r1r5q2/galley-mcp:latest"
]
}
}
}
Add your own GraphQL operations by mounting a custom directory:
# Create custom operations directory
mkdir -p ./my-operations
# Add your .graphql files
echo 'query MyCustomQuery { viewer { id } }' > ./my-operations/MyQuery.graphql
# Run with custom operations
docker run -i \
-e X_API_KEY="your_api_key" \
-e USER_DIRECTORY="/custom" \
-v ./my-operations:/custom \
public.ecr.aws/o0r1r5q2/galley-mcp:latest
The server automatically introspects the Galley GraphQL schema on startup. The schema is saved to /app/schema.graphql
and used by the Apollo MCP Server.
Key Features:
apollographql-client-name
header for trackingThe Docker image includes:
/usr/local/bin
Enable debug mode for detailed output and troubleshooting:
# Enable debug mode for verbose logging
docker run -i -e X_API_KEY="your_api_key" -e MCP_DEBUG=true public.ecr.aws/o0r1r5q2/galley-mcp:latest
# View container logs
docker logs <container_id>
# Run interactively to see all output
docker run -it -e X_API_KEY="your_api_key" -e MCP_DEBUG=true public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Test with different endpoints in debug mode
docker run -i \
-e X_API_KEY="your_api_key" \
-e MCP_DEBUG=true \
-e INTROSPECT_ENDPOINT="https://staging-app.galleysolutions.com/graphql" \
public.ecr.aws/o0r1r5q2/galley-mcp:latest
Debug Mode Features:
galley-mcp/
āāā Dockerfile # Docker container with Apollo MCP Server + Rover
āāā entrypoint.sh # Main startup script with mandatory introspection
āāā introspect-schema.sh # Schema introspection script using Rover
āāā operations/ # GraphQL operations directory
ā āāā GetRecipesByName.graphql # Example Galley recipe query
āāā README.md # This comprehensive guide
The project includes automated CI/CD using GitHub Actions with two specialized workflows:
release.yml
)Triggers: Push to master
branch
What it does:
linux/amd64
and linux/arm64
latest
, v1.0.1
, and 1.0.1
tagsExample: Push to master ā Creates v1.0.1
release + publishes Docker images
build-and-push.yml
)Triggers:
develop
branchmaster
What it does:
develop
tag for development branchlinux/amd64
and linux/arm64
latest
- Latest stable release from master branchv1.0.1
, 1.0.1
- Semantic version tags from releasesdevelop
- Latest development version from develop branchTo set up the CI/CD pipeline, configure these GitHub repository secrets:
AWS_ACCESS_KEY_ID
: AWS access key for ECR push permissionsAWS_SECRET_ACCESS_KEY
: AWS secret key for ECR push permissionsPermissions: The release workflow needs contents: write
permission (automatically configured).
The ECR repository needs to be created as a public repository in us-east-1
region with the name galley-mcp
.
# Verify your API key is correct
docker run -i -e X_API_KEY="your_key" public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Check if endpoint is accessible
curl -H "X-API-KEY: your_key" https://app.galleysolutions.com/graphql
# Check network connectivity to introspection endpoint
docker run --rm -e X_API_KEY="your_key" public.ecr.aws/o0r1r5q2/galley-mcp:latest ping -c 3 app.galleysolutions.com
# Test GraphQL endpoint manually
curl -X POST -H "Content-Type: application/json" \
-H "X-API-KEY: your_key" \
-d '{"query": "{ __schema { types { name } } }"}' \
https://app.galleysolutions.com/graphql
# Check if introspection endpoint is different from operation endpoint
docker run -i \
-e X_API_KEY="your_key" \
-e INTROSPECT_ENDPOINT="https://staging-app.galleysolutions.com/graphql" \
public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Verify authentication method
# Try with Bearer token instead of X-API-KEY
docker run -i -e GALLEY_AUTH_TOKEN="your_token" public.ecr.aws/o0r1r5q2/galley-mcp:latest
# Verify Apollo MCP Server is installed correctly
docker run --rm public.ecr.aws/o0r1r5q2/galley-mcp:latest which apollo-mcp-server
docker run --rm public.ecr.aws/o0r1r5q2/galley-mcp:latest apollo-mcp-server --version
# Check if schema file exists after introspection
docker run --rm -e X_API_KEY="your_key" public.ecr.aws/o0r1r5q2/galley-mcp:latest ls -la /app/schema.graphql
# Check Docker is running
docker --version
# Pull latest base image
docker pull debian:bookworm-slim
# Rebuild without cache
docker build --no-cache -t galley-mcp .
docker logs <container_id>
- Shows introspection and startup processdocker build --no-cache -t galley-mcp .
to force fresh buildWhen everything works correctly, you should see:
Silent Mode (MCP_DEBUG=false, default):
Error: Schema introspection failed. Server cannot start without valid schema.
(Only errors are shown)
Debug Mode (MCP_DEBUG=true):
Starting Apollo MCP Server with Galley configuration...
Endpoint: https://staging-app.galleysolutions.com/graphql
Operations directory: /app/operations
Graph reference: Galley-dtd1yd@current
Client name: galley-mcp-server@hostname
Debug mode: true
Running mandatory schema introspection...
Rover is available
Introspecting schema from: https://app.galleysolutions.com/graphql
Using X-API-KEY for introspection
Running: rover graph introspect https://app.galleysolutions.com/graphql --output /app/schema.graphql --log DEBUG --header X-API-KEY:your_key --header apollographql-client-name:galley-mcp-introspect@hostname
Schema introspection completed successfully!
Schema saved to: /app/schema.graphql
Schema file: XXXX lines, XXXkB
Schema introspection completed successfully, starting server...
Using X-API-KEY authentication
[Your License Here]
For more information about the Model Context Protocol, visit https://modelcontextprotocol.io
Validate and visualize chess positions using FEN notation.
Provides local access to Cursor chat history for AI analysis and insights, with no external services or API keys required.
Create and modify wireframes in the Frame0 app through natural language prompts.
Programmatically control iOS simulators via stdio transport. Requires macOS with Xcode and installed iOS simulators.
A remote MCP server example deployable on Cloudflare Workers without authentication.
An SSE-based MCP server that allows LLM-powered applications to interact with OCI registries. It provides tools for retrieving information about container images, listing tags, and more.
Generate images using OpenAI's DALL-E API.
A self-hosted MCP Server registry for private AI agents, supporting both PostgreSQL and SQLite databases.
A code observability MCP enabling dynamic code analysis based on OTEL/APM data to assist in code reviews, issues identification and fix, highlighting risky code etc.
Navigate your OpenTelemetry resources, investigate incidents and query metrics, logs and traces on Dash0.