Build with your coding agent
npx -y @offline-protocol/cli mcp serveConnect Claude Code, Codex, Cursor, Gemini CLI, VS Code with Copilot, or any other MCP client to the Offline Protocol MCP server. Your agent reads the package registry, the integration skills, and the reference workflows, plans the app, and scaffolds it instead of guessing at the SDK. Run the server locally through the CLI with no key, or use the hosted one with an application API key.
Illustration: a developer asks their coding agent for a nearby chat app for a festival crew in React Native. The agent calls four Offline Protocol MCP tools in order: generate_architecture picks the nearby-chat workflow and a React Native mesh template, preview_scaffold plans 27 files without writing, scaffold_project writes the project, and get_skill reads the mesh networking guide before any SDK code. Beside it, the project the agent wrote.
A real run against the local server. The agent plans from the registry, previews, writes the project, and reads the skill before it touches SDK code.
Connect your agent
Pick your client. Local runs the server on your machine through npx, with no login and no key. Hosted connects to mcp.offlineprotocol.com with an application API key.
$ claude mcp add offline-protocol -- \
npx -y @offline-protocol/cli mcp serve # OFFLINE_API_KEY holds an application API key
$ claude mcp add --transport http offline-protocol \
https://mcp.offlineprotocol.com/mcp \
--header "Authorization: Bearer $OFFLINE_API_KEY" \
--header "x-app-id: app_your_application_id" $ codex mcp add offline-protocol -- \
npx -y @offline-protocol/cli mcp serve [mcp_servers.offline-protocol]
url = "https://mcp.offlineprotocol.com/mcp"
bearer_token_env_var = "OFFLINE_API_KEY"
http_headers = { "x-app-id" = "app_your_application_id" } {
"mcpServers": {
"offline-protocol": {
"command": "npx",
"args": ["-y", "@offline-protocol/cli", "mcp", "serve"]
}
}
} {
"mcpServers": {
"offline-protocol": {
"url": "https://mcp.offlineprotocol.com/mcp",
"headers": {
"Authorization": "Bearer ${env:OFFLINE_API_KEY}",
"x-app-id": "app_your_application_id"
}
}
}
} {
"servers": {
"offline-protocol": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@offline-protocol/cli", "mcp", "serve"]
}
}
} {
"inputs": [{
"type": "promptString",
"id": "offline-api-key",
"description": "Offline Protocol application API key",
"password": true
}],
"servers": {
"offline-protocol": {
"type": "http",
"url": "https://mcp.offlineprotocol.com/mcp",
"headers": {
"Authorization": "Bearer ${input:offline-api-key}",
"x-app-id": "app_your_application_id"
}
}
}
} {
"mcpServers": {
"offline-protocol": {
"command": "npx",
"args": ["-y", "@offline-protocol/cli", "mcp", "serve"]
}
}
} {
"mcpServers": {
"offline-protocol": {
"httpUrl": "https://mcp.offlineprotocol.com/mcp",
"headers": {
"Authorization": "Bearer $OFFLINE_API_KEY",
"x-app-id": "app_your_application_id"
}
}
}
} {
"mcpServers": {
"offline-protocol": {
"command": "npx",
"args": ["-y", "@offline-protocol/cli", "mcp", "serve"]
}
}
} {
"mcpServers": {
"offline-protocol": {
"serverUrl": "https://mcp.offlineprotocol.com/mcp",
"headers": {
"Authorization": "Bearer YOUR_API_KEY",
"x-app-id": "app_your_application_id"
}
}
}
} {
"mcpServers": {
"offline-protocol": {
"command": "npx",
"args": ["-y", "@offline-protocol/cli", "mcp", "serve"]
}
}
} Use the local server. Claude Desktop’s configuration cannot send the two headers the hosted server needs.
command npx
args -y @offline-protocol/cli mcp serve url https://mcp.offlineprotocol.com/mcp
header Authorization: Bearer <application API key>
header x-app-id: <app id> Configure one mode per client under the name offline-protocol, then restart the agent or reload its MCP servers. With the CLI installed globally, the local command is offline mcp serve, which is what offline init and offline mcp install <client> write. mcp install prints the configuration for Claude Code, Claude Desktop, Codex, Cursor, and VS Code; it does not edit your files.
Local or hosted
The same registry, skills, and planning behind both. Only the local server can write to your project.
https://mcp.offlineprotocol.com/mcp, streamable HTTPx-app-id. Organization keys are rejected.scaffold_project, integrate_packages, and init_project write to your project.NeverThe hosted endpoint answers MCP requests only, so opening it in a browser shows a landing page, not the tools. Its health check is at mcp.offlineprotocol.com/health.
Tools
What your agent can call, grouped by job. offline mcp tools prints the list with a line on each.
generate_architecture, preview_scaffold, get_templateAn idea turned into a workflow, a platform, packages, a starter template, architecture documents, and next steps. A dry run of the scaffold, and a template's variables and files.Local and hostedlist_packages, get_package, search_packages, resolve_packagesEvery package with its version, platforms, capabilities, and license, and the full install list for a platform with peer dependencies and license notes.Local and hostedlist_workflows, get_workflow, search_workflows, search_capabilities, search_examplesProduct workflows with packages per platform and a reference architecture: screens, services, events, and data models. Capabilities and example apps to search.Local and hostedlist_skills, search_skills, get_skillSixteen integration guides with accurate API usage, from mesh networking and groups to identity and Proof of Location.Local and hostedscaffold_project, integrate_packages, init_projectA new project on disk, packages added to package.json, and offline.config.json, .mcp.json, and AGENTS.md written into an existing app.Local onlyThe local server also offers three prompts, plan-app, build-p2p-app, and integrate-package, and resources such as offline://llms.txt and offline://skills/{name}.
What to expect
- Guidance, not a live mesh
- The server gives your agent packages, skills, workflows, and plans. It does not run the mesh, talk to peers, or reach live devices. Build and test device communication with the Mesh SDK.
- Keys stay out of files
- Local needs no key. For hosted, create an application API key on the app's API keys tab in the developer portal and keep it in
OFFLINE_API_KEYor your client's secret prompt, never in a committed file. - Current instructions
- Give your agent the live agent setup prompt rather than a copy. It installs the CLI, registers the server, logs in, and checks the setup, and it shows the flow to follow: plan, scaffold or integrate, then read the skill before writing code.

