The Peil MCP server connects Peil, a Dutch freelancer tool, to MCP-enabled AI assistants (such as Claude, ChatGPT, Gemini), letting users complete timesheet logging, invoice drafting, and financial status queries through prompts.
Purpose Aimed at Dutch freelancers (ZZP'ers), it lets you operate Peil directly within an AI assistant: log hours, draft invoices based on uninvoiced hours, add expenses from receipts, and view statuses such as open invoices, overdue invoices, and effective hourly rate.
Main capabilities
- Timesheet logging (timesheet:write)
- Client management (clients:write)
- Expense logging (expenses:write)
- Invoice drafting (invoices:write)
- Sending emails to clients (invoices:send, irreversible, must always be confirmed first)
Default draft mechanism draft_invoice only creates a draft and does not send anything to the client. Sending is a separate tool, send_invoice, and requires a separate invoices:send permission on the key. A key without that permission can never send emails on behalf of the user.
How to use
- Create a key: In Peil, go to Settings → Developer and create a key with the required permissions. It is recommended to start with read + log hours + draft invoices (add add expenses if you want the assistant to file receipts); do not enable send invoices unless you really want the assistant to email clients. Paste this key as PEIL_API_KEY into the assistant configuration.
- Install the server:
- Simple way (no cloning, no installation): the startup command is uvx peil-mcp (or pipx run peil-mcp).
- Running from source requires Python 3.11 or newer, as well as a local copy of the mcp-server/ folder. You can check the Python version with python3 --version.
- Method A (using uv, no installation step): the startup command is uv run --directory /ABS/PATH/TO/mcp-server peil-mcp. If you don't have uv, you can run curl -LsSf https://astral.sh/uv/install.sh | sh (macOS/Linux) or pip install uv.
- Method B (using pipx, isolated global command): the startup command is peil-mcp. If you don't have pipx, you can run python3 -m pip install --user pipx && python3 -m pipx ensurepath.
- Method C (plain venv + pip, only requires the system's built-in Python): the startup command is /ABS/PATH/TO/mcp-server/.venv/bin/peil-mcp (equivalent to /ABS/PATH/TO/mcp-server/.venv/bin/python -m peil_mcp). To run it, use a plain pip install . (do not use -e/editable install); editable installs rely on .pth path hooks, which may silently fail to load in some environments, causing ModuleNotFoundError: No module named 'peil_mcp'. An editable install is only needed if you are modifying the server itself.
- Connect the assistant: all MCP clients need three things: command (the startup command from step 2), env (PEIL_API_KEY set to the key from step 1), optional PEIL_API_URL (only used when pointing to a non-production Peil, default https://api.peil.app/api/v1)。标准配置块中 command + args means splitting the launch command by spaces.
- Claude Desktop: Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude/), add the configuration block and restart Claude Desktop.
- Claude Code (CLI): The content after -- is the launch command. You can verify with claude mcp get peil (check Status: ✔ Connected), and use /mcp in the session to reconnect.
- Cursor: Add the standard configuration block to .cursor/mcp.json (current project) or ~/.cursor/mcp.json (all projects), then enable peil in Settings → MCP.
- Windsurf: Add the standard configuration block to ~/.codeium/windsurf/mcp_config.json, then click Refresh in the Cascade MCP panel.
- Cline / Roo (VS Code): Open the extension's MCP Servers → Configure panel, and add the standard configuration block to cline_mcp_settings.json.
- VS Code (native Copilot agent mode): Use a slightly different structure—servers (not mcpServers) and an explicit type—placed in .vscode/mcp.json.
- Other MCP clients: Provide the same command + args + PEIL_API_KEY environment variables. The server uses the MCP protocol over stdio; as long as the client can launch a stdio command, it can run Peil.
Examples to try after connecting
- "Where do I stand?" → orientation_snapshot
- "Log 6 hours to De Correspondent today for editing work." → log_hours
- "Draft an invoice from my unbilled hours for De Correspondent." → draft_invoice
- "Here's my train ticket, add it as an expense." (attach photo) → create_expense If the key does not have permission to send invoices enabled, the assistant can prepare everything, but physically cannot send email to the client—the user must send it themselves in Peil.
Local development You can use PEIL_API_URL to point the server to a local backend. If you modify the server, you can edit the installation to pick up changes without reinstalling. Tests use mocked HTTP and do not require a backend (pythonpath = ["src"] in pyproject.toml makes the tests independent of the installation mechanism).
Use cases Suitable for Dutch freelancers to quickly log hours, draft invoices, archive expenses, and view financial overviews within an AI assistant.
Limitations
- The server is a pure client of Peil's public API and requires a Peil account and API key.
- The key and this server are free on all plans, but features that are Pro in Peil (emailing invoices, reminders, recurring invoices) remain Pro when used through the key.
- Sending an invoice is irreversible, requires separate invoices:send permission, and should always be confirmed first.
- Running from source requires Python 3.11 or newer.
- Other features, charges, prices, platforms, or effects not described in the materials are not yet provided.