How to Connect OpenAI Codex to LinkedIn
Short answer: add LinkMCP to Codex as an MCP server, then sign in once. Codex can call tools from MCP servers. The Codex CLI, the Codex IDE extension and the ChatGPT desktop app share one MCP setup, so you add LinkMCP once. Then Codex can look up LinkedIn profiles, search people and draft messages while it works on your files.
Option 1: the Codex CLI
- Add the server:
codex mcp add linkmcp --url https://app.linkmcp.io/api/mcp
- Sign in. Codex opens a LinkMCP sign-in window in your browser. If it does not, run:
codex mcp login linkmcp
Sign in with your email (you get a 6-digit code) or with Google, and approve the access. A new LinkMCP account starts with the 7-day free trial. - Check it. Run
codex mcp list, or startcodexand type/mcp. You should see linkmcp.
The command writes this entry to ~/.codex/config.toml. You can also add it to that file yourself:
[mcp_servers.linkmcp] url = "https://app.linkmcp.io/api/mcp"
Option 2: the ChatGPT desktop app or the IDE extension
- In the ChatGPT desktop app, open Settings → MCP servers. In the Codex IDE extension, open the gear menu and select MCP servers.
- Select Add server. Set the name to LinkMCP, choose Streamable HTTP and paste this address:
https://app.linkmcp.io/api/mcp
- Save. Then select Restart (in the IDE extension, Restart extension).
- Select Authenticate next to LinkMCP and sign in.
Prompts to try first
These work in the free trial, before you connect your own LinkedIn account:
Use linkmcp to look up [profile URL] and summarize the current role and the last two jobs.
leads.csv has a column of LinkedIn profile URLs. Look them up with linkedin_bulk_get_profiles, ten at a time, and add title and company columns.
Read the last five posts of [profile URL] with linkedin_get_person_posts and list the topics this person writes about.
These need your LinkedIn account connected (a paid plan):
Search LinkedIn for Python developers in Lisbon with linkedin_search_people and save name, headline and profile URL to devs.csv.
List my unread LinkedIn conversations and write a draft reply to each in replies.md. Do not send anything.
Codex can ask you to approve a tool call before it runs. Read the input before you approve a write, such as linkedin_send_message.
If it does not work
- linkmcp is listed, but no LinkedIn tools show up: run
codex mcp login linkmcp, then restart Codex. - You use Codex on a remote machine and the sign-in cannot reach it: use an access key. Sign in at LinkMCP, open API Keys → New access key, put the key in an environment variable such as
LINKMCP_TOKEN, and add the server with it:codex mcp add linkmcp --url https://app.linkmcp.io/api/mcp --bearer-token-env-var LINKMCP_TOKEN
- A tool says it needs a connected LinkedIn account: that tool acts through your own LinkedIn account. The message links to the plan page and to the LinkedIn connection.
Can this put my LinkedIn account at risk?
Yes, it can. Any automated use of LinkedIn can put an account at risk, and a coding agent can call a tool many times in a loop. LinkMCP puts daily limits and pacing on every action through your account, a warm-up limit on connection requests for new or quiet accounts, and a hard monthly usage cap on every plan. That lowers the risk. It does not remove it. The limits are on our security page. Our guide on LinkedIn automation risk explains what can trigger a restriction.
What it costs
LinkMCP starts with a 7-day free trial, and you do not need a credit card. In the trial, profile and company lookups, posts and post comments, and email and phone lookups work. Searches, messages, posting and Sales Navigator act through your own LinkedIn account, and connecting it needs a paid plan. Starter costs $19 per month. New trials get their first month of Starter for $9.50.
Other AI tools
The same server address works in other clients. See How to Connect Claude Code to LinkedIn and How to Connect ChatGPT to LinkedIn.
FAQ
Is there a LinkedIn plugin for Codex?
LinkedIn's own plugin in OpenAI's plugin directory looks up a person's title, company and location, and it works in Codex. For full profiles, search, messages and posts, add a LinkedIn MCP server such as LinkMCP.
Do I have to set it up again for the IDE extension?
No. The Codex CLI, the IDE extension and the ChatGPT desktop app share one MCP setup in ~/.codex/config.toml. Add LinkMCP once and all three can use it.
Can Codex use LinkedIn without a browser sign-in?
Yes. Create an access key in LinkMCP, put it in an environment variable, and add the server with --bearer-token-env-var. This also works on a remote machine.
LinkMCP is a hosted LinkedIn MCP server. Add it to Codex once and use 34 LinkedIn tools from the terminal, your editor or the desktop app. No browser extension and no LinkedIn session on your machine. Start a free trial.