Skip to content

Commit 2c4e99d

Browse files
authored
feat: change MCP's default port from 5000 to 8000 (#85)
1 parent 1bd64ff commit 2c4e99d

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

add-mcp/.apollo/mcp.local.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ introspection:
2020
enabled: true
2121
transport:
2222
type: streamable_http
23-
port: 5050 # MCP server port
23+
port: 8000 # MCP server port (default: 8000)
2424
endpoint: http://localhost:4000 # Your GraphQL API endpoint
2525

2626
# =============================================================================
@@ -40,7 +40,7 @@ description: "GraphQL API for ${PROJECT_NAME}"
4040
# 1. Create operation collections in Apollo Studio Sandbox
4141
# 2. Update endpoint to match your GraphQL server URL
4242
# 3. Run: docker build -f mcp.Dockerfile -t my-mcp-server .
43-
# 4. Run: docker run -p 5050:5050 --env-file .env my-mcp-server
43+
# 4. Run: docker run -p 8000:8000 --env-file .env my-mcp-server
4444

4545
# Environment variables (optional):
4646
# GRAPHQL_ENDPOINT - override endpoint URL

add-mcp/.apollo/mcp.staging.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ introspection:
2020
enabled: true
2121
transport:
2222
type: streamable_http
23-
port: 5050 # MCP server port
23+
port: 8000 # MCP server port (default: 8000)
2424
endpoint: "${STAGING_GRAPHQL_ENDPOINT}" # Your staging GraphQL API endpoint
2525

2626
# Authentication headers for staging
@@ -53,7 +53,7 @@ description: "Staging environment for ${PROJECT_NAME} GraphQL API"
5353
# 2. Set STAGING_GRAPHQL_ENDPOINT to your staging GraphQL URL
5454
# 3. Set APOLLO_KEY for authentication
5555
# 4. Run: docker build -f mcp.Dockerfile -t my-mcp-staging .
56-
# 5. Run: docker run -p 5050:5050 --env-file .env.staging my-mcp-staging
56+
# 5. Run: docker run -p 8000:8000 --env-file .env.staging my-mcp-staging
5757

5858
# Environment variables for staging:
5959
# STAGING_GRAPHQL_ENDPOINT - staging GraphQL endpoint

add-mcp/.env.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ APOLLO_GRAPH_REF="{{APOLLO_GRAPH_REF}}"
2222

2323
# MCP Server Configuration
2424
MCP_ENABLE=1
25-
MCP_PORT=5050
25+
MCP_PORT=8000
2626

2727
# Optional: Environment and logging
2828
NODE_ENV="development"

add-mcp/MCP_README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ All through natural conversation, using your existing GraphQL API.
2121
Your MCP server details:
2222
```
2323
Server name: {{PROJECT_NAME}}
24-
MCP endpoint: http://127.0.0.1:5050/mcp
24+
MCP endpoint: http://127.0.0.1:8000/mcp
2525
```
2626

2727
For Claude Desktop setup instructions:
@@ -48,7 +48,7 @@ set -a && source .env && set +a && rover dev --supergraph-config supergraph.yaml
4848

4949
# This starts:
5050
# → GraphQL API: http://localhost:4000
51-
# → MCP Server: http://localhost:5050
51+
# → MCP Server: http://localhost:8000
5252
```
5353

5454
**Done!** In Claude Desktop, look for your MCP server named `{{PROJECT_NAME}}` in the available tools. Your GraphQL API is now accessible to your AI assistant!
@@ -84,13 +84,13 @@ If you prefer to run just the MCP server separately (without rover dev):
8484
```bash
8585
# Build and run with Docker
8686
docker build -f mcp.Dockerfile -t your-project-mcp .
87-
docker run -d --name your-project-mcp -p 5050:5050 --env-file .env your-project-mcp
87+
docker run -d --name your-project-mcp -p 8000:8000 --env-file .env your-project-mcp
8888

8989
# Verify it's running
90-
curl http://localhost:5050/health
90+
curl http://localhost:8000/health
9191

9292
# Test with MCP inspector
93-
npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:5050/mcp
93+
npx @modelcontextprotocol/inspector --transport http --server-url http://localhost:8000/mcp
9494
```
9595

9696
## Prerequisites
@@ -123,6 +123,6 @@ npx @modelcontextprotocol/inspector --transport http --server-url http://localho
123123
## Need Help?
124124

125125
- **AI client not connecting?** Ensure you've followed the setup instructions from `rover docs open mcp-qs` and restarted your AI client completely.
126-
- **Port conflicts?** Rover dev uses ports 4000 (GraphQL) and 5050 (MCP). Check nothing else is using these ports.
126+
- **Port conflicts?** Rover dev uses ports 4000 (GraphQL) and 8000 (MCP). Check nothing else is using these ports.
127127
- **Environment variables not loading?** Make sure you're using `set -a && source .env && set +a` to properly export variables before running `rover dev`.
128128
- **Need more help with MCP server and tools?** Visit our [Apollo MCP server troubleshooting guide](https://www.apollographql.com/docs/apollo-mcp-server/quickstart#troubleshooting).

add-mcp/mcp.Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
#
1515
# USAGE:
1616
# 1. Build: docker build -f mcp.Dockerfile -t {{PROJECT_NAME}} .
17-
# 2. Run: docker run -p 5050:5050 --env-file .env {{PROJECT_NAME}}
18-
# 3. Test: npx @mcp/inspector (Transport: HTTP, URL: http://localhost:5000/mcp)
17+
# 2. Run: docker run -p 8000:8000 --env-file .env {{PROJECT_NAME}}
18+
# 3. Test: npx @mcp/inspector (Transport: HTTP, URL: http://localhost:8000/mcp)
1919
#
2020
# =============================================================================
2121

@@ -51,7 +51,7 @@ COPY .apollo/mcp.local.yaml /mcp.yaml
5151

5252
# Expose the MCP server port
5353
# The MCP server listens on this port for connections from AI assistants
54-
EXPOSE 5050
54+
EXPOSE 8000
5555

5656
# =============================================================================
5757
# STARTUP COMMAND
@@ -62,7 +62,7 @@ EXPOSE 5050
6262
# 1. Auto-discover configuration files in current directory
6363
# 2. Load tools from MCP_TOOLS_DIR (/app/tools)
6464
# 3. Connect to GRAPHQL_ENDPOINT
65-
# 4. Start MCP server on MCP_PORT (5050)
65+
# 4. Start MCP server on MCP_PORT (8000)
6666
CMD ["mcp.yaml"]
6767

6868
# =============================================================================

0 commit comments

Comments
 (0)