How to Use the Google Maps Platform MCP in LangChain
Build LangChain agents that chain real-time routing, geocoding, and distance matrices directly into your custom LLM pipelines.
Works with every AI agent you already use
…and any MCP-compatible client
Connect Google Maps Platform MCP to LangChain
Create your Vinkius account to connect Google Maps Platform 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 Geocoding and Routing in LangChain
The `geocode_address` tool lets LangChain agents feed physical coordinates directly into routing chains. Your agent runs this lookup to turn a messy string into coordinates, then immediately pipes those coordinates into `get_directions` to calculate the driving route. This chaining happens in a single execution step without manual data parsing. You can track the inputs and outputs of these spatial steps inside LangSmith. When the agent uses `get_distance_matrix` to evaluate multiple destinations, you get a clean trace of the exact coordinates and travel times passed between your LangChain components.
Multi-Step Location Discovery
The `find_place_from_text` tool lets you stop writing hardcoded lookup scripts for your LangChain ReAct agent. Let your agent decide when to run a text search to grab a unique identifier, and then use `get_place_details` to extract business hours or phone numbers. The agent evaluates the results at each step to determine if it needs more context. By combining these tools with other APIs in your chain, the agent can cross-reference the output of `search_nearby_places` with an internal database. This lets you build complex geo-location workflows where the agent dynamically adjusts its queries based on real-time feedback.
Global Timezone and Elevation Chains
The `get_timezone` tool coordinates local dispatch times alongside elevation data in your LangChain pipeline. The agent calls this tool to resolve local dispatch times alongside `get_elevation` to assess terrain challenges for specific routes. These tools plug directly into the MCP Server via MultiServerMCPClient, letting you aggregate spatial calculations with your existing vector stores. Your agent resolves geographic constraints in real-time, matching dispatch windows to actual physical locations.
Set up Google Maps Platform 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 Google Maps Platform 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({
"google-maps-platform-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 Google Maps Platform 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 Google Maps Platform. 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 Google Maps Platform MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the Google Maps Platform MCP today
We host it, we monitor it, we maintain it. You just paste one token.