opentokenz/mcpx

MCPX 是运行在开发环境中的 MCP Runtime(网关)。ChatGPT、Claude、Cursor、Grok 及其他支持 Streamable HTTP 的 MCP 客户端,可以通过统一工具面理解项目、查看 Unified Diff、修改源码、运行任务、采集环境信息,并调用本地 MCP 与 Skill。

What it solves

MCPX provides a secure, auditable, and persistent gateway (MCP Runtime) for local development environments. It allows AI clients like ChatGPT, Claude, Cursor, and Grok to interact with local workspaces, source code, terminals, and external MCP servers without sacrificing security or losing session state across different client connections.

How it works

MCPX acts as a middleware between the AI client and the local machine. It uses a Streamable HTTP transport to expose a set of core and support tools to the model. Key mechanisms include:

  • Remote Sessions: It uses a remote_session_id persisted in SQLite to maintain state (roles, permissions, tasks, and plans) across different client connections.
  • Workspace Management: Users register local project directories as Workspaces, which the runtime then binds to specific sessions.
  • Controlled Access: It implements a strict security policy for commands and files (allow/confirm/deny) and uses a two-stage "prepare and submit" flow for destructive operations like deleting files (moving them to the system trash instead of permanent deletion).
  • Tool Orchestration: It provides a unified interface for reading files (with SHA-256 checksums for consistency), editing files via precise replacements, executing terminal commands, and managing long-running tasks.
  • Extension Integration: It manages local "Skills" and upstream MCP servers, handling their revisions and schemas internally to ensure the model always uses the correct version.

Who it’s for

Developers who want to give AI agents deep, secure access to their local codebase and system tools while maintaining a full audit trail and the ability to recover sessions across different AI interfaces.

Highlights

  • Persistent State: Remote sessions allow models to resume work across different clients using a consistent session ID.
  • Security First: Granular command policies and a mandatory two-stage confirmation process for file removals.
  • Auditability: All tool calls, terminal tasks, and file edits are logged and observable via a local socket or the observe tool.
  • Model-Friendly Protocol: Uses SHA-256 revision guards for file edits and structured "Activity" tracking to separate intent from execution.
  • Broad Integration: Supports OAuth 2.1 + PKCE for secure remote access from web-based AI clients like ChatGPT.

Related

  • Project
  • Project
  • Project
  • Project
  • Project