AgentcyAlpha
Integrations/LangChain / LangGraph

Set up LangChain / LangGraph

The leading Python and JavaScript LLM framework. Use langchain-mcp-adapters to convert Agentcy tools into native LangChain tools for use in agents, chains, and graphs.

SETUP
5 STEPS
  1. 01

    Sign up at app.goagentcy.com and create an API key

  2. 02

    Install the adapter: pip install langchain-mcp-adapters langgraph

  3. 03

    Configure the Agentcy server with Streamable HTTP transport

  4. 04

    Replace YOUR_AGENTCY_API_KEY with your actual key

  5. 05

    Call client.get_tools() to convert MCP tools to LangChain tools

CONFIG

path: pip install langchain-mcp-adapters

python
# Python — LangChain MCP Adapters
# pip install langchain-mcp-adapters langgraph

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

async with MultiServerMCPClient({
    "agentcy": {
        "url": "https://data.goagentcy.com/mcp",
        "headers": {
            "Authorization": "Bearer YOUR_AGENTCY_API_KEY"
        },
        "transport": "streamable_http",
    }
}) as client:
    tools = client.get_tools()
    agent = create_react_agent(ChatOpenAI(), tools)
    result = await agent.ainvoke({
        "messages": "How is my site performing?"
    })
Last verified: March 5, 2026Official docs
TIPS

Available for both Python (langchain-mcp-adapters) and JavaScript (@langchain/mcp-adapters). Supports stdio and Streamable HTTP transports. MultiServerMCPClient connects to multiple MCP servers simultaneously. Works with any LangChain-compatible LLM.

EXAMPLE QUERIES
4 SAMPLES

Build a RAG pipeline that includes live marketing data

Create a multi-step agent that researches competitors then analyzes our traffic

What keywords should we target based on our GA4 and GSC data?

Compare our ad performance across all campaigns this month

v1.0Need help?