Skip to content

Commit d1de174

Browse files
committed
MCP with OAuth is not supported. Only custom header with X-API-Key.
1 parent fa559d0 commit d1de174

4 files changed

Lines changed: 15 additions & 26 deletions

File tree

docs/mcp/planexe_mcp_interface.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,12 @@ At minimum:
416416
- logs may include model prompts/responses → treat logs as sensitive artifacts
417417
- allow a config option to redact prompt content in event streaming
418418

419+
### 10.4 Authentication mode
420+
421+
- MCP authentication is API-key header based.
422+
- Clients should send `X-API-Key: pex_...` on MCP requests.
423+
- OAuth is not supported for the MCP API.
424+
419425
---
420426

421427
## 11. Performance Requirements

mcp_cloud/README.md

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ docker compose up --build mcp_cloud
3535

3636
mcp_cloud exposes HTTP endpoints on port `8001` (or `${PLANEXE_MCP_HTTP_PORT}`). Authentication is controlled by `PLANEXE_MCP_REQUIRE_AUTH`:
3737
- `false`: no API key needed (local docker default).
38-
- `true`: provide a valid `X-API-Key` or `Authorization: Bearer <key>`.
38+
- `true`: provide a valid `X-API-Key`.
3939
Accepted keys are (1) UserApiKey from home.planexe.org (`pex_...`), or (2) `PLANEXE_MCP_API_KEY` if set (for dev or shared secret).
40+
OAuth is not supported for the MCP API.
4041

4142
### Connecting via HTTP/URL
4243

@@ -72,21 +73,6 @@ After starting with Docker, configure your MCP client (e.g., LM Studio) to conne
7273
}
7374
```
7475

75-
**Alternative header format** (also supported):
76-
77-
```json
78-
{
79-
"mcpServers": {
80-
"planexe": {
81-
"url": "https://your-app.up.railway.app/mcp",
82-
"headers": {
83-
"API_KEY": "your-api-key-here"
84-
}
85-
}
86-
}
87-
}
88-
```
89-
9076
Use a UserApiKey from home.planexe.org, or set `PLANEXE_MCP_API_KEY` to a shared secret for local/dev use.
9177

9278
### Available HTTP Endpoints
@@ -176,9 +162,8 @@ Steps:
176162

177163
### Production (with API key authentication)
178164

179-
When auth is enabled, the inspector must send the key
180-
with every request. The inspector proxy forwards the `Authorization` header to
181-
the remote server.
165+
When auth is enabled, the inspector must send the key with every request.
166+
Do not use the inspector OAuth flow for PlanExe MCP.
182167

183168
```bash
184169
npx @modelcontextprotocol/inspector --transport http --server-url https://mcp.planexe.org/mcp/
@@ -187,14 +172,11 @@ npx @modelcontextprotocol/inspector --transport http --server-url https://mcp.pl
187172
Steps:
188173
1. In the inspector UI, expand **"Authentication"** in the left sidebar
189174
2. Select **Custom Headers**
190-
3. Add a header. Either:
191-
- **X-API-Key** → your API key (e.g. `pex_...`)
192-
- or **Authorization**`Bearer pex_...` (include the word `Bearer` and a space)
175+
3. Add header **X-API-Key** with your API key value (e.g. `pex_...`)
193176
4. Click **"Connect"**
194177
5. Click **"Tools"** then **"List Tools"** to verify
195178

196-
The inspector forwards these headers to the remote server, which accepts
197-
`Authorization: Bearer <key>`, `X-API-Key`, or `API_KEY`.
179+
The inspector forwards this custom header to the remote server.
198180

199181
**CORS errors:** If you see "CORS preflight response did not succeed" or "status
200182
code: 400" in the browser console when connecting to a deployed MCP server:

mcp_cloud/http_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ async def _validate_api_key(request: Request) -> Optional[JSONResponse]:
136136
return JSONResponse(
137137
status_code=401,
138138
content={
139-
"detail": "Missing API key. Use Authorization: Bearer <key> or X-API-Key."
139+
"detail": "Missing API key. Use X-API-Key."
140140
},
141141
)
142142

@@ -640,7 +640,7 @@ def root() -> dict[str, Any]:
640640
},
641641
"documentation": "See /docs for OpenAPI documentation",
642642
"authentication": (
643-
"Required: X-API-Key or Authorization: Bearer <key> (UserApiKey from home.planexe.org, "
643+
"Required: X-API-Key (UserApiKey from home.planexe.org, "
644644
"or PLANEXE_MCP_API_KEY)"
645645
if AUTH_REQUIRED
646646
else "Disabled (PLANEXE_MCP_REQUIRE_AUTH=false)"

public/llms.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ Cloud:
8181
2. Go to Account -> API Keys
8282
3. Generate a new API key
8383
4. Use as custom header X-API-Key: <API_KEY>
84+
5. OAuth is not supported for the MCP API. Use custom headers only.
8485

8586
Local/self-hosted deployments:
8687
- Often configured without auth for local development.

0 commit comments

Comments
 (0)