Cofounder CLI

Connect an Agent

Point any MCP-compatible agent at Cofounder's hosted MCP server; no CLI install required. Covers Claude Code, Codex, Cursor, and other clients.

Cofounder runs a hosted MCP server, and your agent talks to it directly:

https://api.superoptimizers.cofounder.co/mcp

Point a compatible client at that URL and it gets the full tool surface: roughly 340 tools covering companies, knowledge, providers, deploys, communication, and operations. No CLI install, no local process to babysit. These are the same operations the CLI and API expose.

The fast way: cofounder mcp setup

If you have the CLI installed, it writes the config for you:

cofounder mcp setup

It configures Claude Code and Codex by default and leaves your other MCP servers alone. Pass --client claude, --client codex, or --client cursor to pick one, and --print to see what it would write without touching anything.

  • Claude Code: .mcp.json in the current directory (project scope)
  • Codex: ~/.codex/config.toml (user-global)
  • Cursor: ~/.cursor/mcp.json (user-global)

Adding it by hand

Every client stores its MCP servers in a JSON or TOML file, so you can add a cofounder entry yourself.

Where the entry goes controls where the server shows up. .mcp.json is checked into your project, so the server loads there and for collaborators who clone it (each signs in separately). The Codex and Cursor paths below are user-global: the server loads in every project on your machine. Prefer the project-scoped config unless you want Cofounder in every project. For Claude Code that's user scope:

claude mcp add --scope user --transport http cofounder https://api.superoptimizers.cofounder.co/mcp

Claude Code — .mcp.json in your project:

{
  "mcpServers": {
    "cofounder": {
      "type": "http",
      "url": "https://api.superoptimizers.cofounder.co/mcp"
    }
  }
}

Codex — ~/.codex/config.toml:

[mcp_servers.cofounder]
url = "https://api.superoptimizers.cofounder.co/mcp"

Then run codex mcp login cofounder to sign in through your browser. Codex stores the OAuth credential; it does not read COFOUNDER_API_TOKEN for this server.

Cursor — ~/.cursor/mcp.json:

{
  "mcpServers": {
    "cofounder": {
      "url": "https://api.superoptimizers.cofounder.co/mcp"
    }
  }
}

For any other client, use the streamable-HTTP URL with native MCP OAuth. The Claude app (desktop or claude.ai) is one of them. It keeps no config file: paste the URL under Settings → Connectors → Add custom connector.

Signing in

Run codex mcp login cofounder, authenticate through Claude Code's /mcp, or connect through Cursor's MCP settings. In the Claude app, choose Connect on the Cofounder connector (in Settings → Connectors, or /mcp in the chat). The app opens the browser sign-in itself; no terminal is involved. Each host stores its own OAuth credential. Do not export a CLI token into the host's MCP configuration. Signing in to the CLI does not sign in to an MCP host.

A localhost callback is a temporary listener started by the signing-in client. Use a browser on the same computer. If the listener has stopped or the login was started in a remote terminal, restart login in the intended client.

The connected token identifies the user. Before acting, use user_get and company_memberships_list to identify the intended company; pass its org_id as company_id on company-scoped tools. Ask when the target is ambiguous.

user_get returns the connected user's stable id and display email. The ID stays the same across token refresh, reconnection, and email changes; it does not identify or select a company. OpenAI hosts can discover this tool as the authenticated profile source. Credential failures include an OAuth challenge so supported hosts can prompt you to reconnect. A company-permission or vendor-authentication error does not request a new Cofounder sign-in.

To use a different Cofounder account with the same Codex server entry, run codex mcp logout cofounder, switch to the desired account in your browser, then run codex mcp login cofounder. Start a new Codex session after switching. Codex does not offer an account picker for one MCP server entry.

If the consent screen shows the wrong account, choose Use another account. This cancels the pending connection and signs out of Cofounder in that browser. Restart the agent's sign-in to choose the other account. Supabase binds a pending request to its first account, so it cannot be reused after switching. An existing consent may skip this screen; in that case, use the logout steps above.

