How to Use the Worldpay MCP in LangChain
Build complex payment logic with LangChain and Worldpay.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Worldpay MCP to LangChain
Create your Vinkius account to connect Worldpay 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.
Multi-Step Payment Processing for LangChain
Start by checking the API status using `get_api_health`. Then, you can chain that check directly into retrieving specific data. For instance, after confirming the Worldpay connection is live, your agent immediately calls `get_order_details` to fetch all relevant order information. This ability lets your ReAct agents build multi-step reasoning pipelines. You might start by listing settlement funds with `list_payment_settlements`, and the output of that list becomes the input for an agent deciding if a refund is warranted using `refund_payment_order`.
Managing Payment Tokens with MCP Server
Need to handle sensitive card data? Use `create_reusable_token` first. This tool takes raw card details and outputs a safe, reusable token. Once you have that token, your chain doesn't need the raw data again. You can pass this secure token directly into `create_payment_order`, ensuring compliance while still performing necessary actions like generating a new payment order.
Auditing Worldpay Transactions in LangChain
When auditing transactions, you'll often need to check multiple data points. Your chain can first call `get_order_details` for an order code. Next, if the payment was completed, you can follow up by calling `list_webhook_endpoints`. This sequence confirms not only that the order exists but also how Worldpay is configured to notify external systems about its status.
Set up Worldpay 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 Worldpay 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({
"worldpay-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 Worldpay 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 Worldpay. 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 Worldpay MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Worldpay MCP today
We host it, we monitor it, we maintain it. You just paste one token.