# Kinlead for Codex
> Register Kinlead's hosted MCP server in OpenAI Codex through config.toml. The key lives in an environment variable, and Kinlead does the sending.
- HTML: https://getkinlead.com/integrations/codex
- Markdown: https://getkinlead.com/integrations/codex.md

A short config.toml block, a Bearer key read from an environment variable, and /mcp to confirm the server loaded.

## Setup

1. **Set up Kinlead first.** Create your Kinlead account, connect your LinkedIn account, and fill in the Workspace page with what you sell and who buys it. Your assistant reads that profile, so a vague one gives it nothing true to work with.
2. **Create an API key.** Open the API keys page in Kinlead and create a key named after the client, so you can tell keys apart later. Copy it once. Revoking it from that page cuts that client off.
3. **Add the server to config.toml.** Export the key as KINLEAD_API_KEY, then add an mcp_servers.kinlead table to ~/.codex/config.toml with the hosted URL and bearer_token_env_var set to the variable's name.
4. **Confirm with /mcp.** Start Codex and run /mcp. If Kinlead is missing, the variable was empty when Codex started or the table name is wrong. Then ask for your Kinlead context.

## The config

bearer_token_env_var expects the variable's name. Do not put the key there, and do not write $KINLEAD_API_KEY. The CLI and the editor extension read the same file.

```
# ~/.codex/config.toml
[mcp_servers.kinlead]
url = "https://getkinlead.com/api/agent/v1/mcp"
bearer_token_env_var = "KINLEAD_API_KEY"
```

## Codex is not the ChatGPT connector

ChatGPT adds Kinlead from its connector settings with a sign-in. Codex reads MCP servers from its own config and uses a key. Setting up one does not set up the other.

## Habits for a first session

Codex moves fast inside a repository. Treat creating, deleting and replying as requests you name. Ask it to show a lead finder config and wait before it calls kinlead_create_agent.

LinkedIn stays in Kinlead. Codex drafts and inspects. Close the session and nothing keeps running on Codex's side, while campaigns you approved keep sending from Kinlead on their schedule.

## What a connected assistant cannot do

The tools cover the work inside a workspace. They do not cover account creation, billing, connecting LinkedIn, creating or deleting workspaces, or minting API keys. Those stay with you in the Kinlead app.

No assistant ever sees your LinkedIn password. Kinlead connects your LinkedIn account through Unipile, a third-party LinkedIn provider, and every invite and message goes out from that account at a human pace, within the daily caps and sending hours you choose.

LinkedIn limits automation tools and can restrict accounts. Pacing and limits lower that risk. They do not remove it, and an assistant that asks you to raise limits does not change that.

## Related

- [Codex outbound](https://getkinlead.com/use-cases/codex-outbound.md): A routine run from Codex.
- [ChatGPT](https://getkinlead.com/integrations/chatgpt.md): The chat connector path.
- [Cursor](https://getkinlead.com/integrations/cursor.md): Another editor with the same key pattern.

## Frequently asked questions

**Can I put the key straight into config.toml?**

Keep it in an environment variable. The config file is easy to copy into a dotfiles repo or commit by accident.

**Does a project-level .codex/config.toml work?**

Codex only loads project config for projects you have marked as trusted. The user-level file in your home directory is the simplest place for Kinlead.

**Can the assistant send messages on its own?**

The reply tools do send, through your LinkedIn account. Tell the assistant to show you each draft and wait for a yes. Campaign messages follow each campaign's own settings, including whether the AI answers replies or hands them to you.

**Does connecting an AI app cost extra?**

No. API and MCP access are part of Pro, which is $99 a month. Connections need an active subscription. The AI app you connect is billed by its own maker.

[Create a Kinlead account](https://getkinlead.com/signup) or [book a call](https://getkinlead.com/demo) to talk through pricing and setup.
