alvinslee/apollo-mcp-server-for-countries
If you are the rightful owner of apollo-mcp-server-for-countries and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This repository provides configuration files for running an Apollo MCP Server with the Countries GraphQL API, enabling AI agents to discover and use GraphQL operations as MCP tools.
Countries GraphQL MCP Server
This repository contains configuration files for running Apollo MCP Server (via Docker) with the Countries GraphQL API found at https://countries.trevorblades.com/graphql. It demonstrates how to expose GraphQL operations as MCP tools that AI agents can discover and use.
What's Included
api.graphql
- GraphQL schema definition for the Countries APIconfig.yaml
- Apollo MCP Server configurationoperations/
- Directory containing GraphQL query files that become MCP toolsGetAllContinents.graphql
GetAllCountries.graphql
GetAllLanguages.graphql
GetContinentByCode.graphql
GetCountriesByContinent.graphql
GetCountriesByCurrency.graphql
GetCountryByCode.graphql
GetLanguageByCode.graphql
SearchCountriesByName.graphql
Prerequisites
- Docker installed on your machine
- Claude Code CLI installed (optional, for testing with Claude)
Quick Start
1. Clone this repository
git clone <your-repo-url>
cd <repo-name>
2. Start Apollo MCP Server with Docker
Run the following command from the repository root:
docker run \
-it --rm \
--name apollo-mcp-server \
-p 5000:5000 \
-v $(pwd)/config.yaml:/config.yaml \
-v $(pwd):/data \
--pull always \
ghcr.io/apollographql/apollo-mcp-server:latest \
/config.yaml
You should see output indicating the server has started:
INFO Starting MCP server in Streamable HTTP mode port=5000 address=0.0.0.0
The MCP server is now running and exposing your GraphQL operations as tools on port 5000.
3. Add MCP Server to Claude Code
In a separate terminal window, register the MCP server with Claude Code:
claude mcp add --transport http countries http://localhost:5000/mcp
You should see confirmation:
Added HTTP MCP server countries with URL: http://localhost:5000/mcp to local config
File modified: ~/.claude.json
4. Test the Integration
Start Claude Code and verify the tools are available:
claude
Then ask Claude:
What MCP servers do you have registered?
Claude should list the countries MCP server and its available tools.
Try a natural language query:
What countries are in South America that start with the letter A?
Claude will use the GetCountriesByContinent
tool to answer your question.