Skip to content

Commit 300f84a

Browse files
authored
Merge pull request #417 from apollographql/AIR-42
Change default port from 5000 to 8000
2 parents df5c1f1 + bf4cba2 commit 300f84a

File tree

12 files changed

+77
-134
lines changed

12 files changed

+77
-134
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Change default port from 5000 to 8000 - @DaleSeo PR #417
2+
3+
The default server port has been changed from `5000` to `8000` to avoid conflicts with common development tools and services that typically use port 5000 (such as macOS AirPlay, Flask development servers, and other local services).
4+
5+
**Migration**: If you were relying on the default port 5000, you can continue using it by explicitly setting the port in your configuration file or command line arguments.
6+
7+
- Before
8+
9+
```yaml
10+
transport:
11+
type: streamable_http
12+
```
13+
14+
- After
15+
16+
```yaml
17+
transport:
18+
type: streamable_http
19+
port: 5000
20+
```

crates/apollo-mcp-server/src/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ impl Transport {
9494
}
9595

9696
fn default_port() -> u16 {
97-
5000
97+
8000
9898
}
9999

100100
fn default_stateful_mode() -> bool {

docs/source/config-file.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ The available fields depend on the value of the nested `type` key:
170170
| :-------------- | :-------------------- | :--------- | :------------------------------------------------------------------------ |
171171
| `type` | `"streamable_http"` | | Host the MCP server on the configuration, using streamable HTTP messages. |
172172
| `address` | `127.0.0.1` (default) | `IpAddr` | The IP address to bind to |
173-
| `port` | `5000` (default) | `u16` | The port to bind to |
173+
| `port` | `8000` (default) | `u16` | The port to bind to |
174174
| `stateful_mode` | `true` (default) | `bool` | Flag to enable or disable stateful mode and session management. |
175175

176176
##### SSE (Deprecated, use StreamableHTTP)
@@ -179,7 +179,7 @@ The available fields depend on the value of the nested `type` key:
179179
| :-------- | :-------------------- | :--------- | :--------------------------------------------------------------------------------------------------------------- |
180180
| `type` | `"sse"` | | Host the MCP server on the supplied config, using SSE for communication. Deprecated in favor of `StreamableHTTP` |
181181
| `address` | `127.0.0.1` (default) | `IpAddr` | The IP address to bind to |
182-
| `port` | `5000` (default) | `u16` | The port to bind to |
182+
| `port` | `8000` (default) | `u16` | The port to bind to |
183183

184184
### Auth
185185

docs/source/cors.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The following snippet includes an example of each option (use either `allow_any_
2626
```yaml title="mcp.yaml"
2727
transport:
2828
type: streamable_http
29-
port: 5000
29+
port: 8000
3030

3131
cors:
3232
# Enable CORS support
@@ -207,7 +207,7 @@ Here's a simple example of connecting to Apollo MCP Server from a browser:
207207

208208
```javascript
209209
async function connectToMCP() {
210-
const response = await fetch("http://127.0.0.1:5000/mcp", {
210+
const response = await fetch("http://127.0.0.1:8000/mcp", {
211211
method: "POST",
212212
headers: {
213213
Accept: "application/json, text/event-stream",

docs/source/debugging.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ schema:
6565
transport:
6666
type: streamable_http
6767
address: 127.0.0.1
68-
port: 5000
68+
port: 8000
6969
```
7070
7171
```sh
@@ -81,6 +81,6 @@ npx @modelcontextprotocol/inspector
8181
1. In a browser, go to the URL returned by Inspector, then fill in the details:
8282

8383
- **Transport Type**: Select `Streamable HTTP`
84-
- **URL**: Enter `http://127.0.0.1:5000/mcp`, where the port must match the `transport.port` option
84+
- **URL**: Enter `http://127.0.0.1:8000/mcp`, where the port must match the `transport.port` option
8585

8686
1. Click **Connect** and **List Tools**. You should see the tools for the operations you provided.

docs/source/deploy.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ For most production deployments, use the all-in-one [Apollo Runtime Container](/
1919

2020
### Deploy the Apollo Runtime Container
2121

22-
The Apollo Runtime Container includes all services necessary to serve GraphQL and MCP requests, including Apollo Router and Apollo MCP Server. Both port `4000` (GraphQL) and `5000` (MCP) are exposed.
22+
The Apollo Runtime Container includes all services necessary to serve GraphQL and MCP requests, including Apollo Router and Apollo MCP Server. Both port `4000` (GraphQL) and `8000` (MCP) are exposed.
2323

2424
```bash title="Deploy with GraphOS (Recommended)"
2525
docker run \
2626
-p 4000:4000 \
27-
-p 5050:5000 \
27+
-p 8000:8000 \
2828
--env APOLLO_GRAPH_REF="<your-graph-ref>" \
2929
--env APOLLO_KEY="<your-graph-api-key>" \
3030
--env MCP_ENABLE=1 \
@@ -52,7 +52,7 @@ Use the standalone Apollo MCP Server container if you already have a GraphQL API
5252

5353
Apollo MCP Server is available as a standalone Docker container. Container images are downloadable using the image `ghcr.io/apollographql/apollo-mcp-server`.
5454

55-
By default, the container expects all schema and operation files to be present in the `/data` directory within the container and that clients use Streamable HTTP transport on container port `5050`.
55+
By default, the container expects all schema and operation files to be present in the `/data` directory within the container and that clients use Streamable HTTP transport on container port `8000`.
5656

5757
Here's an example `docker run` command that runs Apollo MCP Server for an example using [TheSpaceDevs graph](https://thespacedevs-production.up.railway.app/):
5858

@@ -71,7 +71,7 @@ schema:
7171
docker run \
7272
-it --rm \
7373
--name apollo-mcp-server \
74-
-p 5050:5000 \
74+
-p 8000:8000 \
7575
-v <path/to>/mcp_config.yaml:/config.yaml \
7676
-v $PWD/graphql/TheSpaceDevs:/data \
7777
--pull always \

docs/source/guides/auth-auth0.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This guide uses [Auth0](https://auth0.com/) as the Identity Provider.
3131
1. In your dashboard, navigate to **Applications** -> **APIs**.
3232
1. Click **Create API**.
3333
1. Give it a friendly name like `MCP Auth API`.
34-
1. For the **Identifier** field, Auth0 recommends using a URL. This identifier is used in the MCP server configuration later as the `audience` property. For this guide, use `http://localhost:5000/mcp-example`.
34+
1. For the **Identifier** field, Auth0 recommends using a URL. This identifier is used in the MCP server configuration later as the `audience` property. For this guide, use `http://localhost:8000/mcp-example`.
3535
1. Leave the defaults for the rest of the fields and click **Create**.
3636
1. Navigate to your dashboard **Settings**.
3737
1. Under **General** -> **API Authorization Settings**, set the **Default Audience** to the `Identifier` you chose.
@@ -89,14 +89,14 @@ Configure the MCP server to use the Auth0 instance for authentication.
8989
- https://<AUTH0 DOMAIN> # Fill in your Auth0 domain
9090
audiences:
9191
- <AUTH0 DEFAULT AUDIENCE> # Fill in your Auth0 Identifier
92-
resource: http://127.0.0.1:5000/mcp
92+
resource: http://127.0.0.1:8000/mcp
9393
scopes:
9494
- read:users # Adjust scopes as needed
9595
```
9696
9797
1. Replace the `<AUTH0 DOMAIN>` with your own Auth0 domain from earlier.
9898

99-
1. Replace the `<AUTH0 DEFAULT AUDIENCE>` with the matching `Identifier` you set when creating the Auth0 API. In this guide, you used `http://localhost:5000/mcp-example`.
99+
1. Replace the `<AUTH0 DEFAULT AUDIENCE>` with the matching `Identifier` you set when creating the Auth0 API. In this guide, you used `http://localhost:8000/mcp-example`.
100100

101101
Your MCP server is now configured to use Auth0 for authentication.
102102

@@ -188,7 +188,7 @@ You need a graph's credentials and a valid GraphOS plan to use the router's auth
188188

189189
The browser should open automatically with a proxy auth token.
190190

191-
1. In the MCP Inspector, select `Streamable HTTP` as the Transport Type and enter `http://127.0.0.1:5000/mcp` as the URL.
191+
1. In the MCP Inspector, select `Streamable HTTP` as the Transport Type and enter `http://127.0.0.1:8000/mcp` as the URL.
192192
1. Click **Connect**. This triggers the OAuth flow, and you are redirected to the Auth0 login page.
193193
1. Log in with the credentials you set up in the Auth0 connection and allow MCP Inspector access.
194194
1. After you connect, the browser redirects back to MCP Inspector.
@@ -241,7 +241,7 @@ Then, continue with the following steps:
241241
| "What would you like to configure?" | "Add Extension" |
242242
| "What type of extension would you like to add?" | "Command Line Extension" |
243243
| "What's the name of this extension?" | "mcp-auth-quickstart" |
244-
| "What command should be run?" | `npx mcp-remote http://127.0.0.1:5000/mcp` |
244+
| "What command should be run?" | `npx mcp-remote http://127.0.0.1:8000/mcp` |
245245
| Other prompts (timeout, description, environment variables) | Use the default values |
246246

247247
1. To start Goose, type `goose`. This will open a browser window and send you through the auth flow.
@@ -255,8 +255,8 @@ Then, continue with the following steps:
255255

256256
#### MCP Server Won't Start
257257

258-
- **Error**: "Port 5000 is already in use"
259-
- Solution: Kill any existing processes using port 5000 or specify a different port with the `transport.port` option or `APOLLO_MCP_TRANSPORT__PORT` env variable
258+
- **Error**: "Port 8000 is already in use"
259+
- Solution: Kill any existing processes using port 8000 or specify a different port with the `transport.port` option or `APOLLO_MCP_TRANSPORT__PORT` env variable
260260
- **Error**: "Failed to load supergraph configuration"
261261
- Solution: Verify you're running the command from the repo root directory
262262
- Solution: Check that the path to `supergraph.yaml` is correct
@@ -269,7 +269,7 @@ Then, continue with the following steps:
269269

270270
- **Error**: "Failed to connect to server"
271271
- Solution: Ensure the MCP server is running (check terminal output)
272-
- Solution: Verify you're using the correct URL (`http://127.0.0.1:5000/mcp`)
272+
- Solution: Verify you're using the correct URL (`http://127.0.0.1:8000/mcp`)
273273
- Solution: Check if your firewall is blocking the connection
274274

275275
### Infinite loop during OAuth flow

docs/source/health-checks.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Health checks are only available when using the `streamable_http` transport and
1515
transport:
1616
type: streamable_http
1717
address: 127.0.0.1
18-
port: 5000
18+
port: 8000
1919
health_check:
2020
enabled: true
2121
path: /health

docs/source/quickstart.mdx

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ You can start your MCP server locally with `rover dev`.
6161

6262
</Tabs>
6363

64-
1. You should see some output indicating that the GraphQL server is running at `http://localhost:4000` and the MCP server is running at `http://127.0.0.1:5050`.
64+
1. You should see some output indicating that the GraphQL server is running at `http://localhost:4000` and the MCP server is running at `http://127.0.0.1:8000`.
6565

6666
1. In a new terminal window, run the MCP Inspector to verify the server is running:
6767

6868
```terminal showLineNumbers=false
69-
npx @modelcontextprotocol/inspector http://127.0.0.1:5050/mcp --transport http
69+
npx @modelcontextprotocol/inspector http://127.0.0.1:8000/mcp --transport http
7070
```
7171

7272
1. This will automatically open your browser to `http://127.0.0.1:6274`.
@@ -94,7 +94,7 @@ Copy the configuration:
9494
"command": "npx",
9595
"args": [
9696
"mcp-remote",
97-
"http://127.0.0.1:5050/mcp"
97+
"http://127.0.0.1:8000/mcp"
9898
]
9999
}
100100
}
@@ -107,7 +107,7 @@ Copy the configuration:
107107
Install using the CLI:
108108

109109
```bash
110-
claude mcp add apollo-mcp npx mcp-remote http://127.0.0.1:5050/mcp
110+
claude mcp add apollo-mcp npx mcp-remote http://127.0.0.1:8000/mcp
111111
```
112112
</ExpansionPanel>
113113

@@ -127,7 +127,7 @@ Or install manually:
127127
1. Go to **Cursor Settings****MCP****Add new MCP Server**
128128
2. Name: `Apollo MCP` (choose a title)
129129
3. Command: `npx`
130-
4. Arguments: `["mcp-remote", "http://127.0.0.1:5050/mcp"]`
130+
4. Arguments: `["mcp-remote", "http://127.0.0.1:8000/mcp"]`
131131
</ExpansionPanel>
132132

133133
<ExpansionPanel title="Goose">
@@ -147,21 +147,21 @@ default:
147147
command: npx
148148
args:
149149
- mcp-remote
150-
- http://127.0.0.1:5050/mcp
150+
- http://127.0.0.1:8000/mcp
151151
```
152152
153153
Or use the Goose CLI to add the MCP server:
154154
155155
```bash
156-
goose mcp add apollo-mcp npx mcp-remote http://127.0.0.1:5050/mcp
156+
goose mcp add apollo-mcp npx mcp-remote http://127.0.0.1:8000/mcp
157157
```
158158
</ExpansionPanel>
159159

160160
<ExpansionPanel title="Cline (VS Code Extension)">
161161
1. Go to **Advanced settings****Extensions****Add custom extension**
162162
2. Name: `Apollo MCP`
163163
3. Type: **STDIO**
164-
4. Command: `npx mcp-remote http://127.0.0.1:5050/mcp`
164+
4. Command: `npx mcp-remote http://127.0.0.1:8000/mcp`
165165
</ExpansionPanel>
166166

167167
<ExpansionPanel title="OpenCode">
@@ -176,7 +176,7 @@ Edit `~/.config/opencode/opencode.json`:
176176
"command": [
177177
"npx",
178178
"mcp-remote",
179-
"http://127.0.0.1:5050/mcp"
179+
"http://127.0.0.1:8000/mcp"
180180
],
181181
"enabled": true
182182
}
@@ -189,7 +189,7 @@ Edit `~/.config/opencode/opencode.json`:
189189
1. Go to **Windsurf Settings → MCP → Add new MCP Server**
190190
2. Name: `Apollo MCP`
191191
3. Command: `npx`
192-
4. Arguments: `["mcp-remote", "http://127.0.0.1:5050/mcp"]`
192+
4. Arguments: `["mcp-remote", "http://127.0.0.1:8000/mcp"]`
193193

