How to Use the arXiv MCP in LangChain
Run multi-step academic research chains in LangChain with instant access to 2.5 million arXiv preprints.
Works with every AI agent you already use
…and any MCP-compatible client
Connect arXiv MCP to LangChain
Create your Vinkius account to connect arXiv 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.
Pipeline arXiv Searches Directly into Your LangChain Chains
The `search_arxiv` tool lets your LangChain agents query the entire arXiv database for computer science, physics, and math preprints. You feed the raw search results directly into the next link of your chain, letting your agent filter papers based on authors or categories like cs.AI without manual copy-pasting. This integration turns search results into structured inputs for your downstream prompts. LangSmith traces every step of this process, showing you exactly how much latency the search adds to your pipeline.
Fetch Full Academic Preprints by ID in LangChain
The `get_arxiv_paper` tool fetches complete details for any specific preprint using identifiers like 2106.09685. Your LangChain agent can extract this metadata and pass it to other tools in your multi-server MCP setup, making it easy to build literature review pipelines. By wrapping this MCP tool in a LangChain agent, you allow your system to make autonomous decisions on which papers to pull. If a search returns a promising title, the agent immediately pulls the full abstract and PDF link to verify the findings.
Trace and Debug Your arXiv MCP Server Workflows
The `search_arxiv` tool links your LangChain agents to our managed MCP server. You get instant visibility into how your agent interacts with the preprint database, letting you monitor tool calls and token usage in real-time. LangSmith tracks the exact payload returned from each academic query. You can see when an agent decides to pull a PDF link or when it pivots to a different search query based on the abstract it just read.
Set up arXiv MCP in LangChain
Prerequisites
- Python 3.10+ installed
-
langchain-mcp-adapters+langgraphpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChainBaseToolobjects. - 2
Connect via HTTP transport
Use
MultiServerMCPClientwith"transport": "http"pointing to your Vinkius endpoint. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Create a ReAct agent
Pass the discovered tools to
create_react_agent()from LangGraph. The agent automatically routes arXiv tool calls through the MCP protocol. - 4
Run with any LLM
Swap
ChatOpenAIforChatAnthropic,ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
async with MultiServerMCPClient({
"arxiv-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 arXiv 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 arXiv. 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 arXiv MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the arXiv MCP today
We host it, we monitor it, we maintain it. You just paste one token.