# Porticol with Codex

> Connect Codex to Porticol's MCP server, so it can search, read, send and run your API collections.

Canonical: https://porticol.app/integrations/codex

Codex reads MCP servers from its own TOML config. Add Porticol there and every Codex session on the machine can use your workspace.

## Add the server to Codex

```
[mcp_servers.porticol]
command = "porticol-cli"
args = ["mcp"]
```

On Windows the file is `%USERPROFILE%\.codex\config.toml`. To allow writes, use `args = ["mcp", "--write"]`.

## What it can do

- Search collections, requests and history for a query.
- Read a collection with its requests and examples, or one request of it.
- List the environments, or read one by id.
- Send a request and return what came back.
- Run a collection and wait for the finished run.
- Read recent sends and their results.
- Preview an OpenAPI document as a collection, without importing it.
- Create or change requests only when the server starts with --write.
- Secret values stay in Porticol: every result is masked, and a protected environment waits for a person in the app.

## Try it

Ask it to read the request that returns a 500, send it again, and compare the two responses.

## Questions

**Where does Codex read MCP servers?**

In ~/.codex/config.toml, or %USERPROFILE%\\.codex\\config.toml on Windows.

**How do I let Codex change requests?**

Add --write to the args list, so it reads args = \["mcp", "--write"\].

## Try it on your own APIs

Free for one seat, on macOS, Windows and Linux.
