Post with LangChain
Wrap PostLake as a single LangChain tool and your agent can publish to every social network on its own — no per-platform code, one normalised response it can reason over. Or skip the wrapper entirely and connect PostLake's MCP server.
Get started free →No card for the free tier · one API for every network · full MCP access
Prefer no code at all? Connect PostLake's hosted MCP server to your AI assistant (Claude, ChatGPT, Cursor and others) and just ask it to post. It authorizes over OAuth — no key to paste. See the MCP guide.
This is the whole integration — connect your accounts once in the dashboard, then:
from langchain_core.tools import tool
import requests
@tool
def post_to_social(text: str, platforms: list[str]) -> dict:
"""Publish a post to the given social networks via PostLake."""
r = requests.post(
"https://api.postlake.dev/v1/posts",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"text": text, "platforms": platforms, "profile": "my-brand"},
)
return r.json()
# Bind the tool to your model and the agent can now post when asked./v1/posts — the snippet above is the whole thing.model.bind_tools([post_to_social])) or add it to your agent's toolset.List the platforms in one request and PostLake posts to all of them, returning a single normalised shape — your code never branches per platform.
PostLake manages each network's developer app and OAuth for you — nothing to register or get reviewed yourself.
Idempotency keys mean a retry never double-posts, and analytics come back normalised so an agent can decide what to post next.
A free tier to start, then usage-based credits — one per post. You only pay for posts that actually publish.
Define a LangChain tool that calls PostLake's /v1/posts endpoint, then bind it to your model. The agent can then publish to every network through that one tool. You can also connect PostLake's MCP server instead of writing a tool.
No — one tool calling PostLake covers every network, so your agent stays simple and you don't maintain a tool per platform.
Yes. PostLake is an MCP server, so an MCP-capable LangChain setup can use its posting tools directly without a custom wrapper.
Python · Node.js · n8n · Make · Zapier · All guides · Full docs
One API and MCP server for every major network. Free to start.
Get started free →