Bring Geospatial Data
to Mastra AI
Create your Vinkius account to connect SafeGraph to Mastra AI and start using all 10 AI tools in minutes. Fully managed, enterprise secure, and ready to use without writing a single line of code. No hosting, no server setup — just connect and start using.
Compatible with every major AI agent and IDE
What is the SafeGraph MCP Server?
Empower your AI with direct connectivity to SafeGraph, the foundational geospatial and mobility dataset trusted by top analytics and enterprise organizations globally. This robust integration converts your AI into an expert geographical analyst capable of retrieving precise intelligence surrounding global structures, Points of Interest (POIs), and detailed patterns—all without touching complex database pipelines.
What you can do
- Rich Context on POIs — Fetch exhaustive lists of businesses or brands within targeted radii (
search_distance_radius,search_brand_places). You can also slice the results according to their designated NAICS industry codes region-to-region (search_industry_naics). - Deep Geospatial Footprints — Look up exact WKT polygons for targeted individual buildings (
lookup_building_geometry) or identify everything bounded inside designated custom city borders (search_wkt_polygon). Understand structural hierarchies immediately by querying parent containers like malls or industrial complexes (lookup_parent_polygon). - Pedestrian and Mobility Insights — Audit recent visit metrics, dwell times, and absolute foot traffic measurements attached to individual structures leveraging historical aggregation points (
lookup_place_patterns). - Native GraphQL Exploration — Pass perfectly structured GraphQL queries straight to the root mapping infrastructure for fully-unlocked edge cases (
graphql_raw_query). Request and resolve bulk Placekeys efficiently on demand (batch_lookup_placekeys).
How it works
- Install this SafeGraph mapping block into your AI workspace.
- Sign into the SafeGraph Dashboard environment.
- Request or generate a valid GraphQL API Key within your workspace settings.
- Input that key securely. Chat instantly: "Find all coffee shop POIs located within a 500-meter radius around longitude -122.33, latitude 47.60."
Built-in capabilities (10)
Provide them as a JSON array. Performs multiple Placekey lookups in a single request
Provide the query string and optional variables. Executes a raw GraphQL query against the SafeGraph API
Retrieves the building footprint (polygon) for a specific Placekey
Identifies the parent Placekey for a location (e.g., mall or airport)
Retrieves historical foot traffic patterns for a specific Placekey
Retrieves detailed attributes for a specific location by its Placekey
g., "Starbucks") in a specific city. Searches for locations of a specific brand in a city
Specify lat, lon, and radius in meters. Searches for places within a specific radius from a point
Searches for places by NAICS industry code and region
Finds all places within a specific geometric polygon (WKT)
Why Mastra AI?
Mastra's agent abstraction provides a clean separation between LLM logic and SafeGraph tool infrastructure. Connect 10 tools through Vinkius and use Mastra's built-in workflow engine to chain tool calls with conditional logic, retries, and parallel execution. deployable to any Node.js host in one command.
- —
Mastra's agent abstraction provides a clean separation between LLM logic and tool infrastructure. add SafeGraph without touching business code
- —
Built-in workflow engine chains MCP tool calls with conditional logic, retries, and parallel execution for complex automation
- —
TypeScript-native: full type inference for every SafeGraph tool response with IDE autocomplete and compile-time checks
- —
One-command deployment to any Node.js host. Vercel, Railway, Fly.io, or your own infrastructure
SafeGraph in Mastra AI
Why run SafeGraph with Vinkius?
The SafeGraph connection runs on our fully managed, secure cloud infrastructure. We handle the hosting, maintenance, and security so you don't have to deal with servers or code. All 10 tools are ready to work instantly without any complex setup.
You stay in complete control of your data. Your AI only accesses the information you approve, keeping your sensitive passwords and private details completely safe. Plus, with automatic optimizations, your AI works faster and more efficiently.

