Connect Runtype to coding agents
To connect a coding agent to Runtype (Claude Code, Cursor, Codex, Gemini CLI, OpenCode, or VS Code), run npx -y @runtypelabs/cli@latest onboard. The command signs you into Runtype in the browser, installs the Runtype agent skills, and configures the hosted OAuth MCP connection for the agent it detects, then prints next steps. Restart the agent and it can build and operate your Runtype account: products, flows, agents, tools, surfaces, and records.
What onboard does
The command runs the full setup in stages:
- CLI sign-in. Opens the browser for Runtype OAuth and stores a credential for the CLI, creating an account if you don’t have one.
- Skills install. Installs Runtype’s agent skills (from the public
runtypelabs/skillsrepository) into the global skills directory of each coding agent that supports them. - MCP configuration. Writes a user-level MCP server entry named
runtypefor the detected harness, pointing at the hosted endpointhttps://api.runtype.com/v1/mcp/protocol. - Harness OAuth. Runs the agent’s own MCP login so the new connection is authorized against your account.
- Restart. Prints the restart gesture for your harness. A running session usually cannot see a connection added mid-session, so restart or reload before using it.
After the restart, ask the agent to work with Runtype. The MCP server instructs clients to call get_build_instructions before creating anything, so a good first prompt is simply “use Runtype to build X” and the agent fetches the platform rules itself.
Onboard auto-detects the harness it is running inside. To target a specific one, run runtype install-mcp --agent claude|codex|cursor|gemini|opencode|vscode. It performs the skills and MCP stages for exactly that agent, and --force replaces a conflicting runtype entry that points elsewhere.
Per-harness notes
Claude Code
The connection lands in your user-level MCP configuration, the same result as claude mcp add --transport http --scope user runtype https://api.runtype.com/v1/mcp/protocol, and OAuth completes through claude mcp login runtype. Skills are installed into Claude Code’s global skills directory. Start a new Claude Code session (or reload MCP servers) to pick up the connection.
Cursor
The connection is written to Cursor’s global MCP configuration and authorized with cursor-agent mcp login runtype. Skills are installed for Cursor as well. Restart Cursor or start a new Cursor agent session.
Codex CLI
Setup is the equivalent of codex mcp add runtype --url https://api.runtype.com/v1/mcp/protocol, with OAuth completed through codex mcp login runtype. Skills are installed for Codex. Restart Codex or start a new Codex task.
Gemini CLI
The server is added at user scope, the equivalent of gemini mcp add --scope user --transport http runtype https://api.runtype.com/v1/mcp/protocol. Gemini CLI handles OAuth in-session: run /mcp auth runtype, then /mcp reload. Skills are installed for Gemini CLI.
OpenCode
Setup is the equivalent of opencode mcp add runtype --url https://api.runtype.com/v1/mcp/protocol, authorized with opencode mcp auth runtype. Skills are installed for OpenCode. Restart OpenCode or start a new session.
VS Code
The server is registered through the VS Code CLI (code --add-mcp) as a user-level HTTP MCP server, and skills are installed for GitHub Copilot. Approve the browser OAuth prompt the first time a chat uses Runtype. Reload the VS Code window, then start a new chat.
For AI agents reading this page
If you are an AI agent setting this up for a user, these machine-readable surfaces are for you:
- runtype.ai/.well-known/agent.md is the canonical agent-facing instruction file: setup, authentication, and usage in one document.
- runtype.ai/llms.txt indexes the site in plain text.
- runtype.ai serves its home page as markdown directly to agent user agents, so you can fetch it without parsing HTML.
Run the onboard command above rather than hand-writing MCP configuration. It is idempotent, backs up any config file it rewrites, and verifies the result.
Working inside an existing codebase
After setup you can define agents and flows in two places. Hosted configuration lives in your Runtype account: editable in the dashboard, versioned there, and called from your code through the dispatch API. Code-first configuration lives in your repository using the TypeScript SDK’s FlowBuilder, so definitions ship with your code and go through review. Both run on the same platform and mix freely; many teams start hosted and move hardened paths into code.
Next steps
- Runtype MCP server: what the hosted server exposes and the recommended call sequence
- Quickstart: make your first API call
- Manage Flows as code: the FlowBuilder workflow for code-first definitions
- Agent skills: what the installed skills contain and how to update them