How to Use the Applitools MCP in LangChain
Build ReAct agents that inspect UI diffs and manage visual baselines directly through LangChain.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Applitools MCP to LangChain
Create your Vinkius account to connect Applitools 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.
Trace Applitools MCP Server execution
LangChain gives you full observability over your visual testing pipelines. When your agent calls `list_batches` to find recent test runs, LangSmith tracks the exact token usage and latency of that request. You see exactly how the model decided to proceed based on the returned batch IDs. You build multi-step reasoning chains where visual test data feeds into other tools. If `get_batch_stats` returns failed tests, the agent can parse those unresolved counts and automatically trigger a Jira ticket creation step. Output from one operation becomes the exact input for the next.
Automate baseline management
Managing visual baselines usually requires clicking through a web UI. Your LangChain agent handles this programmatically by chaining `list_baselines` with `delete_baseline`. It identifies outdated environments and clears them out without human intervention. The agent decides which environments to keep based on intermediate results. It checks `list_branch_baselines` to inspect branch-specific visual states before making any irreversible deletions. You define the logic, and the agent executes the cleanup sequence.
Dig into session details
Sometimes a batch fails and you need to know exactly why. A ReAct agent can grab a specific batch ID and immediately call `get_session` to pull the underlying test session details. It parses the response to find the exact point of failure. This data feeds directly into your broader agentic workflow. After pulling session data, the agent might call `list_results` to format a plain-text summary of the visual regressions. You get a clear explanation instead of raw JSON output.
Set up Applitools 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 Applitools 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({
"applitools-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 Applitools 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 Applitools. 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 Applitools MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Applitools MCP today
We host it, we monitor it, we maintain it. You just paste one token.