@mredwin1/mcp-codex-bridge
v1.1.1
Published
Codex stdio bridge for the hosted LeadStream MCP server.
Readme
@mredwin1/mcp-codex-bridge
Codex stdio bridge for the hosted LeadStream MCP server.
Use this when Codex runs long LeadStream automations and must keep OAuth access tokens fresh without requiring a LeadStream repository checkout.
Codex Config
[mcp_servers.leadstream]
command = "npx"
args = ["-y", "@mredwin1/mcp-codex-bridge"]
[mcp_servers.leadstream.tools.tags_list]
approval_mode = "approve"For pinned automation:
[mcp_servers.leadstream]
command = "npx"
args = ["-y", "@mredwin1/mcp-codex-bridge@<version>"]Noninteractive Codex runs must approve the exact LeadStream tools the automation is allowed to call. Keep write-tool approvals scoped to the reviewed automation.
Behavior
- Reads the existing LeadStream OAuth credential from Codex's credential file.
- Refreshes before access-token expiry.
- Retries once after an MCP
401. - Reinitializes and retries once after the hosted MCP session expires.
- Persists rotated access and refresh tokens back to the Codex credential file.
- Probes
server/discoverand forwards MCP 2026-07-28 requests as sessionless single exchanges withMcp-Method,Mcp-Name, and per-request metadata. - Adapts the local Codex handshake to the modern result and falls back to the
legacy
initialize/Mcp-Session-Idflow when discovery is unavailable. - Does not print access tokens, refresh tokens, or authorization headers.
Environment
CODEX_HOME: overrides Codex home. Defaults to~/.codex.LEADSTREAM_MCP_CREDENTIAL_PATH: explicit Codex credential file path.LEADSTREAM_MCP_REMOTE_URL: hosted MCP URL override.LEADSTREAM_MCP_TOKEN_ENDPOINT: OAuth token endpoint override.LEADSTREAM_MCP_PROTOCOL_MODE:auto(default),modern, orlegacyto force the rollback path while a hosted deployment is being reverted.
Requirements
Node.js 20 or newer.
