Automation

Connect LinkedIn saved posts to AI agents with MCP

Give a compatible AI client live search over your saved-post library without uploading a stale JSON file to every conversation.

Karthikeyan Kumar9 min read
Connect LinkedIn saved posts to AI agents with MCP

Exporting JSON to an AI assistant works once. Then you save another post, the file becomes stale, and you repeat the upload. MCP replaces that file handoff with a live tool connection to the LinkedMash library.

A compatible AI client can list, search, count, and retrieve your saved posts when you ask. The model does not scrape LinkedIn and it does not receive your browser session. It calls LinkedMash tools using the account token you configure.

LinkedMash AI Agents page with MCP server URL and API key setup
The AI Agents page is where you create the account key and copy the hosted MCP connection.

MCP versus a JSON export

They are different contracts

A JSON export is a portable snapshot with its own download schema. MCP exposes named tools with their own request and response shapes. Use JSON when your code should own a file. Use MCP when an agent should search the current library and fetch only what the task needs.

  • Less context waste: the client can search first, then retrieve the relevant posts instead of loading an entire export into one prompt.
  • Current library: new imported saves are available without rebuilding and re-uploading a file.
  • Tool boundaries: the client sees the operations LinkedMash exposes, such as listing, searching, reading, labeling, drafting, or scheduling, depending on the available tools and your plan.
  • Source traceability: retrieved posts retain their LinkedIn source context so the agent can point you back to the original.

Connect an AI agent to LinkedMash

  1. 1

    Import your saved posts with the LinkedMash extension. MCP can only search the library already stored in your LinkedMash account.

    LinkedMash showing a completed saved-post import
    The imported library is the data source for MCP tools.
  2. 2

    Open [AI Agents](/integrations/agents). Create or reveal your API key, then copy the MCP server URL shown for your account.

    LinkedMash MCP setup page with key and server URL controls
    Treat the key like a password. Do not paste it into public screenshots, repositories, or shared prompts.
  3. 3

    In your MCP-compatible client, add a remote Streamable HTTP server using the copied URL. LinkedMash also documents bearer-token authentication for clients that separate the endpoint and authorization header.

  4. 4

    Save the configuration, reconnect the client, and ask it to list or search bookmarks. Start with a narrow test such as “Find five saved posts about pricing and include the source links.”

  5. 5

    Review the returned sources before asking for a draft, label change, schedule, or publishing action. Read tools are easy to verify; write actions deserve an explicit checkpoint.

Useful prompts after connection

  • “Search my saved posts for onboarding examples, group them by problem, and cite the original links.”
  • “Find posts I labeled Hooks, show the opening line and author, then identify patterns without copying the wording.”
  • “Pull the strongest saved evidence for this outline and tell me which claims still need an external source.”
  • “Draft three LinkedIn post angles from these references, but wait for approval before creating or scheduling anything.”

Security and product limits

  • The MCP key grants access to your LinkedMash account through the exposed tools. Store it in the client's secret or credential field and rotate it if it is shared accidentally.
  • MCP does not provide LinkedIn with a public saved-posts API. The library first has to be imported through your own LinkedMash workflow.
  • Tool output is not the same schema as the JSON download or REST API. Code against the documented tool contract for the client you are building.
  • An agent can still misunderstand a post or produce weak synthesis. Keep source links, inspect the retrieved text, and require approval for any external publishing action.
  • Client support for remote MCP authentication differs. Follow the LinkedMash connection guide and your client's current MCP documentation.
Connect the live library

Create the account key, add the hosted MCP server to a compatible client, and test a read-only saved-post search before enabling a broader workflow.

Open AI Agents setup

Frequently asked questions

Can an AI agent search my LinkedIn saved posts?

Yes. After the library is imported and the LinkedMash MCP server is connected, compatible clients can use tools to list, search and retrieve saved posts.

Is MCP the same as exporting saved posts to JSON?

No. JSON is a point-in-time file with a download schema. MCP is a live tool interface with its own request and response contracts.

Where do I get the LinkedMash MCP URL and token?

Open AI Agents in LinkedMash. The page lets you create or reveal the account API key and copy the hosted MCP connection.

Should I let an AI agent publish automatically?

Start with read-only search and retrieval. Keep draft, schedule, and publishing actions behind an explicit review step because an agent can still misunderstand a source or produce weak output.

Karthikeyan Kumar
Co-founder, LinkedMash

Co-founder of LinkedMash and Tweetsmash. Builds the import, sync, export and API side of the product, and writes about the plumbing behind a content workflow.

The Mash, weekly

One saved-posts playbook per week

A new playbook, a product note, or one tactic worth stealing from what we have been saving.

One email a week, nothing else. Unsubscribe in one click.