oceanbase / oceanbase/powercontext
bug: authenticated Codex MCP probe fails on /mcp URL redirect
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 214
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 199
Description
Describe the bug
The Codex MCP integration fails to discover the PowerContext tools when the configured Streamable HTTP URL is http://127.0.0.1:8000/mcp and the Server requires Bearer authentication. The canonical endpoint with a trailing slash, http://127.0.0.1:8000/mcp/, works correctly.
The failure is especially confusing because authorization itself can be configured correctly, while the native MCP probe still reports that remember_memory and search_memory are unavailable.
Steps to reproduce
- Run PowerContext Server on Windows with enforced Bearer authentication and MCP enabled.
- Configure the Codex integration with:
http://127.0.0.1:8000/mcp - Set
POWERCONTEXT_CODEX_AUTHORIZATIONto a validBearer <token>value. - Restart Codex and run
powercontext doctor codex. - Observe that authorization is reported as configured, but required MCP tools are not discovered.
- Connect directly to
http://127.0.0.1:8000/mcp/and perform the MCPinitializeandtools/listrequests with the same credential.
Expected behavior
The generated Codex MCP configuration should use the canonical endpoint, or the Server/client combination should handle /mcp and /mcp/ equivalently while preserving the Authorization header. The native Codex probe should discover the PowerContext tools.
Actual behavior
The /mcp request is redirected to /mcp/. In the affected client path, the redirected request does not preserve the Authorization header and returns 401 Unauthorized. Using /mcp/ directly succeeds: MCP initialization completes and tools/list returns the expected tools, including remember_memory and search_memory.
Observed diagnostic state:
authorization: ok
current_process: configured
mcp tools: failed - Codex native MCP did not discover required tools: remember_memory, search_memory
Environment
- PowerContext: 3.4.4
- OS: Windows
- Transport: Streamable HTTP
- Server URL configured by the Codex integration:
http://127.0.0.1:8000/mcp - Working endpoint:
http://127.0.0.1:8000/mcp/
Are you willing to submit a PR to fix this bug?
- Yes, I would like to submit a PR.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Codex integration that generates the MCP configuration and the code behind powercontext doctor codex; reproduce the probe using /mcp and /mcp/ with Bearer authentication. Done means the configured endpoint works through the redirect or uses the canonical trailing-slash URL, preserves authorization, and discovers remember_memory and search_memory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100