Revoke a connection

On servers with MCP OAuth connection management enabled, use a separate CLI user login to list and revoke a connection, even if its original client is lost:

cofounder auth connections list --json
cofounder auth connections revoke --connection-id <connection-id> --json

The list contains connection metadata, never tokens. Client names are supplied by the connecting application. Revocation blocks subsequent authentication, including refresh; it cannot cancel an operation already authorized. Logging out in a client may only remove its saved credential, so use revocation when you need to disconnect it. Company API keys cannot manage account connections. Older direct Supabase connections must reconnect before appearing in this list.

Transport and company switching

HTTP is the supported hosted transport; stdio is not required. Switching companies within the same account needs no new token: select the company's ID on each call. A directory name or the CLI's default company does not establish the target for an MCP task. This is an account-wide connection: permissions also cover companies you join later. Use a company-bound API key for an unattended CLI job.

The older cofounder mcp stdio bridge forwards a CLI token and only works with legacy server authentication. It cannot authenticate to the OAuth proxy. Replace its entry with cofounder mcp setup and complete native OAuth. Company API keys and saved CLI tokens continue to serve REST scripting; they are not credentials for the proxy's MCP endpoint.

More than tools

Tools are most of the surface, not all of it. The server also exposes your company's skills (skill://) and Library files as resources, prompts that show up as slash commands, and the CRM board and domain purchaser, covered in MCP Beyond Tools.

A few capabilities aren't on MCP today, including minting API keys and provider credentials. Pages mark them where they come up; the CLI covers them.

Give local agents context

Agents running in your checkout work better when they know which company they serve and how to reach it:

The Cofounder plugin includes cofounder-company-work, a reusable skill for reading current company context and sharing meaningful findings, decisions, blockers, and completed work through company events. ChatGPT, Codex, and Claude can discover it when you work on a company connected to Cofounder. Connecting an MCP server by itself adds tools, not this skill.

For CLI-only use, install the skill for your local agent. Choose the command for your host:

# Codex: ~/.agents/skills/cofounder-company-work/SKILL.md
cofounder instructions install-skill --client codex
# Claude Code: ~/.claude/skills/cofounder-company-work/SKILL.md
cofounder instructions install-skill --client claude

Installation works offline without signing in. --print previews the target and content without writing. Repeating installation leaves an identical skill unchanged; replacing different content requires --replace. Keep the bundled skill when the plugin already supplies it rather than installing a duplicate. Local installation does not add a skill to your ChatGPT or Claude cloud account; install the Cofounder plugin through that host's plugin settings instead.

Use cofounder instructions setup --company-id <org-id> from your project folder to bind its instructions to the verified company. It also adds guidance to read relevant state and post concise updates about company work. Skills are selected by the host when relevant; project instructions help keep the company binding available in later chats.

MCPCLIWhat it does
—cofounder instructions setupWrite Cofounder guidance into AGENTS.md and CLAUDE.md in the current directory (--print to preview)
—cofounder instructions install-skill --client codexInstall the company-work skill locally; use --client claude for Claude Code
—cofounder onboardingPrint the hosted onboarding skills; works before you sign in
plugin_context_getcofounder plugin context getConfirm which account and company the agent is acting as
plugin_setup_getcofounder plugin setup getRead the environment the CLI and plugins need
—cofounder skills listList your skills, including Cofounder's defaults and ones you wrote
—cofounder skills show <name>Print one skill's current instructions
—cofounder skills get --skill-name <name>Read one skill's instructions plus the list of files that come with it
—cofounder agent set-context <text>Leave a short note (up to 2,000 characters) for other agents on this machine
—cofounder agent get-contextRead the note
—cofounder agent clear-contextRemove the note

The coordination note lives only on your machine, is never sent to Cofounder, and shows up in cofounder auth whoami, so parallel agents can see what the others are doing. Each company keeps its own note, and all three commands work offline.

Next steps