> ## Documentation Index
> Fetch the complete documentation index at: https://felix.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP Server

> Connect Felix to AI assistants using the Model Context Protocol (MCP).

## Overview

Felix exposes an [MCP (Model Context Protocol)](https://modelcontextprotocol.io) server that lets AI assistants create, manage, and run workflows on your behalf. Any MCP-compatible client — Claude Code, Claude Desktop, Cursor, or custom agents — can connect to it.

The MCP server provides the same capabilities as the REST API, packaged as tool calls that AI models can invoke directly.

## Endpoint

```
https://felix.so/api/mcp
```

Authentication uses the same `x-api-key` header as the REST API.

## Connecting from Claude Code

```bash theme={null}
claude mcp add felix --type http \
  --url https://felix.so/api/mcp \
  --header "x-api-key=YOUR_API_KEY"
```

Get your API key from [Profile](https://felix.so/app/profile).

Once connected, Claude Code can use Felix tools directly in conversation:

```
> Create a workflow that scrapes Hacker News and extracts the top stories

Felix is creating your workflow...
Workflow created: https://felix.so/app/workflows-v3/550e8400-...
The planning agent is now designing your workflow. Open the link to watch progress.
```

## Connecting from Claude Desktop

Add to your Claude Desktop config file (`~/Library/Application Support/Claude/claude_desktop_config.json` on Mac):

```json theme={null}
{
  "mcpServers": {
    "felix": {
      "type": "http",
      "url": "https://felix.so/api/mcp",
      "headers": {
        "x-api-key": "YOUR_API_KEY"
      }
    }
  }
}
```

Restart Claude Desktop after saving.

## Available Tools

| Tool              | Description                                                                              |
| ----------------- | ---------------------------------------------------------------------------------------- |
| `list_workflows`  | List or search workflows in your organization (paginated)                                |
| `get_workflow`    | Get workflow details including input schema and required integrations                    |
| `create_workflow` | Create a workflow from a prompt and start the planning agent                             |
| `run_workflow`    | Execute a workflow and wait for results (metadata by default, optionally inline content) |
| `get_execution`   | Get execution status and results (includes inline content by default)                    |
| `list_executions` | List executions for a workflow (paginated)                                               |

### create\_workflow

Creates a new workflow and starts the planning agent to design it based on your prompt.

**Parameters:**

| Parameter     | Type   | Required | Description                                |
| ------------- | ------ | -------- | ------------------------------------------ |
| `prompt`      | string | Yes      | What should this workflow do?              |
| `name`        | string | No       | Workflow name (defaults to auto-generated) |
| `description` | string | No       | Workflow description                       |

**Returns:** Workflow ID, name, URL to view in the UI, and status `"planning"`.

### run\_workflow

Executes a workflow and **waits for it to complete** (up to 10 minutes). Returns execution metadata (status, IDs, output filenames, and presigned URLs). Use `get_execution` to fetch inline file content when needed, or pass `include_outputs: true` to get it in the same call.

If the workflow has an input schema (human checkpoint on step 1), you must provide matching input data.

**Parameters:**

| Parameter         | Type          | Required | Description                                                             |
| ----------------- | ------------- | -------- | ----------------------------------------------------------------------- |
| `workflow_id`     | string (uuid) | Yes      | The workflow to execute                                                 |
| `input`           | object        | No       | Input data matching the workflow's `input_schema`                       |
| `wait`            | boolean       | No       | Wait for completion (default: `true`). Set `false` for fire-and-forget. |
| `include_outputs` | boolean       | No       | Include inline file content in results (default: `false`).              |

**Returns:** Execution ID, workflow ID, workflow name, final status, URL, and results array with filenames and presigned URLs. When `include_outputs` is `true`, text-based files also include inline `content`.

### get\_execution

Retrieves the current status of an execution. When status is `finished`, includes result files with inline text content and presigned download URLs (valid for 1 hour) by default.

**Parameters:**

| Parameter         | Type          | Required | Description                                                                                 |
| ----------------- | ------------- | -------- | ------------------------------------------------------------------------------------------- |
| `workflow_id`     | string (uuid) | Yes      | The workflow ID                                                                             |
| `execution_id`    | string (uuid) | Yes      | The execution ID                                                                            |
| `include_outputs` | boolean       | No       | Include inline file content in results (default: `true`). Set `false` to get metadata only. |

### list\_workflows / list\_executions

Both support pagination via `limit` (1-100) and `cursor` parameters.

### get\_workflow

Returns workflow details including `input_schema` (JSON Schema) if the workflow's first step is a human checkpoint, and `required_integrations` listing any external services the workflow needs.

## Example: End-to-End with Claude Code

```
> Create a workflow that takes a company name as input, researches it online,
  and generates a one-page company brief

✓ Workflow created: https://felix.so/app/workflows-v3/abc123...
  Planning agent is building your workflow now.

> Run the "Company Brief" workflow with company name "Anthropic"

Running workflow... (waiting for results)

✓ Execution finished.
  Results:
  - brief.md:
    # Anthropic — Company Brief
    Anthropic is an AI safety company founded in 2021...
```

Since `run_workflow` waits for completion by default, the AI assistant gets the results in a single step — no polling loop needed.
