opentokenz/mcpx
MCPX 是运行在开发环境中的 MCP Runtime(网关)。ChatGPT、Claude、Cursor、Grok 及其他支持 Streamable HTTP 的 MCP 客户端,可以通过统一工具面理解项目、查看 Unified Diff、修改源码、运行任务、采集环境信息,并调用本地 MCP 与 Skill。
What it solves
MCPX is a local MCP (Model Context Protocol) Runtime and gateway designed to securely expose a developer's local environment—including workspaces, source code, terminal commands, and system capabilities—to AI clients like ChatGPT, Claude, Cursor, and Grok. It solves the problem of providing AI models with a reliable, auditable, and stateful way to interact with local development assets without sacrificing security or losing context across different client sessions.
How it works
MCPX acts as a middleware between the AI client and the local machine. It uses Streamable HTTP to communicate with clients and manages state via a SQLite database. Key mechanisms include:
- Remote Sessions: It uses
remote_session_idto persist workspace state, permissions, and history, allowing a model to resume work across different connections or clients. - Workspace Management: Users register specific project directories as Workspaces, which the runtime then binds to sessions.
- Tool Orchestration: It provides a set of core tools for reading files (with SHA-256 verification), editing files (using idempotent replacements), executing terminal commands (with a security policy engine), and managing project tasks.
- Security Layer: It implements a strict security policy for commands (allow/confirm/deny) and files, supporting OAuth, Bearer tokens, and ACLs for remote access.
- Extension System: It can discover and integrate local "Skills" and upstream MCP servers, providing a unified interface for the model to call these tools.
Who it’s for
- AI-assisted developers who want to give LLMs deep, secure access to their local codebase and terminal.
- Teams needing an auditable trail of how an AI agent modified their source code or executed commands.
- Power users of MCP-compatible clients (ChatGPT, Claude, etc.) who want a persistent, professional-grade local runtime.
Highlights
- Stateful Continuity: Supports resuming sessions across different AI clients using persistent IDs.
- High-Precision Editing: Uses SHA-based revision guards and precise replacements to avoid corrupting files.
- Safe Deletion: Implements a two-stage
move_outprocess (prepare $\rightarrow$ confirm $\rightarrow$ submit) that moves files to the system trash rather than permanent deletion. - Security-First Execution: A granular command policy engine that requires user confirmation for risky operations (e.g.,
git push,docker). - Extensible Architecture: Seamlessly integrates with other MCP servers and custom local skills.
- Environment Awareness: Provides the model with detailed metadata about the OS, architecture, and toolchains.
Related
- Project
- Project
- Project
- Project
- Dispatch