How to Use the Chess.com MCP in LangChain
Build LangChain agents that analyze Chess.com players, games, and stats in a single, observable chain.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Chess.com MCP to LangChain
Create your Vinkius account to connect Chess.com 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.
Chain Tool Calls for Deep Player Scouting
Start with just a username. Your LangChain agent can use `get_player_profile` to confirm they exist, then immediately call `get_player_stats` to check their ratings. It doesn't have to stop there. The agent uses those results to decide the next step. Maybe it calls `get_player_game_archives` to see which months have games, then `get_player_monthly_games` to pull every PGN from their last tournament. Each step is a logical link in your chain, all traced in LangSmith.
Create Custom Tactical Training Workflows
Go beyond the standard puzzle of the day. Build a LangChain agent that generates a personalized tactics session based on your current rating. The agent can check your stats with `get_player_stats`, then fetch a `get_random_puzzle` within your target rating range. You can chain this further. Have the agent log the puzzle's FEN and solution, or even cross-reference the source game's players using `get_player_profile`. It's a simple way to build a custom training loop that adapts to you.
Find Opponents and Clubs with a LangChain MCP Server
Don't just browse the site. Deploy an agent to find your next opponent. It could start by getting a list of grandmasters with `get_titled_players`, check who's online with `is_player_online`, and then pull their current games with `get_player_current_games`. This isn't just for individuals. The same chain can discover communities. Use `get_player_clubs` to see where a strong player hangs out, then use `get_club_info` and `get_club_members` to see if it's a good fit. Your agent does the legwork; this MCP Server gives it the tools.
Set up Chess.com 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 Chess.com 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({
"chesscom-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 Chess.com 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 Chess.com. 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 Chess.com MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Chess.com MCP today
We host it, we monitor it, we maintain it. You just paste one token.