# Mapflow MCP

> Mapflow connects your AI client to geospatial processing. It automatically extracts features—like buildings, roads, and vegetation—from satellite or drone imagery. You initialize a project, trigger an AI model run, monitor its status, and pull back clean vector datasets (GeoJSON, Shapefile) ready for GIS analysis.

## Overview
- **Category:** artificial-intelligence
- **Price:** Free
- **Tags:** geospatial-ai, satellite-imagery, drone-mapping, computer-vision, vector-data, feature-extraction

## Description

Mapflow connects your AI client to geospatial processing. It lets you automatically pull features—like buildings, roads, and vegetation—right out of satellite or drone imagery without writing a single line of code. You'll use this server to manage complex mapping projects and run deep-learning models on huge image files.

**Setting Up Your Workspace:**

You start by keeping all your analyses neat and separate using `create_project`. This tool sets up a dedicated folder, or container, for every related geospatial task you’re doing. You'll use `list_projects` to pull up a list of every single mapping project you've ever set up with Mapflow. If you need to see what projects already exist, just call `list_projects`. 

**Selecting Models and Jobs:**

Before you run anything, you gotta know what AI models are out there. You can use `list_models` to pull a list of every specialized model available for feature extraction. These include specific tools for identifying things like forest cover or building footprints. Once you've chosen your scope, you initiate the work by calling `create_processing`. This tool takes your raw image data and lets you specify the exact AI model it should use to start analyzing the imagery.

**Tracking the Work:**

Processing big images takes time, so you need a way to track what's going on. You can check if a specific background processing task is running, queued up, or finished by using `get_processing_status`. If you want a full history of all the jobs you've run against the platform, you use `list_processings` to pull that list. When you need to manage your projects themselves, calling `list_projects` also shows you what containers are active.

**Getting the Results:**

The moment the job is finished, you can grab the structured data using `get_processing_result`. This tool downloads the final vector datasets—think GeoJSON or Shapefile formats—ready for immediate GIS analysis. Because you've got a running list of all your jobs via `list_processings`, you know exactly which processing run corresponds to the results you need to download.

**The Workflow in Action:**

You first establish order by calling **`create_project`** to set up a container for your specific mapping scope. Then, using that project context, you kick off the analysis with **`create_processing`**, feeding it the image data and telling it which AI model—like 'Road Networks' or 'Commercial Structures'—to use. You’ll then monitor progress by checking the status with **`get_processing_status`**; if you need to review previous runs, **`list_processings`** gives you that history. When the job is complete, you pull back the clean data using **`get_processing_result`**. Throughout this process, **`list_models`** lets you see every available AI tool, and **`list_projects`** keeps track of all your current and past work.

## Tools

### create_processing
Starts a new job that analyzes satellite imagery based on your input data.

### create_project
Sets up a container or folder to hold all related mapping projects and analyses.

### get_processing_result
Downloads the final, structured vector data once an analysis job has finished successfully.

### get_processing_status
Checks if a specific background processing task is running, queued, or complete.

### list_models
Displays every specialized AI model available for feature extraction (e.g., roads, buildings).

### list_processings
Shows a list of all background processing jobs you’ve run against the platform.

### list_projects
Retrieves and displays all the mapping projects you have created with Mapflow.

## Prompt Examples

**Prompt:** 
```
List available AI models and my active projects.
```

**Response:** 
```
AI Models: 8 available. 'Building Footprints' (v2.1), 'Road Networks' (v1.5), 'Forest Cover' (v3.0), 'Construction Sites', 'Agriculture Fields'. Active projects: 3. 'Seattle Urban Planning' (Buildings), 'Amazon Monitoring' (Forest), 'Highway Survey' (Roads).
```

**Prompt:** 
```
Start processing building footprints for the Seattle project.
```

**Response:** 
```
Processing task started! ✅ Task ID: tsk_8901. Model: 'Building Footprints' (v2.1). Area: 14 sq km (Seattle downtown). Imagery: Maxar SecureWatch. Estimated time: 14 minutes. Status: Queued. Cost: 28 credits.
```

**Prompt:** 
```
Check status of task tsk_8901 and show dataset results.
```

**Response:** 
```
Task tsk_8901 status: Completed ✅ (Took 12m 45s). Dataset generated: 'Seattle_Buildings_Final'. Features extracted: 14,250 polygons. Confidence score avg: 92%. Formats available: GeoJSON, Shapefile, Geopackage. Ready for download.
```

## Capabilities

### Create New Mapping Projects
Initializes a container for related geospatial tasks, keeping your analyses organized by project name.

### Run Imagery Analysis Jobs
Triggers the AI models to process raw satellite or drone images, detecting specific features like buildings or roads.

