gtm-api: LinkedIn MCP Server

A managed LinkedIn MCP server from gtm-api.com: it gives an AI agent one endpoint, three MCP tools and 190+ typed LinkedIn actions over the Model Context Protocol, so Claude, ChatGPT or Cursor can search, connect, message and enrich on a LinkedIn account you own, with account safety enforced server side.
This repository holds the public interface: what the server exposes, how to connect a client, and how the safety layer works.
What is a LinkedIn MCP server?
A LinkedIn MCP server exposes LinkedIn actions as Model Context Protocol tools, so an AI agent calls them directly, the way a person would click through the UI. LinkedIn publishes no official API for invitations, member messages or open profile search, so a LinkedIn MCP server works through an account you own rather than through LinkedIn's developer platform.
Two shapes exist today. Cookie-driven open-source servers run a browser session with your own cookie and no pacing. Managed servers run each account in isolated infrastructure with limits enforced before every action. Of the two, gtm-api.com is the second kind.
Which clients it works with
Any MCP-compatible client:
- Claude (Desktop, Code, and the API)
- Cursor
- ChatGPT (via connectors)
- LangChain, n8n, and custom agent runtimes
Not using MCP? Every tool is also a typed REST endpoint with webhooks. One schema generates all three surfaces.
Quickstart
1. Sign up. Create an account at app.gtm-api.com (forever free plan, no card) and connect a LinkedIn account. It opens in a dedicated anti-detect cloud browser with its own proxy.
2. Add the server to your MCP client. On claude.ai and in Claude Desktop, open Customize, Connectors, then Add, "Add custom connector", paste https://mcp.gtm-api.com/mcp and approve access (Anthropic's steps). Clients that read a server URL from their config file, such as Cursor's mcp.json, take this entry (the repo's own .mcp.json is the same):
{
"mcpServers": {
"gtm-api": {
"url": "https://mcp.gtm-api.com/mcp"
}
}
}
There is no key to paste. The endpoint authenticates with OAuth: your client gets a WWW-Authenticate challenge on the first call, registers itself with the authorization server (dynamic client registration), and opens a consent page in your browser.
Headless clients can skip the browser. The same API key (gtm_live_...) that authenticates the REST API also works on this endpoint as a plain bearer token, which is what makes it usable from CI and servers:
claude mcp add --transport http gtm-api https://mcp.gtm-api.com/mcp --header "Authorization: Bearer gtm_live_..."
For command-spawning clients, the launcher below reads the key from GTM_API_KEY instead. Use 1.3.2 or newer with a key: npm deprecates 1.1.0, 1.3.0 and 1.3.1, which put the key in the process list and the MCP client's log (rotate a key used with one of them), and 1.2.x ignores the variable and does OAuth only. Pick one mode per connection: with a key attached, the OAuth flow never starts. Connectors on claude.ai and in Claude Desktop sign in through the browser, and take a key only in Anthropic's request headers section, which is in beta for a limited set of organizations. Full matrix: docs.gtm-api.com/mcp/connect.
Client can only spawn a command, not open a URL, as with Claude Desktop's claude_desktop_config.json? The @gtm-api/linkedin-mcp launcher bridges stdio clients to the same endpoint and runs the same OAuth flow (config in examples/):
{
"mcpServers": {
"gtm-api": {
"command": "npx",
"args": ["-y", "@gtm-api/linkedin-mcp"]
}
}
}
For Claude Code it is one line: claude mcp add --transport http gtm-api https://mcp.gtm-api.com/mcp.
The same launcher also ships as a Docker image, gtmapi/linkedin-mcp (config in examples/). The image signs in with an API key only. Pass the variable by name and keep the key in the env block, so it sits on no command line, docker's included:
{
"mcpServers": {
"gtm-api": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "GTM_API_KEY", "gtmapi/linkedin-mcp"],
"env": { "GTM_API_KEY": "gtm_live_..." }
}
}
}
OAuth cannot finish inside a container: the consent page sends your browser back to a callback on localhost, which is your machine, not the container. Without a key the container exits at once and says so. For OAuth, use the URL or the npm launcher above.
3. Restart the client and prompt in plain English:
"Every morning, accept new connection invitations from founders, reply with a short welcome, and add anyone hiring SDRs to a warm list."
The agent discovers the actions and chains them: fetch the latest connection invitations, accept the ones that match, send each new contact a short message. A single write such as the accept or the message goes through a preview-then-confirm step, and a bulk run is previewed once, as a plan. Either way, every call is checked against the account's daily budget on the server before it reaches LinkedIn.
Cursor plugin
This repository is also a Cursor plugin (.cursor-plugin/plugin.json). Installing it adds two things:
- The hosted MCP server,
https://mcp.gtm-api.com/mcp, declared in .mcp.json.
- The
gtm-api-linkedin skill. It tells the agent to discover tools before calling them, to show you the preview of every send before it commits, and to stop on a limit refusal instead of retrying it.
The plugin is not on the Cursor Marketplace yet. Until it is, the one-click Cursor link on docs.gtm-api.com/mcp/connect adds the MCP server alone, and the whole plugin, skill included, installs from this repository into Cursor's local plugin folder:
git clone https://github.com/gtm-api/linkedin-mcp.git /tmp/linkedin-mcp
mkdir -p ~/.cursor/plugins/local/gtm-api
cp -R /tmp/linkedin-mcp/.cursor-plugin /tmp/linkedin-mcp/.mcp.json /tmp/linkedin-mcp/skills /tmp/linkedin-mcp/assets ~/.cursor/plugins/local/gtm-api/
Then run Developer: Reload Window and check that Customize lists the skill and the MCP server.
The plugin carries no key and needs no configuration. The first tool call opens a consent page in your browser: you sign in to app.gtm-api.com (forever free plan, no card) and pick the workspace the agent acts in. Cursor registers itself as an OAuth client on that first call, so there is no client ID to create.
The server exposes exactly three MCP tools. Discovery is progressive: an agent lists the toolsets, inspects one, then invokes an action. The 190+ LinkedIn actions never load into the model's context at once, so the schema footprint stays under 1,000 tokens.
[
{
"name": "list_toolsets",
"description": "List the available toolsets (domains) on this server. Each toolset groups related tools (e.g. linkedin.messaging, id.billing). Start here, then get_toolset_tools to inspect one, then call_tool to run a tool. Requires OAuth authorization (Bearer token).",
"input_schema": { "type": "object", "properties": {} }
},
{
"name": "get_toolset_tools",
"description": "List the tools in a toolset. Default (lite) returns name + title + one-line summary; pass verbose:true for full descriptions, safety flags, and parameter names. Run one via call_tool.",
"input_schema": {
"type": "object",
"properties": {
"toolset": { "type": "string", "description": "Toolset id from list_toolsets, e.g. \"linkedin.messaging\"." },
"verbose": { "type": "boolean", "description": "Include full descriptions + parameter names." }
},
"required": ["toolset"]
}
},
{
"name": "call_tool",
"description": "Invoke a tool by name (discovered via get_toolset_tools) with its arguments object. Behaves exactly like calling the tool on its domain mount. Dangerous tools still require the two-step preview→confirm (pass commit_token inside arguments on the confirm call).",
"input_schema": {
"type": "object",
"properties": {
"name": { "type": "string", "description": "Exact tool name." },
"arguments": { "type": "object", "description": "The tool's arguments object." }
},
"required": ["name"]
}
}
]
call_tool validates arguments against the target action's own input schema, so preview-then-confirm, rate limits and typed errors apply exactly as if the action were mounted directly.
What the agent can do
190+ typed actions across 12 LinkedIn toolsets, grouped here into seven areas:
| Toolset | What it covers |
|---|
| Messaging | member messages, voice notes, InMail, Sales Navigator chats, inbox search and sync |
| Network | connection requests, accept or ignore invitations, withdraw, connections and followers |
| Content | track posts and metrics, comment, react, get engagers and commenters |
| Enrichment | lite and full profile, experience, skills, education, company data |
| Search | people, company and post search, similar profiles, employees, decision-makers, saved searches |
| Account health | smart limits, health snapshots, quota-hit, block and activity logs |
| Infrastructure | anti-detect cloud browsers, dedicated proxies, webhooks |
The same endpoint also serves the account, billing and orchestration toolsets, 250+ typed actions in total. This repo documents the LinkedIn half.
LinkedIn is the live channel today. Email (Gmail, Outlook, IMAP), messengers (WhatsApp, Telegram, Instagram DMs) and calendars (Google, Microsoft) are on the roadmap on the same typed contract.
Is it safe for my LinkedIn account?
Safety is enforced by the server itself, under every tool call. Six mechanisms:
- Owned accounts. The agent acts through an account you connected and control. There is no shared account pool.
- Session isolation. Each account runs in its own anti-detect cloud browser with a dedicated proxy. One account, one session, one device signature.
- Warm-up. A new account starts at a fraction of platform maximum, and its allowance is raised programmatically as the account ages and builds history.
- Server-side limits. Per-action daily budgets are checked before dispatch, one for each of 14 action types.
- Randomized pacing. Calls of one action type leave one at a time, and each gap is varied by up to 20%.
- Preview then confirm. A single write to LinkedIn (a message, an invitation, a post, a reaction) returns a preview and a short-lived token bound to the tool, the exact arguments and the workspace, and it runs only when a second call brings that token back. A bulk run is previewed once as a plan, and leads added to it later run on that approval.
20,000+ LinkedIn accounts run on this stack, and under 1% of them have ever been restricted. The safety layer in detail: gtm-api.com/safe-linkedin-automation.
How it compares to open-source LinkedIn MCP servers
Cookie-driven servers such as stickerdaniel/linkedin-mcp-server run a browser session with your own LinkedIn cookie and leave pacing to you: the project's README documents the cookie login flow and lists no rate limiting. Apify's LinkedIn actors are a different shape, hosted scrapers priced per result and focused on pulling data out.
| gtm-api (managed) | Cookie-driven open source |
|---|
| Account model | Owned, warmed, isolated | Your live cookie session |
| Safety layer | Anti-detect browser, dedicated proxy, limits | Not built in |
| Limit enforcement | Server side, before every action | You build it |
| Sends (connect, message, InMail) | Yes, with preview then confirm | Partial or none |
| Published restriction figure | Under 1% of 20,000+ accounts ever restricted | Not published |
| Support | Managed | Community |
| Price | From $39 per connected account per month, $10 at volume | Free, run it yourself |
| Self-hosted, auditable code | No, managed service | Yes |
Pricing
Volume pricing per connected account per month, from $10/account at scale, with no per-call or per-action fees. Forever free plan, no card: gtm-api.com/pricing.
A note on LinkedIn's terms
LinkedIn's User Agreement does not permit third-party automation, so every tool in this space carries risk and no vendor can promise otherwise. By design, gtm-api reduces that risk by acting only on accounts you own, with warm-up, randomized pacing and enforced limits. This is not legal advice.
Links
gtm-api.com, the LinkedIn API and MCP server for AI agents.