google/capsem/dev-mcp
Claude Code and agent skill by google/capsem
- vendor
Checking that the SKILL.md file is still in the repository.
MCP for Capsem: the SDK-backed npm host server, guest relay, and tool routing. Use when working on MCP servers, tool policy, telemetry, or in-VM debugging.
Install
npx vskill@latest install google/capsem/dev-mcpSKILL.md
The same SKILL.md was published earlier as google/capsem/dev-mcp.
MCP in Capsem
Capsem has two MCP entry points:
- `@capsem/mcp` (host): a standalone TypeScript stdio server. It presents typed tools and uses
@capsem/sdkfor authenticated gateway HTTP. It does not open the service UDS, discover local services, or read VM runtime state. - Guest MCP relay + confined proxy endpoint: bridges AI agents inside a VM to built-in and external MCP servers through bounded framed records on vsock port 5002.
The native installer does not install Node.js or download the npm host package. The guest relay, aggregator, and built-in Rust components remain native product components.
Using the npm MCP tools for fast debugging
Install and register the package with an explicit gateway URL, bearer token, and transport timeout:
The token comes from CAPSEM_GATEWAY_TOKEN or --token-file; --token is refused because argv is world-readable. The bearer token belongs only to the host MCP process; never copy it into a VM, container, guest tool argument, or workload. stdout is protocol-only and sanitized diagnostics use stderr.
The current registry is defined in mcp/typescript/src/host-tools.ts, network-tools.ts, and mcp-tools.ts. Parameters follow the TypeScript SDK names, including vm_id, vcpu, memory, env, and timeout_secs. Canonical tools include capsem_pause and capsem_status; the retired capsem_suspend, capsem_version, and duplicate capsem_service_logs names are not exposed.
The host tools cover:
- VM lifecycle, one-shot execution, persistence, files, statistics,
logs, timelines, panic extraction, and triage.
- Private network lifecycle, membership, and cursor-based audit logs.
- Typed MCP server discovery, refresh, permission inspection, and invocation
through the running VM's existing relay and security engine.
Debug workflow
The --timeout-ms option bounds the SDK HTTP request. timeout_secs on execution tools bounds the guest command. Cancellation closes the local request; it does not delete the VM or undo an accepted mutation. The SDK does not retry mutations.
When to use MCP tools vs just recipes
| Scenario | Use | |
|---|---|---|
| Targeted guest behavior | capsem_exec | |
| Read a guest file | capsem_read_file | |
| Inspect typed audit evidence | capsem_timeline, statistics, and network logs | |
| Run capsem-doctor | capsem_exec | |
| Full regression suite | just test | |
| Focused native validation | just focus-test functional |
npm host MCP server
The npm process owns tool presentation and typed input/output only. The gateway authenticates control requests. The service, VM owner, security engine, and logger retain lifecycle, trusted identity, policy, credentials, and audit storage. The npm process receives no virtualization entitlement, registry credential, CA private key, direct database access, or service socket access.
Key source files
| File | Purpose | |
|---|---|---|
mcp/typescript/src/cli.ts | Protocol-only stdio executable | |
mcp/typescript/src/server.ts | SDK client and tool registration | |
mcp/typescript/src/host-tools.ts | VM, file, and diagnostic tools | |
mcp/typescript/src/network-tools.ts | Private network tools | |
mcp/typescript/src/mcp-tools.ts | MCP server discovery and calls | |
mcp/typescript/src/results.ts | Structured results and sanitized errors | |
sdk/typescript/src/ | Typed gateway client and validators |
MCP subprocess architecture
The guest MCP path is not a single process. The per-session capsem-proxy owns the guest-facing framed endpoint, MCP policy, and ledger admission. capsem-process owns a scoped adapter to the aggregator and VM exposure tools; it cannot reopen the session ledger and the proxy cannot reach the aggregator except through that granted connected channel. The service supervises two confined native workers behind the adapter:
| Crate | Role | Privileges | |
|---|---|---|---|
capsem-mcp-aggregator | Parses MCP transports and routes tools over a connected MessagePack RPC channel. | Inherited HTTP/2 capability for configured endpoints and a narrow builtin-peer spawn channel; no ambient files, direct network, credentials, execution, signals, VM or ledger authority. | |
capsem-mcp-builtin | Implements HTTP tools (fetch_http, grep_http, http_headers) and echo over a connected MCP channel. | Inherited HTTP capability only. The service performs current URL/address policy and credential handling; HTTP ledger facts return in _meta dev.capsem/ledger. No policy-file or database access. |
Rationale: isolating external-server connections in a low-privilege subprocess means a compromised third-party MCP server cannot reach the host filesystem or the session DB. The built-in tool server runs in its own process for the same reason.
The shared capsem-mcp-transport crate owns connected HTTP capabilities and role bootstrap; it stays independent of VM core, policy, credentials and RMCP. The service supplies role/incarnation bootstrap records and connected descriptors. Each native entrypoint clears inherited environment/descriptors, prepares a current-thread runtime, installs Seatbelt on macOS or Landlock plus seccomp on Linux, and attests denial before acknowledging readiness. Parent watching starts after confinement. Linux aggregator/builtin profiles allow threads but deny forked processes; approved external executable profiles must retain their own sandbox.
The owner receives one full-duplex RPC descriptor, never native child handles. MessagePack framing is [4-byte big-endian length][payload]; builtin MCP uses JSON-RPC lines over its own connected descriptor. Use async stream halves in both directions: stdin adoption sets nonblocking flags, so a blocking stdout adapter over a duplicate descriptor fails under backpressure.
The service owns destinations, current policy, credentials and process reaping. Refresh preserves inherited capabilities. HTTP streams cancel on policy changes or retirement; generation completion awaits broker cleanup and positively reaped native children. Separate PIDs, parent watchers or kill_on_drop alone are not that completion proof.
Settings configure external HTTP servers; there is no public arbitrary host stdio command/file-grant setting. The native spawn broker accepts only predefined builtin peer indices. New external stdio support needs explicit executable/file grants under McpExternal, never the trusted companion with no-sandbox rule.
/run/capsem-mcp-server relays guest JSON-RPC as bounded frames over vsock 5002. The proxy evaluates policy before invoking the scoped owner adapter. Tool facts reach tool_calls through the proxy's typed ledger capability; the native MCP workers never open the ledger.
Binaries land in ~/.capsem/bin/ at install time: capsem-mcp-aggregator, capsem-mcp-builtin.
Guest MCP Endpoint
The guest MCP relay bridges AI agents in the guest VM to the confined proxy endpoint. It runs over vsock port 5002 using bounded length-prefixed MCP frames that carry JSON-RPC payloads and per-frame process attribution.
Framed guest MCP over vsock:5002 must be tested as the default transport, not as an opt-in benchmark mode. The minimum hardening matrix for that path is:
- parser/interpreter: bounded frames, invalid JSON, malformed flags, stream-id reuse, notification/request-id mismatch
- dispatch:
initialize,tools/list, builtintools/call, configured external HTTPtools/call,resources/list,prompts/list, and method error mapping - policy: live policy mutation, per-tool block, resource URI rule, argument-name rule, argument-value rule, return-value rule, deny-over-allow precedence, and proof that blocked requests/responses do not leak original data
- telemetry:
session.dbrows for success, denial, timeout, process attribution, request/response previews, policy fields, and terminal errors - boundary: aggregator and VM owner remain DB-free;
capsem-proxywrites MCP
audit facts through its role-bound ledger capability
- VM E2E: boot a real VM, run
/run/capsem-mcp-serverwith no transport
override, then inspect the typed timeline/ledger routes
Architecture
Workloads: streamable HTTP at mcp.capsem.internal
An OCI workload cannot open vsock (seccomp), so it reaches the same endpoint over HTTP: POST http://mcp.capsem.internal/mcp, one JSON-RPC message per request (200 with the answer, 202 for notifications, 405 for GET/DELETE). The host DNS answers that one name in every VM with 192.0.2.1 before any private-network member is asked, and never upstream. The VM's port-80 rule carries the connection to the MITM proxy, where mitm_proxy/mcp_http.rs claims it before HTTP policy, body sniffing or any dial and hands it to mcp_frame::dispatch_http_message -- the framed path's parser, in-flight bound, MCP security rail and tool_calls ledger, with transport = 'http' and the connection's process name. Attribution is the proxy instance: one per VM, with that VM's endpoint and session ledger. Every other name in capsem.internal, and the MCP name on a non-default port, is refused with a capsem.internal.reserved net event. The official images configure their agent's capsem server at that URL (images/*/Dockerfile).
Wire format
Length-prefixed MCP frames over vsock. Each frame contains a bounded JSON-RPC payload plus a stream id, flags, and sanitized process name.
Handshake
Guest sends NUL-prefixed metadata line first:
Then JSON-RPC messages:
Tool namespacing
Tools are namespaced with __ (double underscore) to prevent collisions:
github+search_repos->github__search_reposbuiltin+http_get->builtin__http_get
The endpoint parses the namespace to route to the correct server.
Supported methods
| Method | Behavior | |
|---|---|---|
initialize | Return protocol version + capabilities | |
notifications/initialized | Notification (no response) | |
tools/list | Return builtin + all external server tools | |
tools/call | Policy check -> route to server -> call via rmcp | |
resources/list | Return resource catalog from all servers | |
resources/read | Lookup URI -> read via rmcp | |
prompts/list | Return prompt catalog | |
prompts/get | Lookup name -> get via rmcp |
Security evaluation
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files. Certified 17 Jun 2026.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/dev-mcp/SKILL.md
Popularity
- Repository stars
- 56
- Repository forks
- 8
- 7-day trend score
- 20
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/google/capsem/dev-mcp)