# SafeGraph MCP for AI Agents AI Agent Connect

> SafeGraph lets you put professional-grade geospatial and mobility data into your AI client. It lets you find points of interest, analyze foot traffic, and pull building geometries using plain English. You don't need to build complex database pipelines or write custom scripts to get high-quality location intelligence.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_k1VELw4KIkAhLWgPfwAjiTkVivxf9F11OxjjYZy2/ai-agent-connect
- **Tags:** geospatial-data, poi-data, foot-traffic-analysis, location-intelligence, demographics, data-mapping

## Description

Imagine you're trying to figure out the best spot for a new retail outlet. Instead of jumping between maps, spreadsheets, and different data providers, you just tell your agent what you need. You can ask for every coffee shop in a specific radius, or see exactly how many people visit a mall on a Tuesday afternoon. This Connector turns your AI into a high-level geographical analyst that understands building footprints, industry codes, and brand locations. It pulls from a trusted mobility dataset that most enterprises rely on for serious site selection and market research. By adding this to your Vinkius setup, you're giving your agent a specialized brain for location intelligence. It handles the heavy lifting of interpreting complex geospatial data so you can focus on making decisions based on the numbers. You get to stop worrying about how to fetch the data and start focusing on what the data actually means for your business strategy.

## Tools

### lookup_parent_polygon
Find out which larger complex a location belongs to. Use this to see if a shop is inside a mall or airport.

### lookup_place_patterns
See historical foot traffic and dwell times. This helps you understand how people actually use a space.

### lookup_placekey
Get every detail about a specific location using its unique ID. It's the quickest way to get a full profile.

### search_brand_places
Find every branch of a specific brand in a city. This is great for competitive mapping and market share analysis.

### search_industry_naics
Find businesses based on their specific industry codes and region. Use this for deep demographic and market research.

### batch_lookup_placekeys
Look up multiple location IDs at once to save time. Use this when you have a list of keys and need details fast.

### graphql_raw_query
Run custom GraphQL queries for edge cases. This lets you pull specific data points that standard tools might miss.

### lookup_building_geometry
Get the exact polygon shape of a building. It's useful for mapping physical footprints accurately.

### search_distance_radius
Search for any places within a specific distance from a set of coordinates. It helps you define a local area.

### search_wkt_polygon
Find every place located inside a custom geometric polygon. This works for any specific shape you can define.

## Prompt Examples

**Prompt:** 
```
Find all the Starbucks branches strictly inside the city of Seattle, WA.
```

**Response:** 
```
I've gathered the location data for Starbucks in Seattle. Here are the key details:

| Brand Location | Placekey | Status |
| :--- | :--- | :--- |
| Downtown Seattle | 22m-xyz-1234 | Active |
| Capitol Hill | 88m-abc-5678 | Active |
| Ballard | 44m-def-9012 | Active |

I've identified 50 locations in total across the city. Would you like me to zoom in on a specific neighborhood?
```

**Prompt:** 
```
Check what the detailed building geometry polygon is for Placekey '22m-xyz-1234'.
```

**Response:** 
```
I've retrieved the building footprint for that location. Here is the geometry:

**Building Footprint (WKT):**
`POLYGON((-122.123 47.982, -122.125 47.985, -122.120 47.988, -122.123 47.982))`

This represents the physical boundary of the structure as mapped in the geospatial dataset.
```

**Prompt:** 
```
Can you gather the historical pedestrian traffic patterns evaluating typical visit frequencies around Placekey '123-abc-987'?
```

**Response:** 
```
I've pulled the mobility insights for that location. Here is what the data shows:

*   **Average Daily Visitors:** ~12,000
*   **Median Dwell Time:** 45 minutes
*   **Peak Traffic Windows:** 11:00 AM - 2:00 PM

The location sees consistent high-volume traffic throughout the day, with a significant spike during lunch hours.
```

## Capabilities

### Find brand locations
Identify every branch of a specific brand in a given city.

### Get building shapes
Retrieve the exact polygon footprint for a specific building.

### See foot traffic trends
Pull historical visit metrics and dwell times for specific spots.

### Search by industry codes
Filter places based on NAICS codes and specific regions.

### Query custom boundaries
Find all places located inside a custom geometric polygon.

### Identify parent locations
Determine if a spot belongs to a larger complex like a mall.

## Use Cases

### Retail Expansion Mapping
A brand manager asks to find all competitors within 1km of a new site. The agent uses search_brand_places and search_distance_radius to create a competitive map.

### Urban Mobility Analysis
A city planner wants to know how busy a park is. The agent uses lookup_place_patterns to show historical foot traffic and average dwell times.

### Real Estate Footprint Audit
A developer needs the exact shape of a building. The agent uses lookup_building_geometry to provide the precise polygon for the property.

### Market Density Research
A researcher wants to see how many cafes are in a specific district. The agent uses search_industry_naics to filter by the correct food service codes.

## Benefits

- Stop manually scraping maps with search_brand_places to see where your competitors are located.
- Analyze real human behavior with lookup_place_patterns to see how long people stay at a site.
- Get exact building footprints with lookup_building_geometry for accurate real estate modeling.
- Filter the world by industry with search_industry_naics to find specific business types in any region.
- Query custom areas instantly with search_wkt_polygon to define your own unique search zones.
- Identify complex relationships with lookup_parent_polygon to see if a location is part of a larger hub.

## How It Works

The bottom line is you get instant access to professional mobility data without writing a single line of code.

1. Install the Connector into your AI workspace.
2. Connect your SafeGraph API key from your dashboard.
3. Ask your agent to find places, brands, or traffic patterns.

## Frequently Asked Questions

**How does the SafeGraph MCP help with retail site selection?**
It gives your AI agent the ability to pull real mobility data. You can quickly identify brand clusters, check foot traffic, and see building footprints to make better decisions on where to open a new location.

**Can I use SafeGraph to find specific types of businesses?**
Yes, you can search by specific industry codes. This allows your agent to find every business in a category, like 'restaurants' or 'fitness centers,' within a specific region.

**What kind of building data does the SafeGraph MCP provide?**
It provides precise building geometries. Your agent can retrieve the actual polygon footprint of a building, which is helpful for real estate analysis and mapping.

**Can the SafeGraph MCP show me how many people visit a location?**
It can. The Connector provides historical foot traffic patterns and dwell times. This helps you understand how many people visit a spot and how long they typically stay there.

**Is the SafeGraph MCP good for urban planning?**
It's a great tool for urban planners because it provides mobility insights. You can analyze how people move through different zones and identify high-traffic areas based on real data.

**Can I search for specific brands using the SafeGraph MCP?**
Yes, the Connector includes a tool to search for locations of specific brands in a city. This makes it easy to map out a brand's presence or identify competitors.

**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.