* Every connection is hosted and maintained by Vinkius. We handle the security, updates, and infrastructure so you don't have to write code or manage servers. See our infrastructure
Over 4,000 integrations ready for AI agents
Explore a vast library of pre-built integrations, optimized and ready to deploy.
Connect securely in under 30 seconds
Generate tokens to authenticate and link external services in a single step.
Complete visibility into every agent action
Audit live requests, latency, success rates, and active security compliance policies.
Optimize spending and track token ROI
Analyze real-time token consumption and cost metrics detailed by connection.




Explore our live AI Agents Analytics dashboard to see it all working
This dashboard is included when you connect SafeGraph using Vinkius. You will never be left in the dark about what your AI agents are doing with your tools.
SafeGraph and 4,000+ other AI tools. No hosting, no code, ready to use.
Professionals who connect SafeGraph to Mastra AI through Vinkius don't need to write code, manage servers, or worry about security. Everything is pre-configured, secure, and runs automatically in the background.
Raw MCP | Vinkius | |
|---|---|---|
| Ready-to-use MCPs | Find and configure each manually | 4,000+ MCPs ready to use |
| Connection Setup | Manual coding & server setup | 1-click instant connection |
| Server Hosting | You host it yourself (needs 24/7 uptime) | 100% hosted & managed by Vinkius |
| Security & Privacy | Stored in plaintext config files | Bank-grade encrypted vault |
| Activity Visibility | Blind execution (no logs or tracking) | Live dashboard with real-time logs |
| Cost Control | Runaway AI token spend risk | Automatic budget limits |
| Revoking Access | Must delete files or code to stop | 1-click disconnect button |
How Vinkius secures
SafeGraph for Mastra AI
Every request between Mastra AI and SafeGraph is protected by our secure gateway. We automatically keep your sensitive data private, prevent unauthorized access, and let you disconnect instantly at any time.
Frequently asked questions
Can I manipulate or delete existing POIs present inside the global SafeGraph spatial indexes?
No. The AI interacts safely with the GraphQL API strictly on a 'read-only' query-bound basis. It has absolutely no inherent capability to corrupt or perform unauthorized destructive operations such as erasing core places or overwriting coordinates in your environment.
Are geometric polygons always provided for queried structures automatically?
No, they must be explicitly queried utilizing the lookup_building_geometry functionality along with a verified Placekey, or structured thoroughly using the standard GraphQL command when available. Otherwise most basic list operations only return textual descriptors and simple pinpoint latitude/longitude figures.
Does the AI download huge databases directly into my storage limit when filtering large geographical boundary ranges (WKT)?
The integration employs a managed response methodology natively implemented through GraphQL constraints. The output responses are strictly paginated securely filtering hundreds of points effectively rather than attempting to sync gigabytes directly to the chatbot at once.
How does Mastra AI connect to MCP servers?
Create an MCPClient with the server URL and pass it to your agent. Mastra discovers all tools and makes them available with full TypeScript types.
Can Mastra agents use tools from multiple servers?
Yes. Pass multiple MCP clients to the agent constructor. Mastra merges all tool schemas and the agent can call any tool from any server.
Does Mastra support workflow orchestration?
Yes. Mastra has a built-in workflow engine that lets you chain MCP tool calls with branching logic, error handling, and parallel execution.
createMCPClient not exported
Install: npm install @mastra/mcp
Explore More MCP Servers
View all →
Besitos Corp
10 toolsIntegrate mobile gaming and rewards via Besitos — list games, track user activity, and manage offers directly from any AI agent.

Cal.com
12 toolsLet anyone book time with you through customizable scheduling pages that sync with your calendar and eliminate back-and-forth.

tl;dv
12 toolsRecord, transcribe, and clip key moments from Google Meet and Zoom calls so your team never misses important meeting insights.

Postmark
10 toolsEquip your AI to send emails, monitor delivery stats, track bounces, and manage Postmark templates directly from your chat.
