# Fastn MCP MCP

> Fastn MCP connects your AI agent to a low-code backend engine, letting you manage complex business logic without writing code. You can trigger flows instantly, build and update workflow definitions, track execution history step by step, or securely handle API credentials directly from conversation. This is for running real-world, multi-step processes.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** low-code, workflow-automation, api-integration, serverless-flows, backend-as-a-service

## Description

Need to run a complicated backend process? Instead of manually calling multiple endpoints or clicking through five different dashboards, you tell your agent what needs to happen using plain language. The MCP handles the rest. You can define entire workflows—like processing an order from start to finish—and execute them with a single prompt. If that fails halfway through, you don't just get an error code; you get a full history of every step and why it broke. This capability means your business logic stays centralized and auditable. Connect this MCP via the Vinkius catalog, and your agent gains the power to manage sophisticated operational tasks, letting you focus on what you want done instead of how to connect all the APIs.

## Tools

### archive_workflow
Deactivates a workflow definition, preventing it from running accidentally.

### cancel_execution
Stops an active flow run immediately if it's taking too long or failed mid-process.

### create_workflow
Builds a brand new, blank workflow definition blueprint.

### execute_flow
Runs an existing flow immediately using real-time data payloads.

### get_credentials
Retrieves stored API keys and connection details for third-party services.

### get_execution
Fetches the entire, detailed step-by-step history of a single flow run.

### get_quota_daily
Shows how much usage you've consumed today against your plan limit.

### get_quota_summary
Retrieves a high-level summary of all platform usage metrics.

### get_quota_usage
Checks your current consumption level compared to the overall plan limits.

### get_workflow
Retrieves the full, detailed specifications of an existing workflow definition for review.

### list_executions
Provides a list and basic status overview of past flow runs for your tenant.

### list_workflows
Returns an inventory listing all available workflow definitions in the environment.

### publish_workflow
Makes a draft workflow definition live and ready for external execution.

### rotate_credentials
Generates new API keys, keeping your connection secrets fresh and secure.

### store_credentials
Adds and saves sensitive third-party access credentials to the platform.

### update_workflow
Modifies existing workflow definitions before they are published or used.

## Prompt Examples

**Prompt:** 
```
List all flow definitions for tenant 'main-prod'.
```

**Response:** 
```
I've retrieved the workflows for 'main-prod'. You have 3 active flows: 'payment-process', 'send-welcome-email', and 'data-sync'. Which one would you like to inspect?
```

**Prompt:** 
```
Execute the 'data-sync' flow with input { "source": "crm" }.
```

**Response:** 
```
Executing 'data-sync'... The flow completed successfully. The output indicates that 150 records were synchronized from the CRM source. Do you need the full execution trace?
```

**Prompt:** 
```
Show me the step-by-step execution trace for ID 'exec_789xyz' in tenant 'main-prod'.
```

**Response:** 
```
Fetching trace for 'exec_789xyz'... The execution had 4 steps: 1. Auth (Success), 2. Fetch Data (Success), 3. Transform (Success), 4. Load (Success). Total duration was 450ms.
```

## Capabilities

### Execute workflows
Instantly triggers complex, multi-step backend processes using custom data payloads.

### Manage workflow definitions
Allows you to list, create, and update the blueprints for your business logic flows.

### Monitor execution history
Provides full, step-by-step logs of completed or failed runs so you can debug processes.

### Secure credentials management
Stores and rotates API keys and secrets required for third-party connections.

### Check usage quotas
Retrieves real-time data on your platform usage against set limits.

## Use Cases

### Processing a new user sign-up
A product team needs to ensure that when a user signs up, three things happen: an email is sent, their profile is created in the CRM, and a welcome event is logged. Instead of writing one large function handling all three APIs, they use `execute_flow` against a pre-built 'onboarding' flow definition.

### Auditing failed nightly data syncs
A DevOps engineer notices that the daily Salesforce to internal database sync failed. They don't know where it broke, so they use `list_executions` to find the run ID and then call `get_execution` to trace back through every single step until the failure point is clear.