194194
Alternatively, edit your Windsurf configuration file directly:
195195

@@ -200,7 +200,7 @@ Alternatively, edit your Windsurf configuration file directly:
200200
"command": "npx",
201201
"args": [
202202
"mcp-remote",
203-
"http://127.0.0.1:5050/mcp"
203+
"http://127.0.0.1:8000/mcp"
204204
]
205205
}
206206
}
@@ -265,7 +265,7 @@ Your project includes a pre-configured `mcp.Dockerfile` for easy deployment. Thi
265265
1. Run locally:
266266

267267
```bash
268-
docker run -p 4000:4000 -p 5050:5000 \
268+
docker run -p 4000:4000 -p 8000:8000 \
269269
-e APOLLO_KEY=$APOLLO_KEY \
270270
-e APOLLO_GRAPH_REF=$APOLLO_GRAPH_REF \
271271
-e MCP_ENABLE=1 \
@@ -280,7 +280,7 @@ Your project includes a pre-configured `mcp.Dockerfile` for easy deployment. Thi
280280
| ---------------------------- | ------------------------------- | -------- |
281281
| `APOLLO_KEY` | Your graph's API key | Yes |
282282
| `APOLLO_GRAPH_REF` | Your graph reference | Yes |
283-
| `APOLLO_MCP_TRANSPORT__PORT` | MCP server port (default: 5000) | No |
283+
| `APOLLO_MCP_TRANSPORT__PORT` | MCP server port (default: 8000) | No |
284284
| `APOLLO_ROUTER_PORT` | Router port (default: 4000) | No |
285285

286286
For more deployment options, see the [Deploy the MCP Server](/apollo-mcp-server/deploy) page.
@@ -312,7 +312,7 @@ After deploying, update your MCP client configuration to use the deployed URL:
312312

313313
**Connection refused errors:**
314314
- Confirm the server is running on the correct port
315-
- Verify firewall settings allow connections to localhost:5050
315+
- Verify firewall settings allow connections to localhost:8000
316316
- For remote connections, ensure the host is set to `0.0.0.0` in your config
317317

318318
**Authentication issues:**

docs/source/run.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ The container sets a few defaults for ease of use:
117117

118118
- **Working Directory is `/data`**: Make sure to mount static schemas / operations to this location
119119
using the volume flag when running [(`-v` / `--volume`)](https://docs.docker.com/reference/cli/docker/container/run/#volume).
120-
- **HTTP Streamable Transport on port 5000**: Make sure to export container port 5000 for HTTP Streamable connections to
120+
- **HTTP Streamable Transport on port 8000**: Make sure to export container port 8000 for HTTP Streamable connections to
121121
the MCP server using the port flag when running [(`-p` / `--port`)](https://docs.docker.com/reference/cli/docker/container/run/#publish)
122122

123123
</Note>
@@ -128,7 +128,7 @@ Run the following Docker command to start the MCP Server, replacing the values f
128128
docker run \
129129
-it --rm \
130130
--name apollo-mcp-server \
131-
-p 5000:5000 \
131+
-p 8000:8000 \
132132
-v <PATH/TO/CONFIG/FILE>:/config.yaml \
133133
-v <PATH/TO/PROJECT/ROOT>:/data \
134134
--pull always \
@@ -139,20 +139,20 @@ This command:
139139

140140
- Starts an MCP Server in a Docker container
141141
- Maps configuration files into the proper place for the Apollo MCP Server container
142-
- Forwards port 5000 for accessing the MCP Server
142+
- Forwards port 8000 for accessing the MCP Server
143143

144144
## With the Apollo Runtime Container
145145

146146
The Apollo Runtime Container runs both the MCP Server and the [Apollo Router](https://www.apollographql.com/docs/graphos/routing) in a single container. It's useful for local development, testing, and production deployments.
147147

148148
The Apollo Runtime container includes all services necessary to serve GraphQL and MCP requests, including the Router and MCP Server. It is the easiest way to operate a GraphQL API with MCP support.
149149

150-
To serve both MCP and GraphQL requests, both port `4000` and `5000` will need to be exposed. An example command which retrieves the schema from Uplink is:
150+
To serve both MCP and GraphQL requests, both port `4000` and `8000` will need to be exposed. An example command which retrieves the schema from Uplink is:
151151

152152
```bash title="Docker" {3, 6}
153153
docker run \
154154
-p 4000:4000 \
155-
-p 5000:5000 \
155+
-p 8000:8000 \
156156
--env APOLLO_GRAPH_REF="<your-graph-ref>" \
157157
--env APOLLO_KEY="<your-graph-api-key>" \
158158
--env MCP_ENABLE=1 \

0 commit comments

Comments
 (0)