> ## Documentation Index
> Fetch the complete documentation index at: https://docs.goautofire.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect AutoFire MCP to Codex

> Configure AutoFire as a remote MCP server in Codex without storing the key in config.toml.

## Store the key in your environment

Set `AUTOFIRE_MCP_TOKEN` in the secure environment used to launch Codex. Avoid adding it to a repository or checking it into a dotfile you share.

## Add the server

In `~/.codex/config.toml`:

```toml theme={null}
[mcp_servers.autofire]
url = "https://mcp.goautofire.com/mcp"
bearer_token_env_var = "AUTOFIRE_MCP_TOKEN"
enabled_tools = ["get_dealership_profile", "search_inventory", "get_vehicle"]
default_tools_approval_mode = "prompt"
startup_timeout_sec = 15
tool_timeout_sec = 30
```

Start with the smallest `enabled_tools` set you need. Add lead tools only after creating a key with the matching permission.

## Test the connection

Restart Codex, then ask:

```text theme={null}
Use the AutoFire MCP server to show five available vehicles. Do not call any lead tools.
```

Approve the tool call and confirm the results belong to the expected dealership.

## Recommended approval posture

Keep tool approval set to prompt while onboarding or working with lead data. AutoFire tools are server-side read-only, but the client can still copy returned data into its conversation or provider logs.

## Troubleshooting

* `401`: the environment variable is missing, malformed, expired, or revoked.
* Tool missing: the key does not have the matching permission, or `enabled_tools` excludes it.
* Connection failure: confirm the URL includes `/mcp` and restart Codex after changing its environment.
