-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
enhancementNew feature or requestNew feature or requestmcpsdkIssues related to the Codex SDKIssues related to the Codex SDK
Description
What feature would you like to see?
Background
The CLI already ships codex mcp ... subcommands to list, add/remove, and log into MCP servers. The TypeScript SDK, however, only consumes streamed events and lacks management capabilities. We’d like to reuse the same API surface in Node/plugin environments by exposing MCP controls from the SDK.
Proposal
- Introduce
codex.mcp.*APIs (list / get / add / remove / login / logout / enable / disable / enableOnce / disableOnce) that reuse the existing CLI binary under the hood. - Extract shared helpers for resolving the CLI binary and applying
--configoverrides so bothCodexExecand MCP helpers share the same code path. - For behaviour not covered by CLI subcommands (e.g. permanently toggling
enabled/enabled_tools), mirror the CLI’s TOML write logic inside the SDK to keep semantics aligned. - Add documentation and sample code showing typical usage, plus unit tests covering MCP management.
Additional information
Status
A working prototype already lives on my fork: codex.mcp APIs, a sample (samples/mcp_management.ts), and a dedicated test (pnpm test -- mcp.test.ts). Before raising a PR, I’d like to confirm the change fits your roadmap and whether any additional design or compatibility considerations are needed.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestmcpsdkIssues related to the Codex SDKIssues related to the Codex SDK