in LinkedIn API Live in production. How LinkedIn automation works →
Pricing Blog
Get API key Sign in

Connect LinkedIn to Claude with MCP

Connect LinkedIn to Claude with MCP

The obvious move is to paste the server into Claude’s config file. That file only starts local commands, and a remote server goes under Connectors.

Updated November 2026 · 17 min read

Claude reaches LinkedIn through a remote MCP server, and you add that server in Claude itself, not in a file on disk. In Claude Desktop and on claude.ai you paste the server URL under Connectors and approve a consent screen. Claude Code takes a single command. Neither one asks for an API key.

A key comes in only where nobody is there to approve a consent screen: a CI job, a server, a scheduled Claude Code run. Then the same gtm_live_ key that authenticates the REST API goes in as a bearer header, or through the launcher’s GTM_API_KEY on version 1.3.2 or later. Older launcher pins either ignore the key or expose it in the process list, which is why the version matters. With a consent screen or with a key, Claude acts on a LinkedIn account you own, inside limits the server checks before each call. On that stack, gtm-api.com runs 20,000+ accounts with under 1% of them ever restricted.

How Claude connects to LinkedIn

Claude never signs in to LinkedIn itself. It talks to an MCP server, GTM API’s, at https://mcp.gtm-api.com/mcp, and the server acts on a LinkedIn account you have connected to GTM API, which runs in its own cloud browser. So there are three pieces: Claude as the client, the hosted MCP server in the middle, and your LinkedIn account behind it. Claude sees the server’s actions as tools and decides when to call them, and the server carries each call out on the account.

Connecting is two jobs on the Claude side: telling Claude where the server is, and authorizing it to act for you. Where the server goes depends on the surface. claude.ai and Claude Desktop share one connector list, Claude Code takes a command, and a client that cannot take a URL at all runs a small launcher. Authorization is an OAuth consent screen when a person is there to approve it, and an API key when nobody is. Once both are done, the agent loads three tools that lead it to the rest of the catalogue. The sections below take those steps in order, then cover what to check when Claude does not see the tools.

Which route your Claude surface takes

Most clients take the server URL, Claude Code takes it inside a one-line command, and only a client that cannot accept a URL at all needs the stdio launcher. claude.ai and Claude Desktop share a single connector list, so adding the server on either one lights it up on both. Claude Code keeps its own configuration and runs the same OAuth flow from the terminal, and once it is signed in with a claude.ai account it also gets the connectors added there. The ChatGPT version, where custom servers live under Plugins and the plan decides whether it can send, is on automate LinkedIn with ChatGPT.

Surface What you give it Where that lives
claude.ai The server URL Customize → Connectors → Add → Add custom connector
Claude Desktop The server URL The same connector list, under Customize in the app’s sidebar
Claude Code claude mcp add --transport http Its own config, scoped with --scope local, project or user
Cursor, VS Code A one-click install link The editor’s MCP config, then the same consent screen
Command-only clients npx -y @gtm-api/linkedin-mcp That client’s config file, with tokens cached under ~/.mcp-auth

Claude Desktop and claude.ai in four steps

Both surfaces read one connector list held on your Claude account, which is why the steps are identical and why connecting once is enough for both.

  • Open Customize, then Connectors. In Claude Desktop select Customize in the sidebar. On claude.ai the same page is at https://claude.ai/customize/connectors. This is the account-level list, and it is separate from the Developer tab in the Settings window, which edits a local config file.
  • Click Add, then “Add custom connector”. Give it a name, paste https://mcp.gtm-api.com/mcp and click Continue.
  • Pick the sign-in settings, then click Add. The next screen asks how the connector signs in. Choose Sign in now under Authentication and Register automatically under OAuth client, and leave Request headers and Advanced empty. Claude reads the server’s OAuth metadata and usually marks these two as Detected already. There is no client ID or secret to enter, because Claude registers itself with the server.
  • Click Connect and approve the consent screen. A browser window opens on GTM API for you to sign in and approve the scopes the client asked for. The tool list appears once consent completes.

The sign-in screen is where most first connections stall, because it offers six options and the server needs exactly two of them. This is what to pick:

Setting in the dialog Pick Why the others fail
Authentication Sign in now No sign-in sends calls with no credential, and the server answers every one with 401. Sign in when needed connects first and asks later, which only postpones the same consent screen.
OAuth client Register automatically Use Claude’s published identity needs a Client ID Metadata Document, which this server does not support yet. Use your own OAuth client needs a client ID you would have to register first, and there is none to register.
Request headers Leave empty On an OAuth connection Claude does not allow an authorization header, and nothing else is needed.
Advanced → Transport Leave as is The URL ends in /mcp, so Claude already picks streamable HTTP.
⚠️ A wrong pick cannot be editedClaude does not let you change the sign-in settings of a connector once it is added. If Connect fails after a different choice, remove the connector under Customize → Connectors and add it again with Sign in now and Register automatically.

On Team and Enterprise plans an Owner adds the connector instead, under Organization settings → Connectors (on Enterprise, so can a role that manages the organization’s libraries), and each member then finds it under Customize → Connectors with a Custom label and clicks Connect.

