Skip to Content

Add Samva to Codex

Add Samva's hosted MCP server to Codex, approve the OAuth connection for one organization, and run a read-only readiness check.

Codex connects to Samva's hosted MCP server at https://mcp.samva.dev and signs in with OAuth. Once connected, Codex can check your sending setup, send and read email, and work a mailbox, inside the one organization you approve.

Add the server

codex mcp add samva --url https://mcp.samva.dev

Codex adds the server to ~/.codex/config.toml, detects that it supports OAuth, and starts the sign-in.

~/.codex/config.toml
[mcp_servers.samva]
url = "https://mcp.samva.dev"

Connect your account

Codex prints an authorization link and opens it in your browser. The browser opens Samva's authorization page. It names the client, shows where the browser returns to, and lists your organizations. Choose one organization and select Authorize. The connection acts as you, with your role in that organization, as Connect an agent over MCP describes. Leave Whole organization selected for the first check below: a connection confined to a namespace cannot read the organization's profile or readiness.

Codex then prints Successfully logged in., and codex mcp list shows samva as enabled with OAuth under Auth. To sign in again later, run codex mcp login samva. If you approved Codex before, that sign-in can finish without showing the authorization page, and it keeps the organization you approved then.

Run a first check

Start with a prompt that only reads:

Using Samva, check whether this organization is ready to send email and list what is left to set up.

The agent calls profile_get to name the organization and email_check_readiness to report whether it can send. Neither tool sends email. Tools that send, schedule, publish, or change settings are writes, so ask for them only when you mean them.

Hold mailbox sends for approval

Decision rules apply to mailbox actions. A send from a mailbox, an agent reply, or an integration tool call goes out, waits for a person, or is refused according to the organization's, the mailbox's, and the actor's rules. A held send returns as waiting for approval and goes out only when someone approves it. See Review mailbox actions.

Those rules do not cover messages_send_email, which sends as soon as the agent calls it. To keep a person in the loop for that tool, set your client to ask before it runs.

Troubleshooting

What you seeWhat to do
codex mcp list shows Not logged inRun codex mcp login samva and approve the connection.
The agent answers through the Samva plugin instead of this serverYour ChatGPT account may also have the Samva plugin connected, to another organization. Name the samva server in your prompt; its tools appear as samva/<tool>.
The samva server answers for the wrong organizationThe connection stays with the organization approved at sign-in. Naming another organization in a prompt does not change it, and signing in again from Codex keeps the earlier approval.
You want to remove the serverRun codex mcp remove samva.

Related documentation

On this page