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.

$npx -y @runtypelabs/cli@latest onboard

What onboard does

The command runs the full setup in stages:

  1. 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.
  2. Skills install. Installs Runtype’s agent skills (from the public runtypelabs/skills repository) into the global skills directory of each coding agent that supports them.
  3. MCP configuration. Writes a user-level MCP server entry named runtype for the detected harness, pointing at the hosted endpoint https://api.runtype.com/v1/mcp/protocol.
  4. Harness OAuth. Runs the agent’s own MCP login so the new connection is authorized against your account.
  5. 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