The dialog may also show a Request headers section. Anthropic has it in beta for a limited set of organizations, and it is the only way a connector itself takes a key: choose No sign-in and add an authorization header whose value is Bearer gtm_live_..., scheme included. On Team and Enterprise plans everyone who uses that connector then acts with the one key, so with a person at the screen the consent route stays the better default.

Two constraints are worth knowing before you plan a rollout. Claude’s free plan holds one custom connector. And Anthropic brokers the connection from its own infrastructure, so a server on localhost, on a private corporate network or behind a VPN will not connect this way even though your own machine can reach it.

💡 Where the connector shows upOnce the connector is live, select + in the message box, then Connectors: the server is listed with a toggle that decides whether Claude can use it in this chat. Per-tool permissions (Always allow, Needs approval or Blocked) live on the connector’s own page under Customize → Connectors.

What the config file is actually for

claude_desktop_config.json is real and it does work, for local servers that Claude Desktop starts on your computer. Each entry names a command and its args: the program to start and what to pass it. A remote server is not a program on your machine, so it has no command to give.

The file sits at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows, and the Claude menu opens it under Settings → Developer → Edit Config.

Anthropic draws the line between the two: a remote connector is configured and brokered through your Claude account, and its connection comes from Anthropic’s servers, while the local servers in this file are a separate mechanism that uses your own network. That is why the server’s URL goes under Connectors and not into the file.

The one place a command belongs is a client that cannot take a URL. The @gtm-api/linkedin-mcp launcher bridges stdio to the same hosted endpoint and runs the same OAuth flow, opening the consent page on first use.

stdio-only clientsjson
{
  "mcpServers": {
    "gtm-api": {
      "command": "npx",
      "args": ["-y", "@gtm-api/linkedin-mcp"]
    }
  }
}
⚠️ Pin the launcher at 1.3.2 or laterKey auth came back to the launcher in 1.3.0, but 1.3.0 and 1.3.1, like 1.1.0 before them, hand the key to mcp-remote on its command line, where any local account can read it with ps, and it lands in the MCP client’s log too. npm marks all three deprecated and asks for a key used with them to be rotated. 1.2.x ignores GTM_API_KEY and opens a browser for OAuth, which a headless run never gets past. Move the pin to 1.3.2 or later.

Claude Code takes one command

Claude Code speaks the streamable HTTP transport natively, so the server goes in with one line and authorizes in a session.

add the server, then authorizebash
claude mcp add --transport http gtm-api https://mcp.gtm-api.com/mcp

# available in every project on this machine
claude mcp add --transport http gtm-api --scope user https://mcp.gtm-api.com/mcp

# then, inside a session
/mcp

Run /mcp in any session and authenticate when prompted. After that, claude mcp list prints a health status beside each server: ✔ Connected, ! Needs authentication or ✘ Failed to connect, and a failure line carries the HTTP status and whatever text the server returned. claude mcp get gtm-api shows the same detail on an Issue: row.

A remote server you have used before can show as cached in the /mcp panel, with a tool count and a note that it connects on first use. The tools are usable from your first message, so nothing needs doing about it.

How the connection authorizes itself

Nothing is pasted because the client discovers the whole flow from a single refusal. The first unauthenticated call comes back 401 with a challenge header naming a metadata document, and every step after that is the client following links.

the refusal that starts the flowbash
curl -i -X POST https://mcp.gtm-api.com/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{}}'

# HTTP/2 401
# www-authenticate: Bearer resource_metadata=
#   "https://mcp.gtm-api.com/.well-known/oauth-protected-resource"
  • The resource names its authorization server. That metadata document, defined by RFC 9728, points at https://app.gtm-api.com/id/v4, so the client learns where to send a user without being told.
  • The client registers itself. The authorization server publishes a registration_endpoint, which is RFC 7591 dynamic client registration, so your Claude client does not need to be pre-registered with anyone.
  • PKCE, with no secret to store. The same metadata advertises code_challenge_methods_supported: ["S256"] and token_endpoint_auth_methods_supported: ["none"]. The client is public and proves itself with a code challenge.
  • Read and write are separate grants. Scopes are per domain and per direction, so can_view_linkedin_messages and can_act_linkedin_messages are approved individually, and an agent you only want reading the inbox never receives the send grant.
  • Refresh tokens keep it alive. The grant types include refresh_token, so a working connector does not send you back through consent every session.

The three tools the agent loads out of 250+

The server exposes 250+ typed tools across 19 toolsets, and it hands the model three of them. list_toolsets returns the domains, get_toolset_tools opens one, and call_tool runs any tool by name. The agent walks that tree when it needs something, so a full context window is never spent on a tool catalogue.

Three server-side behaviours ride along with every call, and they are the reason an agent driving a LinkedIn account is a different proposition from an agent driving a scraper.

  • Preview, then confirm. Outward actions return a preview and require an explicit confirmation step before anything reaches LinkedIn, so an over-eager agent cannot commit a bulk send on its own.
  • Budgets checked below the tool. Per-action daily limits are evaluated before dispatch, under every call. The model does no counting, and the server refuses once a budget is spent.
  • Errors written for a model to read. Failures use the same 16-code taxonomy as the REST API, each carrying a recoverable flag and a suggestion field, so the agent can decide whether to retry, wait or stop.

