# Harflow MCP server

> Dispatches coding tasks to local headless agents like Claude Code and Cursor with persistent history and reusable workflows.

- Repository: https://github.com/Harflow-Dev/HarflowMCP
- Page: https://hostedmcp.org/servers/harflow-dev/harflowmcp
- Transport: stdio
- Stars: 1
- License: Apache-2.0
- Latest version: 0.0.14

## Install

### Claude Code

```sh
claude mcp add harflowmcp -- uvx harflow-mcp
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "harflowmcp": {
      "command": "uvx",
      "args": [
        "harflow-mcp"
      ]
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "harflowmcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "harflow-mcp"
      ]
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"harflowmcp","type":"stdio","command":"uvx","args":["harflow-mcp"]}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "harflowmcp": {
      "command": "uvx",
      "args": [
        "harflow-mcp"
      ]
    }
  }
}
```

### Codex

```sh
codex mcp add harflowmcp -- uvx harflow-mcp
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.harflowmcp]
command = "uvx"
args = ["harflow-mcp"]
```

### Gemini CLI

```sh
gemini mcp add -s user harflowmcp uvx -- harflow-mcp
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "harflowmcp": {
      "command": "uvx",
      "args": [
        "harflow-mcp"
      ]
    }
  }
}
```

## FAQ

### How do I use Cursor Agent CLI with Harflow?

Headless Cursor dispatch requires 'agent login' or a CURSOR_API_KEY. You can confirm the status by running 'agent status' to ensure an access token is reported.

### Can I restrict the commands an agent can run?

Yes, on macOS with certain backends, you can grant a task a bounded list of specific Bash commands using `allowed_commands` instead of providing unrestricted access.

### What happens to tasks if the MCP server restarts?

Detached task owners preserve output capture and live input across MCP server restarts, and surviving execution is reported as a quiet observation change.

### How can I cancel a running task?

You can use the command `harflow-ctl cancel TASK_ID --json` to cancel a task, which provides a bounded final observation of recorded tasks and pending launches.
