@isan3/projectmesh
v0.2.12
Published
Local AI engineering platform that lets ChatGPT plan inside .projectmesh while Codex implements code changes later.
Maintainers
Readme
Projectmesh
Projectmesh is a local AI engineering platform that cleanly splits responsibilities to double (~2x) your AI usage/token efficiency:
- Architect Mode: AI clients (ChatGPT, Claude, Cursor, Copilot, etc.) inspect your repository and write only inside
.projectmesh/using the Model Context Protocol (MCP) instead of constantly processing massive codebases. - Executor Mode: Local tools (e.g., Claude Code, Codex, Gemini) consume lightweight
.projectmeshtask packets to make code changes directly, reading only the affected files. - Projectmesh exposes your local MCP server over
localhost:3334and can tunnel it throughngrok.
Install
Global install:
npm install -g @isan3/projectmeshbun add -g @isan3/projectmeshOne-off execution:
npx @isan3/projectmesh setup /absolute/path/to/repobunx @isan3/projectmesh setup /absolute/path/to/repoOne-command setup
This is the main happy path:
projectmesh setup /absolute/path/to/repoIf you are already standing in the repository root, this also works:
projectmesh setupWhat it does:
- Registers the repository workspace in the platform configuration
- Creates the
.projectmesh/workspace if it does not exist yet - Generates
.projectmesh/architecture.md - Installs or reuses
ngrokon supported macOS/Linux systems - Prompts you to run:
ngrok config add-authtoken $YOUR_TOKENGet your token here:
https://dashboard.ngrok.com/get-started/your-authtoken
- Starts the local MCP HTTP server on
http://127.0.0.1:3334/mcp - Starts
ngrok http 3334in the background - Starts the Projectmesh dashboard on
http://127.0.0.1:3335 - Prints the final public MCP URL
AI Handoff Workflow: Architect & Executor
Projectmesh is designed as a repository-native collaboration layer that enables a structured handoff between AI agents:
Architect Mode (e.g., ChatGPT, Claude):
- The architect AI client connects via the Projectmesh MCP server.
- It inspects repository structure and writes/plans tasks inside
.projectmesh/tasks/active.md(using thecreate_task/update_tasktools). - It documents decisions in
.projectmesh/decisions.mdand durable memory in.projectmesh/memory.md.
Handoff Generation:
- Once a task is ready, the Task Packet is generated:
(This can also be invoked by the architect agent using theprojectmesh packetget_task_packetMCP tool). - This creates a self-contained context document at
.projectmesh/context/active-packet.mdthat bundles:- Active task details and criteria.
- High-level repository architecture, decisions, and style guide.
- The actual source code of all files listed under
Affected Files(safely truncated if files are too large or binary).
- Once a task is ready, the Task Packet is generated:
Agent Execution (Secure Handoff):
- The Architect agent can request local task execution via the
execute_task_agentMCP tool (specifying an executor likeclaude,gemini, orcodex). - For security, the MCP server registers a pending execution request in
.projectmesh/tasks/pending-execution.jsonrather than running commands automatically. - To approve and run the execution locally, the user runs:
projectmesh execute - Projectmesh will resolve the command, ask for confirmation, and run the agent in the foreground (e.g. allowing interactive shells for tools like Claude Code).
- Alternatively, you can directly launch an executor manually via the CLI:
projectmesh execute claude
- The Architect agent can request local task execution via the
Execution Review & Tracking:
- Once the executor finishes, Projectmesh automatically captures the execution duration, exit code, and git changes.
- It writes a durable markdown report in
.projectmesh/reviews/execution-report-<timestamp>.mdto track changes and results, maintaining history inside your repository.
Multi-Repository Workspace Registry & Session Isolation
Projectmesh supports registering multiple workspaces and isolating them across different AI chat sessions or connections:
Multi-Repository Registry:
- You can register multiple repositories by running:
projectmesh new /absolute/path/to/repo # or projectmesh use /absolute/path/to/repo - The server tracks all registered workspaces in
~/.projectmesh/repos.json.
- You can register multiple repositories by running:
Session-Level Isolation:
- Different chat threads or client connections can connect to the same Projectmesh MCP server concurrently.
- Each connection has its own isolated session context (mapped via a unique
sessionIdquery parameter or path segment in the HTTP MCP URL, e.g.,/mcp?sessionId=thread-123). - One session can be targeting
repo-Awhile another session targetsrepo-Bconcurrently with zero context leakage.
Workspace MCP Tools:
list_workspaces: Returns all registered workspaces, showing their registration paths and identifying the workspace currently active for the caller's session.switch_workspace: Dynamically switches the workspace context for the current chat session to another registered repository using its ID or path.git_command: Runs arbitrary git commands (e.g.status,diff,add,commit,push,stash) in the target workspace context. Operations likemerge,rebase, and force flags (--force,-f) are strictly blocked for security.
Commands
Main CLI:
projectmesh new
projectmesh new /absolute/path/to/repo
projectmesh use /absolute/path/to/repo
projectmesh status
projectmesh analyze
projectmesh setup /absolute/path/to/repo
projectmesh start
projectmesh stop
projectmesh share
projectmesh packet
projectmesh mcp-http
projectmesh dashboard
projectmesh ngrok config
projectmesh ngrok edit
projectmesh ngrok auth
projectmesh ngrok auth <token>Aliases:
pmesh status
projectmesh-new
projectmesh-start
projectmesh-stop
projectmesh-status
projectmesh-dashboard
projectmesh-mcp-server
projectmesh-mcp-http mcp-http
projectmesh-share shareHow AI clients connect (ChatGPT, Claude, Cursor, etc.)
Projectmesh exposes MCP over HTTP at:
http://127.0.0.1:3334/mcpWhen you run projectmesh share, it starts both background services and prints a public URL like:
https://example.ngrok.app/mcpThat is the URL you can paste into your AI client's MCP configuration (e.g., ChatGPT Custom Actions, Claude desktop config, Cursor, or Copilot).
The local dashboard runs here:
http://127.0.0.1:3335It shows:
- how many registered projects are ready for AI client access
- which project is active
- the local and public MCP URLs
- repo-local
.projectmeshstatus - ngrok settings and token management
Security note
Right now the shared MCP endpoint has no OAuth or other auth layer.
Do not expose or leak your ngrok URL.
Treat that URL like a temporary secret.
Background services
projectmesh start, projectmesh share, and projectmesh setup start these services in the background:
- local dashboard on port
3335 - local MCP HTTP server on port
3334 ngroktunnel for port3334
Stop them later with:
projectmesh stopSee current state with:
projectmesh statusProjectmesh stores runtime state under:
~/.projectmesh/This includes repo registration, logs, cached binaries, and running-service metadata.
Local development
bun install
bun run test
bun run buildPackage structure
src/workspace.ts: workspace confinement and.projectmesh-only write policysrc/ai-workspace.ts: task, review, memory, decision, and architecture document flowssrc/repository-analysis.ts: repository analysis and project contextsrc/git.ts: fixed-argument git readers with no shell executionsrc/mcp-server.ts: stdio MCP server for local MCP hosts and session-isolated tool executionsrc/share.ts: localhost HTTP MCP server, ngrok install flow, and background service managementsrc/platform-config.ts: repository registration registry (repos.json) and active workspace matching
