How to Use the VesselAPI MCP in LangChain
Run complex maritime queries with LangChain agents.
Works with every AI agent you already use
…and any MCP-compatible client
Connect VesselAPI MCP to LangChain
Create your Vinkius account to connect VesselAPI 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 Vessel Analysis for LangChain
Start by calling `check_api_status` to confirm the connection is live. You can then chain this status check into a sequence that calls `search_vessels` using the retrieved port list from `list_maritime_ports`. This creates an audit trail showing which data points you checked and when. This chaining ability lets your agent decide it needs more info. It might take the vessel name found in `search_vessels` and use that as input for a targeted call to `get_vessel_details`, building a full profile step by step.
MCP Server: Scheduling Chains
Build sequences around scheduling. First, the agent runs `list_maritime_ports` to see available destinations. Next, it uses a port name and vessel ID in `get_vessel_schedules`. You'll get all upcoming calls, which you can then feed into another tool call that checks for specific operational status using `check_api_status`. This makes sure the agent doesn't just report schedules; it validates them against current API requirements. It’s perfect for building automated port compliance workflows.
Real-Time Position Tracking Flow
Need to track a vessel? The flow begins with `search_vessels` to get the IMO number. You then pass that ID directly to `get_vessel_details` for static data, and immediately follow up by calling `get_vessel_position`. This gives your agent both the permanent specs and the live location in one go. It’s a clean chain: identify vessel -> get core details -> report current status. Your agent handles the handoff between these distinct calls automatically.
Set up VesselAPI 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 VesselAPI 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({
"vesselapi-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 VesselAPI 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 VesselAPI. 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 VesselAPI MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the VesselAPI MCP today
We host it, we monitor it, we maintain it. You just paste one token.