### Updating core business rules
The billing department changes how tax rates are calculated. Rather than deploying a new microservice, they use `get_workflow` to pull the existing 'invoice generation' flow definition, make minor adjustments using `update_workflow`, and then push the change live via `publish_workflow`.

### Securing API access for a new service
A developer needs to connect the system to an entirely new payment gateway. They first use `store_credentials` to save the necessary key, then they tell their agent to update the relevant flow definition using `update_workflow` so it can access that new credential.

## Benefits

- Instead of manually calling multiple endpoints, you can trigger flows directly using `execute_flow` by simply describing the required business action to your agent. The complexity vanishes.
- You don't have to guess if a flow is ready. Use `list_workflows` to see every available definition and `get_workflow` to inspect its exact parameters before you publish it with `publish_workflow`.
- If an execution fails, you get more than just 'Error 500.' You use `get_execution` to drill down into the step-by-step trace, telling you exactly which function failed and why. This cuts debugging time by hours.
- Credential security is handled automatically. Use `store_credentials` to save secrets, then run `rotate_credentials` regularly so your keys never expire or get compromised.
- You always know if the process can even run. Before executing, check quotas using `get_quota_usage` and `get_quota_summary` to prevent unexpected failures due to hitting limits.

## How It Works

The bottom line is you manage and execute complex backend logic using conversation instead of writing API wrappers.

1. First, subscribe to this MCP and provide the required Fastn API Key and Space ID.
2. Next, use your AI agent client to call specific tools; for instance, requesting a list of active workflows or initiating an execution run.
3. Finally, receive real-time results—either the immediate output payload from a successful flow or detailed step-by-step logs if something breaks.

## Frequently Asked Questions

**How do I check if a workflow definition is correct before publishing it? (Using get_workflow)**
You use `get_workflow` to pull the full specification. This lets you review every single parameter and logic gate without risking an incomplete or faulty deployment.

**What if I need to run a flow right now, but it's too big? (Using execute_flow)**
Use `execute_flow` with the necessary input payload. If you suspect resource limits, always check your quota first using `get_quota_usage` before running large batches.

**I need to change a flow definition; do I have to redeploy everything? (Using update_workflow)**
No. You use `update_workflow` to make targeted changes to the existing blueprint, and then you only publish those specific modifications via `publish_workflow`. This keeps your core logic stable.

**How do I secure my keys for a new service? (Using store_credentials)**
You use `store_credentials` to save the API key. The agent then references these stored secrets whenever it runs an execution, so you don't have to handle the raw keys directly.

**How do I debug a failed flow run using the `get_execution` tool?**
The `get_execution` tool provides a full step-by-step trace. This lets you see exactly which step failed and why, so you can pinpoint the error without running multiple test cycles.

**If I need to pause development on a flow, how do I use `archive_workflow`?**
`archive_workflow` deactivates the flow immediately. It keeps the definition safe in your account but prevents accidental execution until you manually decide to publish it again.

**How can I check my current usage and remaining API calls using `get_quota_usage`?**
`get_quota_usage` provides a clear breakdown of your consumption against your plan limits. This is crucial for managing billing expectations before launching any large-scale campaigns.

**When should I use the `rotate_credentials` function?**
You run `rotate_credentials` regularly to refresh your API keys. Doing this minimizes risk if an old credential is ever compromised, keeping your backend systems secure over time.

**Can I trigger a flow and get the result immediately?**
Yes. Use the `execute_flow` tool with the flow name and input data. It performs a real-time sync execution and returns the response directly to the agent.

**How can I debug a failed flow execution?**
You can use `list_executions` to find the ID of the failed run, then use `get_execution` to retrieve a full step-by-step trace of what happened during that specific execution.

**Is it possible to update an existing workflow definition?**
Absolutely. The `update_workflow` tool allows you to modify the JSON definition of any flow. Remember to use `publish_workflow` afterwards to deploy your changes to the live environment.