HTTP MCP credential setup#
Endpoint, trust, and credential choice#
Use a trusted HTTPS MCP URL, either supplied explicitly, already configured by the host, or
advertised by authenticated GeoNeMo server GET /v1/discovery. Examples use
https://geonemo.example.com/mcp; substitute the deployment’s URL. API tokens target
https://geonemo.example.com; MCP tokens target the full MCP resource. Tokens are opaque; do not decode them to guess an audience.
Trust the deployment’s certificate chain through the actual client’s supported approved CA mechanism. An HTTP probe using a Python CA bundle does not prove that an editor trusts the same chain. Do not disable verification, install an arbitrary CA, or hardcode a temporary bundle path.
Reuse existing authorization first. Missing credentials can be obtained through native OAuth, or through Console → Access by choosing audience MCP for a headless personal token. A native OAuth client follows advertised protected-resource/authorization-server metadata, uses PKCE, and manages its own refresh store. The skill does not implement registration, callbacks, or token exchange. If the client cannot complete the advertised flow, report the incompatibility and offer the supported personal-token route; do not claim OAuth interoperability from metadata.
services:read is required for MCP access. Add tools:execute when the requested work needs
tool execution, and gkb:publish, agents:control, or connections:manage only for the
corresponding operations. Setup verification executes none of those workflows.
Codex#
For a new OAuth connection:
codex mcp add geonemo-services --url https://geonemo.example.com/mcp
codex mcp login geonemo-services --scopes services:read
For a new headless personal-token connection, have the host securely inject an MCP token into
GEONEMO_MCP_TOKEN in the Codex process environment, then configure its reference:
codex mcp add geonemo-services --url https://geonemo.example.com/mcp --bearer-token-env-var GEONEMO_MCP_TOKEN
Equivalent user-level TOML in the host’s Codex config directory:
[mcp_servers.geonemo-services]
url = "https://geonemo.example.com/mcp"
bearer_token_env_var = "GEONEMO_MCP_TOKEN"
For an existing server, inspect its non-secret settings and update only that server entry;
do not blindly re-add it or replace the config file. A selected static bearer takes precedence
over stored OAuth in Codex, so stale bearer configuration can prevent a working OAuth grant from
being used. codex mcp get geonemo-services --json and codex mcp list inspect configuration;
they are not authenticated initialization or tool-discovery evidence. Verify through the client
connection status and actual MCP discovery. If environment injection or config updates require
a new process/session, verify from that new client rather than an old chat’s tool snapshot.
Cursor and generic clients#
Use Cursor’s existing OAuth connection UI for an OAuth server. For a headless personal token,
configure a reference in user-level ~/.cursor/mcp.json and have the host provide the process
environment variable before Cursor starts:
{
"mcpServers": {
"geonemo-services": {
"url": "https://geonemo.example.com/mcp",
"headers": {"Authorization": "Bearer ${env:GEONEMO_MCP_TOKEN}"}
}
}
}
Preserve other server entries. Use only the intended OAuth or bearer source for this server.
Remote Cursor servers do not support envFile; use a supported secret/environment mechanism.
See Cursor MCP guidance.
Other clients can use native MCP OAuth or host-supplied Authorization: Bearer … from an MCP
secret reference. Adapt configuration keys to the client rather than assuming Codex TOML or
Cursor JSON is a universal schema. Avoid raw hand-built MCP requests where the host has a
supported client; the client owns negotiation and session lifecycle.
Verification and the stdio exception#
Require successful initialize and tools/list through the configured client before declaring
HTTP MCP setup complete. Public metadata proves only advertised authentication support. Preserve
the server identity/protocol and available tool names; do not fabricate user identity or scopes
when those are absent from the MCP response. Report API and MCP results independently.
The optional geonemo-mcp stdio bridge uses API credentials from the GeoNeMo CLI store or
its explicit GEONEMO_SERVICES_TOKEN override. It calls the API rather than authenticating to the
HTTP MCP resource. Route its credential setup to the API workflow and verify stdio discovery
through the selected host client. This exception does not authorize swapping tokens on HTTP MCP.