Skip to main content
Glama
mcp-planfix-tn

mcp-planfix-tn

README.md
# mcp-planfix-tn

MCP server for [Planfix](https://planfix.com) REST API v2. Provides 15 tools for managing tasks, contacts, projects, directories, and more through the Model Context Protocol.

## Installation

### uvx (recommended)

```bash
uvx mcp-planfix-tn
```

### pip

```bash
pip install mcp-planfix-tn
```

### From source

```bash
git clone https://github.com/tinside/mcp-planfix-tn.git
cd mcp-planfix-tn
uv venv --python 3.11 .venv && source .venv/bin/activate
uv pip install -e .
```

## Configuration

Create a `.env` file or set environment variables:

| Variable | Required | Description |
|---|---|---|
| `PLANFIX_TOKEN` | Yes | Planfix API Bearer token |
| `PLANFIX_ACCOUNT` | Yes | Account name (e.g. `mycompany` for `mycompany.planfix.ru`) |
| `PLANFIX_BASE_URL` | No | Override API base URL (default: `https://{account}.planfix.ru/rest`) |
| `PLANFIX_LOG_FILE` | No | Path to file log (default: stderr only) |
| `PLANFIX_WEBHOOK_DB` | No | Path to webhook SQLite DB (default: `~/.local/share/mcp-planfix-tn/webhooks.db`) |

## Usage with Claude Desktop

Add to `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "planfix": {
      "command": "uvx",
      "args": ["mcp-planfix-tn"],
      "env": {
        "PLANFIX_TOKEN": "your-token",
        "PLANFIX_ACCOUNT": "your-account"
      }
    }
  }
}
```

## Usage with Claude Code (.mcp.json)

```json
{
  "mcpServers": {
    "planfix": {
      "command": "uvx",
      "args": ["mcp-planfix-tn"],
      "env": {
        "PLANFIX_TOKEN": "your-token",
        "PLANFIX_ACCOUNT": "your-account"
      }
    }
  }
}
```

## Tools

| Tool | Description |
|---|---|
| `planfix_get_task` | Get a task by ID |
| `planfix_search_tasks` | Search tasks with filters |
| `planfix_create_task` | Create a new task |
| `planfix_update_task` | Update a task |
| `planfix_add_comment` | Add a comment to a task |
| `planfix_list_comments` | List comments on a task |
| `planfix_search_contacts` | Search contacts with filters |
| `planfix_get_contact` | Get a contact by ID |
| `planfix_list_projects` | List all projects |
| `planfix_list_directories` | List all directories |
| `planfix_get_directory_entries` | Get entries from a directory |
| `planfix_explore` | Full account structure exploration |
| `planfix_webhook_stats` | Webhook event statistics |
| `planfix_webhook_log` | Recent webhook events |
| `planfix_raw_request` | Raw API request (any method/endpoint) |

## Extras

### Export (optional)

```bash
pip install 'mcp-planfix-tn[export]'
```

Adds CSV and Excel export via `mcp_planfix_tn.utils.export`.

### Webhook server (example)

```bash
pip install 'mcp-planfix-tn[webhook]'
python examples/webhook_server.py
```

Receives Planfix scenario webhooks and stores them in SQLite.

## Development

```bash
git clone https://github.com/tinside/mcp-planfix-tn.git
cd mcp-planfix-tn
uv venv --python 3.11 .venv && source .venv/bin/activate
uv pip install -e '.[dev]'
python -m mcp_planfix_tn
```

## License

MIT