### Check Job Status and Results
Monitors active processing tasks, providing real-time status updates and retrieving finished vector datasets.

### List Available AI Models
Retrieves a list of all specialized models (e.g., forest cover, building footprints) you can apply to your imagery.

## Use Cases

### Assessing Urban Expansion
An urban planner needs to know how many new structures appeared in a neighborhood. They use `create_project` for 'Downtown Sector', then run `create_processing` with the 'Building Footprints' model on recent drone imagery. Once done, they pull the results via `get_processing_result` and overlay them on old census data to calculate growth rates.

### Monitoring Wildfires
An environmentalist tracks a burned area by running multiple jobs. First, they use `list_models` to select 'Forest Cover' and run it across the entire region via `create_processing`. They then check status with `get_processing_status` until all tiles are complete, giving them a full dataset of cleared land.

### Infrastructure Audits
A civil engineer needs to map every major road intersection. They create a new project and use `create_processing` with the 'Road Networks' model across high-resolution satellite imagery, making it fast and accurate compared to manual mapping.

### Comparative Analysis
A researcher wants to compare agricultural yield changes over two years. They set up one project and run `create_processing` twice—once for Year 1 data and once for Year 2 data, using the 'Agriculture Fields' model. This allows them to use `get_processing_result` on both sets of polygons side-by-side.

## Benefits

- Gets rid of manual feature counting. Instead of manually tracing boundaries on a map, you run `create_processing` with an AI model and get thousands of clean polygons back instantly.
- Keeps your work organized across complex projects. Use `list_projects` and `create_project` to silo different analyses—like 'Seattle Buildings' vs. 'Amazon Forests'—so they never mix up data streams.
- Knows exactly where the job stands. The `get_processing_status` tool lets you poll a task ID without guessing if it stalled or finished, saving time waiting on unknown processes.
- Works with specialized models for specific needs. You don’t just get 'features'; you specify 'Forest Cover' using `list_models`, ensuring the AI uses the right detection method.
- Delivers usable data formats. When a job is done, `get_processing_result` gives you GeoJSON or Shapefile—data ready to drop straight into ArcGIS or QGIS.

## How It Works

The bottom line is you manage a multi-step asynchronous workflow: set up > trigger > wait > download.

1. First, use `create_project` to define the scope and name for your analysis.
2. Next, call `create_processing`, passing the image data and selecting a model via an existing project ID. This starts the job in the background.
3. Finally, periodically check the status using `get_processing_status`. When it returns 'Completed', use `get_processing_result` to get the final vector dataset.

## Frequently Asked Questions

**How do I start analyzing an image with Mapflow? (Using create_processing)**
You call the `create_processing` tool, passing in the JSON structure containing the image data and specifying which AI model you want to run. This action sends the job into the queue.

**I ran a job; how do I know if it's finished? (Using get_processing_status)**
You check `get_processing_status` and provide the unique task ID. It tells you if the status is 'Queued', 'Running', or 'Completed'. You keep calling it until you see 'Completed'.

**What data formats does Mapflow give me? (Using get_processing_result)**
The `get_processing_result` tool returns vector datasets, typically in standard formats like GeoJSON or Shapefile. These are ready for direct import into most GIS software.

**I need to run 10 different projects. What should I do? (Using list_projects)**
You should use `list_projects` first. This shows you all your existing work containers, ensuring that when you start a new job via `create_processing`, it attaches correctly to the right project.

**How do I check what kind of features Mapflow can detect using list_models?**
Run `list_models` to see all available AI models. This returns a comprehensive catalog of detectors, including 'Building Footprints,' 'Road Networks,' and 'Forest Cover.' You use this output to decide which model you need before starting any processing job.

**Where can I find records of my past runs using list_processings?**
You use `list_processings` to pull a history of all your geospatial jobs. This shows the unique ID, start date, and model used for every run—even if they weren't part of an active project.

**What specific structure does the input need when I use create_processing?**
The `create_processing` tool requires a JSON string containing necessary parameters. You must include the source imagery ID, the target model name, and any regional bounding box coordinates to start analysis correctly.

**Should I always use create_project before running an analysis?**
Yes, calling `create_project` first establishes a dedicated container for your work. This keeps all related tasks—the initial processing job, subsequent status checks, and final results—grouped together under one project name.

**Can I process satellite imagery and extract vector data?**
Yes. Trigger AI models on imagery to automatically extract buildings, roads, forests, and other features as vector polygons.

**How does Mapflow authentication work?**
Mapflow uses Bearer authentication against `api.mapflow.ai/rest` using your API Key.

**Can I track processing tasks?**
Yes. Monitor processing status, progress percentages, and access completion datasets when ready.