A first prompt that exercises the whole chain, from discovery through the safety layer:

“Check the smart limits on my LinkedIn account, then draft, preview and send a connection request to the profile at this URL.”

How much the account itself can safely do in a day is a separate question from what the API accepts, and the numbers for that are on the LinkedIn limits page.

When Claude cannot see the tools

Almost every failure at this stage is one of seven, and each has its own symptom. Claude Desktop writes MCP logs to ~/Library/Logs/Claude on macOS and %APPDATA%\Claude\logs on Windows, where mcp.log holds connection failures and mcp-server-SERVERNAME.log holds one server’s stderr output.

What you see What it usually is What fixes it
Connect fails right after Add, or the sign-in page never opens Sign-in settings other than Sign in now and Register automatically, most often Use Claude’s published identity or No sign-in Remove the connector and add it again with those two, since the settings cannot be edited later
Connector added, no tools in the picker The browser consent step was closed before it finished Open the connector under Customize → Connectors and click Connect
401 invalid_token, or every tool call answers “Authentication required” A key the server cannot use. Text that is not a key is refused when the client connects, while a revoked or mistyped key connects and fails on its first tool call Copy the key again, or mint a new one in the app under Settings, API keys
The server URL went into claude_desktop_config.json That file starts local commands, and Anthropic sets a remote server up through your Claude account Move the server to Connectors, or switch that entry to the npx launcher
Claude Code shows ! Needs authentication The server is configured and consent is pending Run /mcp in a session and authenticate
Nothing connects, and the server is local Remote connectors dial from Anthropic’s infrastructure Reach a public endpoint, or bridge over stdio from the machine itself
A second connector is refused Claude’s free plan holds one custom connector Free the slot or move to a paid Claude plan

To take Claude out of the picture and test the endpoint by hand, run npx @modelcontextprotocol/inspector, choose the streamable HTTP transport, enter https://mcp.gtm-api.com/mcp and complete the consent screen. A tool list there proves the server and your authorization are both fine, which narrows the problem to the client.

The wider picture of what an agent can do once it is connected, and how the account underneath is kept safe, sits on the LinkedIn MCP server page.

Frequently Asked Questions

Where do I add a LinkedIn MCP server in Claude Desktop?

Under Customize → Connectors. Select Customize in the app’s sidebar, then Connectors, click Add and “Add custom connector”, give it a name and paste https://mcp.gtm-api.com/mcp, then click Continue, Add and Connect, and approve the consent screen. That list belongs to your Claude account, so a connector added in the browser shows up in the desktop app too.

Which sign-in settings do I pick when adding the connector?

Sign in now under Authentication and Register automatically under OAuth client, with Request headers and Advanced left as they are. Claude usually marks those two as Detected. Use Claude’s published identity and No sign-in both fail on this server, and a connector’s sign-in settings cannot be changed after it is added, so a wrong pick means removing it and adding it again.

Can I put the MCP server URL in claude_desktop_config.json?

Put it under Customize → Connectors instead. That file configures local servers that Claude Desktop starts on your computer, each named by a command and its args, and Anthropic sets a remote server up through your Claude account, calling the servers in the file a separate mechanism. To use the file anyway, give it the npx launcher, which bridges to the same endpoint.

Can I connect Claude with my API key?

Yes, where there is no browser to approve access. The gtm_live_... key that authenticates the REST API also works on the MCP server as a bearer token: add --header "Authorization: Bearer gtm_live_..." to the claude mcp add command in Claude Code, or give the npx launcher the key in GTM_API_KEY on version 1.3.2 or later. Connectors on claude.ai and in Claude Desktop sign in through the browser, so there you approve access and paste nothing. Only accounts in Anthropic’s request headers beta, open to a limited set of organizations, can give a connector the key instead, as an authorization header with the value Bearer gtm_live_... and No sign-in chosen.

Does Claude Code support remote MCP servers?

Yes, over the streamable HTTP transport. Add it with claude mcp add --transport http gtm-api https://mcp.gtm-api.com/mcp, add --scope user to have it in every project, then run /mcp in a session to authenticate. claude mcp list reports ✔ Connected, ! Needs authentication or ✘ Failed to connect with the server’s own error text.

How do I stop the agent loading every tool?

The server already does it for you. It publishes three meta tools, list_toolsets, get_toolset_tools and call_tool, so the model sees the domains and opens one on demand across 250+ tools in 19 toolsets. In Claude, the connector’s own page under Customize → Connectors sets each of those three tools to Always allow, Needs approval or Blocked, and Claude Code lets you toggle the whole server in the /mcp panel.

Sources & Further Reading

Connect it once, then let the agent work.

One URL in Connectors, one consent screen, and Claude is running search, messaging and enrichment on a LinkedIn account you own, under server-side limits. On that stack, gtm-api.com runs 20,000+ accounts with under 1% of them ever restricted. Free plan, then from $10 per account at volume.

Get started free →

Last updated: November 2026 · Definitions and benchmarks verified at time of publication