Cofounder

MCP Configuration

Configure the Cofounder MCP by hand, connect agents with no browser, switch accounts, revoke a host, and tell local agents which company they serve.

Set up a host by hand, connect an agent that can't open a browser, or manage connections you already have. For one-click installs, see Connect an Agent.

Let the CLI Write the Config

If the CLI is installed, it writes the config:

cofounder mcp setup

It sets up 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 changing anything. It writes to:

  • Claude Code: .mcp.json in the current directory (this project only)
  • Codex: $CODEX_HOME/config.toml, defaulting to ~/.codex/config.toml (every project)
  • Cursor: ~/.cursor/mcp.json (every project)

Add It by Hand

Where the entry goes decides 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 files load the server in every project on your machine.

Claude Code

For all your projects:

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

Or in your project's .mcp.json:

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

Codex

In $CODEX_HOME/config.toml (~/.codex when unset):

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

Then run codex mcp login cofounder to sign in through your browser. Codex keeps the login. An agent with no browser skips the login and names a bearer environment variable instead:

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

cofounder mcp setup writes that line for you when COFOUNDER_API_TOKEN holds a company API key (a cfk_ value, or a placeholder marked with COFOUNDER_API_TOKEN_KIND=company_api_key).

Cursor

In ~/.cursor/mcp.json:

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

Other Clients

Use the streamable-HTTP URL with native MCP OAuth. The Claude app has no config file. Use the connector link on Connect an Agent.

Connect an Agent Without a Browser

For an agent that can't open a browser (CI, a cloud box, a company-owned agent), use a company API key:

  1. Put the key in COFOUNDER_API_TOKEN in the agent's environment.
  2. Run cofounder mcp setup.

Each entry then reads the key from that variable, so nobody signs in and no token lands in a config file:

  • Codex uses bearer_token_env_var.
  • Claude Code uses an Authorization header referencing ${COFOUNDER_API_TOKEN}.
  • Cursor uses ${env:COFOUNDER_API_TOKEN}.

Any other value in COFOUNDER_API_TOKEN keeps the browser sign-in setup above, because only company keys work on the hosted MCP without signing in.

A company key acts as its own identity inside its company. Company tools use the key's company, so your agent can omit company_id and skip user_get and membership discovery.

Sign In and Pick a Company

Browser sign-in starts a short-lived listener on your computer (a localhost callback), so use a browser on the same computer. If the listener has stopped, or you started login in a remote terminal, restart login in the client you want to connect.

The connection identifies you, not a company. Before acting, your agent uses user_get and company_memberships_list to find the intended company and passes its org_id as company_id on company tools. It asks when the target is unclear.

user_get returns your stable id and display email. The id stays the same across token refresh, reconnecting, and email changes. It doesn't pick a company. OpenAI hosts can use it as your signed-in profile.

Expired credentials come back with a sign-in prompt so supported hosts can ask you to reconnect. A company-permission error or an error from another service doesn't ask you to sign in to Cofounder again.

Switch Accounts

If you're already signed in to Cofounder in the browser, sign-in first asks which account to use. To connect a different one, choose Switch and sign in with it. The same connection request continues, so you don't restart in the agent. If the account belongs to more than one company, also choose the connection's default company. The agent uses it when a call names no company, and can still work in your other companies.

In Codex, one server entry has no account picker. To use a different account, run codex mcp logout cofounder, switch accounts in your browser, then run codex mcp login cofounder. Start a new Codex session afterward.

Revoke a Connection

From a separate CLI user login, list and revoke a connection, even if its original client is gone:

cofounder auth connections list --json
cofounder auth connections revoke --connection-id <connection-id> --json
  • The list shows connection details, never tokens. Client names come from the connecting app.
  • Revoking blocks any further sign-in, including token refresh. It can't cancel an operation that was already approved.
  • Revoking the "Cofounder CLI" connection ends that CLI login's MCP access. The stdio bridge reports it and stops; run cofounder auth login to connect again.
  • Company API keys can't manage account connections.
  • Some older connections must reconnect before they show up in this list.

Logging out in some clients deletes only the saved credential, so revoke when you need the connection gone.

Transport and Company Switching

HTTP is the supported hosted transport. You don't need stdio.

Switching companies in the same account needs no new token: your agent names the company's id on each call. A directory name or the CLI's default company doesn't set the target for an MCP task. The connection covers your whole account, including companies you join later. Use a company-bound API key for an unattended CLI job.

The older cofounder mcp stdio bridge passes along the CLI's credential. A company API key in COFOUNDER_API_TOKEN works on any endpoint. A saved CLI user login is exchanged automatically for an MCP access token when the server uses the OAuth proxy, and sent directly when it doesn't. Revoking the connection ends every token the bridge was given. For hosts that run their own sign-in, run cofounder mcp setup and finish the browser sign-in.

The bridge and cofounder doctor prefer MCP 2026-07-28 discovery and fall back to older supported protocol versions. The bridge accepts July requests and older clients that use initialize.

Give Local Agents Context

Agents working in your checkout need to know which company they serve and how to reach it.

The Company-Work Skill

cofounder-company-work is a skill for reading current company context and sharing findings, decisions, blockers, and finished work as company events. MCP agents can read it at skill://cofounder-company-work/SKILL.md. To give a terminal agent its own copy, install it locally:

# 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
  • Works offline, without signing in. --print previews the target and content without writing.
  • Installing again leaves an identical skill alone. Replacing different content needs --replace.
  • Installing locally doesn't add the skill to your ChatGPT or Claude cloud account.

Project Instructions

Run cofounder instructions setup --company-id <org-id> from your project folder to tie its instructions to the verified company. It also adds guidance to read relevant state and post short updates about company work. Hosts load skills only when relevant, while project instructions keep the company binding in later chats.

MCPCLIWhat it does
Not on MCPWrite Cofounder guidance into and in the current directory ( to preview)
Not on MCPInstall the company-work skill locally; use for Claude Code
Print the hosted onboarding skills and next step; works before you sign in
Not on MCPList your skills, including Cofounder's defaults and ones you wrote
Not on MCPPrint one skill's current instructions
Not on MCPRead one skill's instructions plus the list of files that come with it
Not on MCPRead a listed supporting file, such as a CRM skill reference
Not on MCPLeave a short note (up to 2,000 characters) for other agents on this machine
Not on MCPRead the note
Not on MCPRemove the note

Skill Files

Use skills get to see a skill's file list, then pass one listed relative path with --file-path to skills files get to read it. For example, the hosted cofounder-crm skill keeps query and record guidance in separate reference files. Only listed text files can be read.

Notes for Parallel Agents

The note from agent set-context stays 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.