MCP (streamable HTTP) via langchain-mcp-adapters · LinkedIn

LangChain pipelines that end in a LinkedIn draft

Content pipelines in LangChain often pull from retrieval: your docs, your blog, your call transcripts. The output on LinkedIn is where accuracy and tone matter most, because the post represents a person or a company to buyers. Loading the SocialHandoff MCP tools gives the last node in the pipeline draft_post, and nothing more. The pipeline runs on a schedule, drafts arrive in the inbox, and a person approves the ones that are right.

Prompt

You are the LinkedIn writer at the end of a retrieval pipeline. Using only the retrieved passages from our customer interview transcripts, write one post about a pattern that appears in at least 3 interviews. Do not quote anyone by name. About 150 words. Call draft_post once with networks ['linkedin'].

How to do it

  1. Mint a key Create a key for the pipeline scoped to LinkedIn with the draft permission.
  2. Connect with adapters Use MultiServerMCPClient with transport streamable_http, url https://app.socialhandoff.com/mcp, and an Authorization header, then get_tools().
  3. Filter the tools Pass only draft_post and get_brand_memory to the writer node. Retrieval nodes do not need posting tools.
  4. Or use REST Wrap POST https://app.socialhandoff.com/v1/posts in a @tool with body, networks, and mode submit, and pass an idempotency key per run.
  5. Review Approve or reject in the inbox. Reject reasons help you tune the prompt.

Example draft

In 5 of our last 12 customer interviews, someone said a version of the same thing: "We did not need more data. We needed someone to tell us which number to watch."

These were teams with dashboards everywhere. What they lacked was agreement on one metric that meant the week went well.

So we changed our onboarding. The first call is no longer a product tour. It is 30 minutes picking that one number together.

If you run a data team, it might be worth asking your stakeholders the same question.

Gotchas

  • Retrieval can surface quotes with names. Add names and sensitive phrases to banned topics in brand memory so the guardrail flags them.
  • LinkedIn takes one post per publish. If a node returns a list, it is joined into one post; have the writer return a single string.
  • Reserved LinkedIn characters are escaped server-side. Do not pre-escape in your chain, or backslashes will show in the post.
LinkedIn
  • Character limit: 3,000 characters for a post. The feed shows the first few lines and hides the rest behind a see more link.
  • Media per post: LinkedIn allows multi-image posts, documents, and video. SocialHandoff publishes 1 image per post.
  • Alt text: Supported on images through the API's alt text field. Not available for video or documents.
  • Threads: LinkedIn has no threads. If a draft has several parts, SocialHandoff joins them into one post.
A LinkedIn post scheduler that waits for your approval

Frequently asked questions

Can the pipeline run on a schedule?
Yes. Run it from cron or your orchestrator. Drafts pile up in the inbox until someone reviews them; the kill switch holds everything if needed.
Which models can I use?
Any model LangChain supports. The server does not call a model for drafts; brand memory rewrite uses your own key if you enable it.

Let your agents post. Keep the final say.

Connect your first agent in minutes. Every draft waits in your inbox until you approve it.

14 days free. No card required.

The hosted version is opening soon

Leave your email and we will send one message when hosted accounts open, with your 14-day trial ready. Want it today? Self-host it free from the repo.

Start free trial