To connect LinkedIn to Codex or Claude Code, link your LinkedIn account in Qampi, create a Qampi API key, and add the Qampi MCP server to your coding assistant. Start by checking your LinkedIn connection and inspecting your campaigns in read-only mode.
MCP stands for Model Context Protocol. In this setup, Codex or Claude Code starts the Qampi MCP server on your computer. The server uses your Qampi API key to read data from Qampi. Complete LinkedIn sign-in inside Qampi.
1. Connect LinkedIn and create a Qampi API key
- Connect your LinkedIn account in Qampi and complete any verification prompts there.
- Open Settings → API keys and create a key for your coding assistant. Copy it when Qampi displays it.
- Save the key as the only line in
~/.config/qampi/api-key. Create the folder first if needed. On macOS and Linux, restrict the file to your user withchmod 600 ~/.config/qampi/api-key.
These examples use the terminal on macOS or Linux with Node.js 18 or later and npx available. The key file gives both clients a way to read the key without putting it in a shell command or a repository.
2. Connect LinkedIn to Codex
Run these commands from your terminal. The second command confirms that Codex registered the server.
codex mcp add qampi --env QAMPI_MODE=read-only -- npx -y @qampi/mcp-server
codex mcp listStart a fresh Codex session and ask it to run qampi_status. The status response confirms that the server can reach your Qampi account.
OpenAI's Codex MCP documentation
3. Connect LinkedIn to Claude Code
Run these commands from your terminal. User scope makes the connection available to your projects on this computer.
claude mcp add --env QAMPI_MODE=read-only --transport stdio --scope user qampi -- npx -y @qampi/mcp-server
claude mcp listOpen a new Claude Code session. Type /mcp to see the server status, then ask Claude Code to run qampi_status.
Anthropic's Claude Code MCP documentation
Verify your LinkedIn connection with a read-only prompt
Run qampi_status and tell me whether LinkedIn is connected and what its account health is. Then list my Qampi campaigns and summarize their current status.
The status tool reads your Qampi account, LinkedIn connection health, and current usage allowances. With read-only mode enabled, you can also inspect saved leads and campaign progress. Tools for creating or launching campaigns are unavailable in this mode.
What to check if the setup stops working
- The client cannot start Qampi. Run
node --versionandnpx --versionin the same terminal you use for the client. Confirm the key file exists under the home folder of the user running the client. - Qampi rejects the API key. Confirm the file contains the current Qampi key on one line. Save the replacement there if you revoked the old key, then restart the client.
- The status tool says LinkedIn needs verification. Open Qampi and select Re-verify. Run
qampi_statusagain afterward.
Once you can inspect a campaign from your terminal, use the LinkedIn outreach metrics guide to decide what to track in your weekly review.



