Skip to main content
Coding agents with shell access can use FirstSales in two ways:
  • Product MCP with OAuth. The agent acts inside the organizations and workspaces you approve on the consent screen.
  • The firstsales CLI with a Developer API key. See CLI workflow.
Product MCP does not accept Developer API keys, and the CLI does not use MCP OAuth tokens.

Connect Codex to Product MCP

Add the server, then sign in with Dynamic Client Registration (DCR):
Codex opens the FirstSales consent screen in your browser. Pick the organizations and workspaces the agent may use, approve, and return to the terminal. A successful login prints Successfully logged in to MCP server 'firstsales'.
Type the registration value in lowercase: dcr. The Codex help text shows the placeholder AUTO|CIMD|DCR, but uppercase DCR is rejected.
offline_access lets Codex refresh the 10-minute access token without another browser login. Add mcp:write, mcp:destructive, or mcp:financial only when the agent needs those tiers. See Consent, authority, and token lifetime.

If login fails with invalid_client

Without --oauth-client-registration dcr, Codex can choose its own HTTPS Client ID Metadata Document (CIMD). If FirstSales cannot validate that document, the authorization request fails with:
Run the login again with --oauth-client-registration dcr, as shown above. DCR registers a public client with FirstSales and does not depend on the Codex metadata document. This error concerns that one document; it does not mean every client metadata document is unsupported.

If a tool says the workspace is not granted

A tool call for a workspace you did not approve returns a message asking you to reconnect. Run codex mcp login firstsales again with the same flags and select that workspace on the consent screen.

Connect Claude Code to Product MCP

Then run /mcp inside Claude Code, choose firstsales, and complete the browser consent.

CLI workflow

Use this sequence in Codex or Claude Code:
For mutations:
For destructive operations, agents must pass --confirm deliberately.