# Connecting AI agents to LinkedIn via MCP
> Connect an MCP server to Claude or ChatGPT, give it LinkedIn tools, and run lead searches and message drafts from the chat client without copy-pasting profiles.
- HTML: https://getkinlead.com/using-mcp-servers-for-linkedin-sales
- Markdown: https://getkinlead.com/using-mcp-servers-for-linkedin-sales.md

**Short answer:** You connect an MCP server to an MCP client like Claude Desktop, Cursor, or ChatGPT, then give it LinkedIn tools. The server handles searches and profile reads, and the client calls those tools when you ask for leads or drafts.

## What an MCP server actually does for LinkedIn

An MCP server gives your AI client a set of tools. The client is the chat app you type into. The server is a small program that knows how to search LinkedIn, read a profile, or pull the comments from a post. Without the server, the model answers from training data and guesses. With the server, it calls a tool and gets a current result.

Think of the server as the hands and the client as the mouth. You ask for leads in plain language. The client decides which tool to call, sends the request, and shows you the result. The model still writes the message, but it writes from a real profile instead of a stereotype.

A useful test: ask the client to find a person you already know. If it returns the right profile and the right current company, the server is reading live data. If it returns a person with the same name but an old role, the server is not connected or the token is wrong.

**A chat client with no tools**

- Answers from training data
- Asks you to paste profiles
- Cannot check a current role

**A chat client with an MCP server**

- Calls a search tool
- Reads a profile you name
- Returns the post URL and comment text

## Pick an MCP client you will actually use

Your client is the app where you type the prompt. Claude Desktop, Cursor, and other MCP clients can run tools. Pick one you will open every day. A client that sits in a tab you forget is worse than a simple saved search.

Check three things before you install anything. The client must support MCP servers, it must let you edit a JSON config, and it must show tool calls in the chat. If you cannot see the tool call, you cannot tell whether the answer came from LinkedIn or from the model's memory.

If you use more than one client, keep one config file per client. Do not copy a config from a tutorial without checking the command path. A path that works on someone else's laptop will fail on yours.

1. **Install the client.** Use the normal installer for your operating system. Open it once and sign in so the settings folder exists.
2. **Find the MCP settings.** Look for a developer, extensions, or MCP section. Some clients use a JSON file, others have a form that writes the file for you.
3. **Run a test tool.** Ask the client to list its tools. If it shows a LinkedIn search tool, the connection works. If it shows nothing, the server is not starting.

## Configure the server without exposing your account

The config file tells the client how to start the server. You need the command, the arguments, and the environment variables. The command is usually a runtime like npx or python. The arguments point to the server package. The environment variables hold the token the server uses to reach LinkedIn.

Use a token from the provider, not your LinkedIn password. A password in a config file is a password in every backup and screen share. A token can be revoked without changing your login.

The exact keys depend on the server. Read the server's README and copy the key names exactly. A typo in an environment variable name looks like an authentication failure.

> Keep the config file out of shared drives and public repos. If you paste a token into a chat, rotate it after the test.

```
{
  "mcpServers": {
    "linkedin-agent": {
      "command": "npx",
      "args": ["-y", "your-linkedin-mcp-server"],
      "env": {
        "LINKEDIN_ACCESS_TOKEN": "paste_token_here",
        "MCP_LOG_LEVEL": "info"
      }
    }
  }
}
```

## Run a lead search that returns useful profiles

Natural language works, but vague requests get vague lists. Give the agent a job title, a company size, a location, and a signal. A signal is something you can see on the profile or in a post, such as a recent funding round, a hiring post, or a comment on a competitor's page.

Ask for fewer results than you think you need. Ten profiles you can read are better than fifty you skim. Then ask the agent to explain why each profile matched. That explanation is your quality check.

If the agent returns a profile with no recent activity, ask it to show the last post date. A profile with no signal is just a name. Wait for a signal before you spend a message.

| | Search field | Weak request | Strong request |
| --- | --- | --- | --- |
| Job title | founders | founder or co-founder |
| Company | fintech | B2B fintech with 20 to 100 employees |
| Signal | active on LinkedIn | posted about hiring or AI in the last 30 days |
| Location | London | London, United Kingdom |

