Skip to content

Context7 Platform -- Up-to-date docs for AI agents

docs: explain MCP HTTP GET/SSE behavior and Codex setup conflicts (#3372)

context7[bot]6dfa6d150b82
diff --git a/docs/clients/codex.mdx b/docs/clients/codex.mdx
index 8b5a8eff..085ac5e5 100644
--- a/docs/clients/codex.mdx
+++ b/docs/clients/codex.mdx
@@ -126,4 +126,8 @@ How does Supabase storage work?
<Accordion title="Startup timed out or program not found">
If you see a startup "request timed out" or "not found program" error, increase `startup_timeout_ms` to `40_000` and retry. On Windows, point `command` at the absolute `npx.cmd` path and set `SystemRoot` and `APPDATA` explicitly — `npx` requires them, but some Codex MCP clients don't set them by default.
</Accordion>
+
+<Accordion title="Setup fails on an existing config.toml entry">
+Running `ctx7 setup --codex --mcp --stdio` updates the `args` of an existing `[mcp_servers.context7]` table in `~/.codex/config.toml` instead of replacing it, so a pinned or customized `@upstash/context7-mcp` version is preserved. If that table exists but its `args` never invoke `@upstash/context7-mcp`, setup cannot tell it is the Context7 server and stops with `Existing MCP args do not invoke @upstash/context7-mcp`, leaving the file unchanged. Point `args` at the package (for example `args = ["-y", "@upstash/context7-mcp"]`), or remove the `[mcp_servers.context7]` table and run setup again.
+</Accordion>
</AccordionGroup>
diff --git a/docs/resources/developer.mdx b/docs/resources/developer.mdx
index d64e6dd9..22487155 100644
--- a/docs/resources/developer.mdx
+++ b/docs/resources/developer.mdx
@@ -56,6 +56,8 @@ Opaque OAuth access tokens (`oat_…`) are checked against the Context7 API befo
OAuth JWT access tokens from the authorization server (`OAUTH_AUTH_SERVER_URL`) are verified locally: signature against its JWKS, issuer, a `typ` of `at+jwt`, and expiry with a minute of clock tolerance. Clerk ID tokens and session JWTs share that issuer but are not access tokens, so they are always rejected. The token's `aud` must name this server (`RESOURCE_URL` origin, `/mcp`, or `/mcp/oauth`; override with a comma-separated `MCP_OAUTH_ALLOWED_AUDIENCES`). The query string of an audience on an allowed host is ignored. `MCP_OAUTH_AUDIENCE_ENFORCEMENT` sets what a mismatch does: `observe` (default) admits a token with a missing or foreign audience; `foreign` answers HTTP 401 to a token issued for another server and still admits one with no `aud`; `required` answers 401 to both. Every mismatch is logged with the OAuth client ID, the audience and the outcome, once per token per hour on each replica.
+The HTTP server is stateless — it creates a fresh server instance per request and keeps no session state. Session operations therefore have nothing to attach to: a `GET` or `DELETE` on `/mcp` is answered with `405 Method Not Allowed` rather than opening a standalone Server-Sent Events stream. Server-Sent Events are used only to stream responses to `POST` requests, and keepalive heartbeats are disabled.
+
Stdio transport with API key:
```bash