How to Use the Wallarm MCP in LangChain
Build complex security reasoning chains with LangChain and Wallarm's MCP Server.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Wallarm MCP to LangChain
Create your Vinkius account to connect Wallarm 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.
Inspect blocked traffic payloads
The `search_security_hits` tool lets your agent pull full request headers and payloads for every piece of blocked traffic. This gives you the raw data needed to figure out exactly what an attacker sent. It's great for building attack pattern recognition chains. You search hits, analyze the payload content with another tool, and then update the finding status using `update_vulnerability_status`.
Discover API endpoints automatically
If you don't know where to start, use `get_discovered_api_inventory`. This function analyzes passive traffic streams and gives your agent a list of every endpoint exposed. You can then feed that inventory into subsequent steps for deeper security checks. This is critical when building multi-step pipelines because it ensures the agent has a complete map of what's available to be exploited.
Manage IP blocklists in chains
Use `create_ip_acl_rule` when your chain needs to enforce network boundaries. You specify if the rule should be 'white' (allow) or 'black' (deny), and then immediately check the current list with `list_ip_acl_rules`. This two-step process is perfect for autonomous decision chains. When an agent detects suspicious activity, it can automatically create a block rule and verify its success using this MCP Server.
Set up Wallarm 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 Wallarm 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({
"wallarm-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 Wallarm 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 Wallarm. 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 Wallarm MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Wallarm MCP today
We host it, we monitor it, we maintain it. You just paste one token.