- **you:** Find 15 heads of sales at B2B SaaS companies in Chicago that raised a round in the last six months and posted on LinkedIn this month.
- **draft:** I can run that search. I need one decision: do you want companies with 20 to 100 employees or any size? The search tool will return more relevant profiles if I filter by headcount.
- **you:** 20 to 100. Then read the last post from each profile and draft a first line that mentions the post topic.
- **draft:** I found 12 profiles that match. I skipped 3 because their last post was a job ad. Here are the first five with a draft line for each.

## Turn replies into drafts you can send

Search is only half the job. The other half is the reply. When a lead answers, ask the agent to read the thread and classify the reply. A simple set works: interested, not now, wrong person, or question. The class decides the next draft.

Give the agent your own examples. Paste two messages you sent that got a real answer and two that did not. Ask it to copy the structure of the good ones and avoid the structure of the bad ones. This is faster than writing a long style guide.

If the reply is a question about price, answer the question before you ask for a call. A draft that dodges the question reads like a template.

1. **Read the reply.** Ask the agent to quote the lead's last message and the message before it so you have the context.
2. **Name the intent.** Say whether the reply is interested, a question, a delay, or a referral. The agent should not guess.
3. **Draft one answer.** Ask for one short reply that answers the question and ends with a clear next step.
4. **Send or edit.** Read the draft. If it sounds like a brochure, cut the adjectives and ask again.

## Keep the agent inside safe limits

LinkedIn does not publish exact limits for invites, messages, or profile views. Any number you see online is a guess or a snapshot from one account. The safe approach is to set a cap you can track, watch the result, and lower it when the account shows friction.

An MCP server can send actions faster than a person can. That is the risk. Put a daily cap in the server or in the client, use a send window, and stop the agent when LinkedIn shows a warning. A warning is not a challenge to push through.

Keep a simple log. Note the date, the number of invites sent, and any warning. After two weeks you will see the pattern for your account. That pattern is more useful than a generic number from a blog post.

| | Area | What to do | Why |
| --- | --- | --- | --- |
| Invites | Set a daily cap you can change | LinkedIn does not publish a fixed limit, so you need a number you can adjust |
| Messages | Keep the first message short and ask one question | Long messages get skimmed and look automated |
| Send window | Send during the lead's business hours | Replies are more likely when the message arrives during the workday |
| Warnings | Stop the agent and check the account | Pushing through a warning puts the account at risk |

## Doing this with Kinlead

Kinlead has a REST Agent API and an MCP server, so Claude, ChatGPT, Cursor, Claude Code, Codex and other MCP clients can find leads, check replies and draft answers. Chat apps connect with OAuth. Scripts use API keys. Lead search uses LinkedIn's standard search, so a Sales Navigator seat is not required.

Outreach runs from your own LinkedIn account through Unipile, a third-party provider. Kinlead never stores your LinkedIn password. You can read and edit queued campaign messages on the Actions page before they send, and pause any campaign. Replies from every campaign land in one inbox, classified by intent, with interested replies first. You get an email when someone replies.

Start with the [MCP server and API](/features/agent-api-and-mcp) page if you want to connect a client. The same API can check replies and draft answers from a script.

## Related

- [MCP server and API](https://getkinlead.com/features/agent-api-and-mcp.md)
- [MCP integration](https://getkinlead.com/integrations/mcp.md)

## Common questions

**Do I need a Sales Navigator seat to use an MCP server for LinkedIn?**

Not always. Some servers use LinkedIn's standard search, which does not require a Sales Navigator seat. Check the server's documentation before you pay for a seat.

**Can I use one MCP server with more than one LinkedIn account?**

Only if the server supports multiple tokens and your client can switch between them. Many servers assume one account per connection, so test with a second account before you rely on it.

**How do I stop the AI from sending a bad message?**

Use a draft step. Ask the client to write the message in chat, read it, then tell it to send. If the client has a send tool, you can also turn that tool off until you trust the drafts.

**What should I do when the server returns a connection error?**

Check the command path, the runtime, and the token. Most errors come from a missing environment variable or a client that cannot start the server process.

**Does an MCP server replace a sales playbook?**

No. The server gives the AI access to data and actions. The playbook gives it the judgment about what to say, which is why you still need your own examples and rules.

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