4,500+ servers built on MCP Fusion
Vinkius
Ayrshare logo
Vinkius
LangChain logo

How to Use the Ayrshare MCP in LangChain

Connect Ayrshare to your LangChain agents to auto-publish posts and pull live social analytics inside your multi-step chains.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

Ayrshare MCP on Cursor AI Code Editor MCP Client Ayrshare MCP on Claude Desktop App MCP Integration Ayrshare MCP on OpenAI Agents SDK MCP Compatible Ayrshare MCP on Visual Studio Code MCP Extension Client Ayrshare MCP on GitHub Copilot AI Agent MCP Integration Ayrshare MCP on Google Gemini AI MCP Integration Ayrshare MCP on Lovable AI Development MCP Client Ayrshare MCP on Mistral AI Agents MCP Compatible Ayrshare MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
LangChain

Connect Ayrshare MCP to LangChain

Create your Vinkius account to connect Ayrshare to LangChain and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Build social feedback loops with LangChain

This Ayrshare MCP Server exposes tools like `get_post_analytics` and `get_social_analytics` directly to your LangChain ReAct agents. Your agent reads performance metrics, decides which content performs best, and immediately drafts the next update based on real numbers. Every step runs through your LangChain chains. When a post falls below a target engagement threshold, the agent triggers `schedule_post` with a revised copy variant, tracking the entire execution inside LangSmith.

Multi-profile social routing in chains

This Ayrshare MCP Server provides profile management tools to handle complex routing across multiple client brands in your LangChain workflows. Your agent calls `list_profiles` to isolate the target brand account before running any publishing actions. Once the correct profile ID is isolated, the LangChain chain passes that context directly to `create_post`. If a profile needs onboarding, the agent invokes `create_profile` and verifies the connection instantly using `get_account_check`.

Automated queue management via LangGraph

This Ayrshare MCP Server lets your LangChain agents inspect and control social queues dynamically instead of relying on rigid cron jobs. The agent uses `list_auto_schedules` to check current queue slots and adjusts posting times on the fly. If a slot conflicts with a holiday or high-traffic window, the LangChain agent runs `set_auto_schedule` or cleans up old queues with `delete_auto_schedule` to keep your posting schedule optimized.

Setup guide

Set up Ayrshare MCP in LangChain

Prerequisites

  • Python 3.10+ installed
  • langchain-mcp-adapters + langgraph packages
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChain BaseTool objects.

  2. 2

    Connect via HTTP transport

    Use MultiServerMCPClient with "transport": "http" pointing to your Vinkius endpoint. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com.

  3. 3

    Create a ReAct agent

    Pass the discovered tools to create_react_agent() from LangGraph. The agent automatically routes Ayrshare tool calls through the MCP protocol.

  4. 4

    Run with any LLM

    Swap ChatOpenAI for ChatAnthropic, ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.

agent.py
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI

async with MultiServerMCPClient({
    "ayrshare-mcp": {
        "transport": "http",
        "url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
    }
}) as client:
    tools = client.get_tools()

    agent = create_react_agent(
        ChatOpenAI(model="gpt-4o"),
        tools,
    )
    result = await agent.ainvoke({
        "messages": "List recent Ayrshare transactions"
    })
    print(result["messages"][-1].content)

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by Ayrshare. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about Ayrshare MCP in LangChain

Install the adapter package and initialize the client using the Vinkius HTTP endpoint. Pass the tools from `client.get_tools()` directly into your LangChain agent constructor.
Yes, your agent uses `schedule_post` inside any chain to set future publication dates. LangChain handles the decision logic for the timing, while Ayrshare executes the actual delivery.
Every call to tools like `create_post` or `list_history` shows up as a distinct run in your LangSmith dashboard. You can inspect the exact payload sent to Ayrshare and the response payload returned to your chain.
Yes, by chaining `list_profiles` with your publishing tools. The agent identifies the correct profile key first, then routes the `create_post` call to that specific profile.
Vinkius runs the server in an isolated sandbox where your social media API tokens and post data are never written to persistent disk. All communication between LangChain and Ayrshare goes through encrypted transit. That's why your profile credentials stay safe.

Start using the Ayrshare MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 12 tools

We've already built the connector for Ayrshare. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 12 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.