OpenCollective MCP Server
Provides programmatic access to OpenCollective and Hetzner Cloud to automate bookkeeping, collective management, and invoice handling. It enables AI agents to manage expenses, query transactions, and automatically reconcile hosting invoices without manual intervention.
README
OpenCollective MCP Server
A Model Context Protocol server that gives AI agents programmatic access to OpenCollective, Hetzner Cloud, and Cloudflare — enabling automated bookkeeping, collective management, and invoice handling without manual intervention.
What is it?
This MCP server exposes 22 tools that let AI agents interact with:
- OpenCollective GraphQL API v2 — Manage collectives, submit expenses, process payments, query transactions, and handle members
- Hetzner Cloud invoices — Automatically fetch, parse, and reconcile hosting invoices
- Cloudflare billing — Track CDN and hosting costs via the billing history API
The Problem
If you run an OpenCollective-backed project with infrastructure on Hetzner, you face a tedious monthly ritual:
- Log into Hetzner → navigate to invoices → download the PDF
- Manually extract the amount, date, and line items
- Log into OpenCollective → create a new expense → copy-paste the data
- Submit and wait for approval
Repeat every month. Forever.
This MCP automates it.
Who is it for?
- Open collective maintainers who want to automate expense workflows
- DevOps engineers running infrastructure on Hetzner who track costs via OpenCollective
- AI developers building agents that need to manage budgets, expenses, or financial reporting
- Bookkeepers tired of copy-pasting invoice data between systems
What can it do?
OpenCollective Operations (13 tools)
| Tool | What it does |
|---|---|
oc_get_account |
Get detailed info about any collective (balance, stats, social links) |
oc_search_accounts |
Search across all OpenCollective accounts |
oc_get_logged_in_account |
Get the authenticated user's account |
oc_edit_account |
Update collective profile (name, description, tags, currency) |
oc_get_members |
List members, backers, and their donation totals |
oc_list_expenses |
Query expenses with rich filters (status, type, date, tags) |
oc_get_expense |
Get full expense details by ID |
oc_create_expense |
Submit new expenses (INVOICE, RECEIPT, GRANT, etc.) |
oc_edit_expense |
Modify existing expenses |
oc_delete_expense |
Remove expenses |
oc_process_expense |
Approve, reject, pay, hold, or release expenses |
oc_list_transactions |
Query the ledger (credits/debits, linked expenses) |
oc_execute_graphql |
Escape hatch for any GraphQL operation |
Hetzner Operations (6 tools)
| Tool | What it does |
|---|---|
hetzner_list_invoices |
List all invoices (paginated) |
hetzner_get_invoice |
Get a specific invoice by ID |
hetzner_get_latest_invoice |
Fetch the most recent invoice |
hetzner_get_invoice_pdf |
Download invoice as PDF (base64) |
hetzner_parse_invoice_pdf |
Extract structured data from invoice PDF |
hetzner_get_invoice_details |
Get line-item breakdown from usage portal |
Cloudflare Operations (3 tools)
| Tool | What it does |
|---|---|
cloudflare_list_invoices |
List billing history (paginated). Auto-converts USD to EUR using historical ECB rates |
cloudflare_get_invoice |
Get a specific billing item by ID. Includes EUR conversion |
cloudflare_get_latest_invoice |
Fetch the most recent billing item. Returns amount_cents_eur ready for OpenCollective |
The Monthly Bookkeeping Workflow
# 1. Fetch the latest Hetzner invoice
invoice = hetzner_get_latest_invoice()
# 2. Submit it as an expense to your collective
oc_create_expense(
account_slug="my-collective",
description=f"Hetzner Cloud - {invoice['date']}",
expense_type="INVOICE",
payee_slug="my-org",
items=[{
"description": f"Cloud services - {invoice['date']}",
"amount_cents": invoice['amount_cents'],
"currency": "EUR"
}],
tags=["hetzner", "hosting"]
)
# For Cloudflare (automatically converts USD to EUR)
invoice = cloudflare_get_latest_invoice()
oc_create_expense(
account_slug="my-collective",
description=f"Cloudflare - {invoice['date']}",
expense_type="INVOICE",
payee_slug="my-org",
items=[{
"description": f"Cloudflare services - {invoice['date']}",
"amount_cents": invoice['amount_cents_eur'], # Already converted!
"currency": "EUR"
}],
tags=["cloudflare", "hosting", "cdn"]
)
That's it. One agent prompt = one booked expense.
What it's NOT
- Not a replacement for human judgment — Expenses still need approval based on your collective's policies
- Not a financial advisory tool — It moves data, not money; you control the payouts
- Not limited to Hetzner — The
oc_execute_graphqltool lets you run any OpenCollective operation, so you can manage Stripe payouts, Wise transfers, or budget forecasting - Not a GUI — It's a backend for AI agents; use the OpenCollective dashboard for manual tasks
Quick Start
1. Clone and install
git clone https://github.com/your-org/opencollective-mcp.git
cd opencollective-mcp
pip install -e .
2. Configure environment
Copy .env.example to .env and fill in:
cp .env.example .env
# Edit .env with your credentials
| Variable | Required for | How to get it |
|---|---|---|
OPENCOLLECTIVE_TOKEN |
Write operations | OpenCollective dashboard → For Developers → Personal Tokens |
HETZNER_ACCOUNT_EMAIL |
Hetzner invoice tools | Your Hetzner account email |
HETZNER_ACCOUNT_PASSWORD |
Hetzner invoice tools | Your Hetzner password |
HETZNER_TOTP_SECRET |
Hetzner invoice tools (if 2FA) | Shown when you enable 2FA |
CLOUDFLARE_API_TOKEN |
Cloudflare billing tools | Cloudflare dashboard → My Profile → API Tokens → Create Token with "Billing:Read" permission |
3. Run the server
# Direct
python -m opencollective_mcp
# Or via installed script
opencollective-mcp
4. Connect to Claude Desktop
Add to your ~/.claude.json:
{
"mcpServers": {
"opencollective": {
"command": "python",
"args": ["-m", "opencollective_mcp"],
"env": {
"OPENCOLLECTIVE_TOKEN": "your-token",
"HETZNER_ACCOUNT_EMAIL": "you@example.com",
"HETZNER_ACCOUNT_PASSWORD": "your-password",
"CLOUDFLARE_API_TOKEN": "your-cloudflare-token"
}
}
}
}
Why build this?
Because infrastructure costs should be visible, automated, and auditable — exactly what OpenCollective provides for open source projects.
We built this to solve our own bookkeeping pain: tracking Hetzner hosting costs for Going Dark and automatically submitting them as expenses each month. Now our AI agent does it.
If you run a collective with cloud infrastructure, this saves you 15–30 minutes every month — and eliminates human error from manual data entry.
License
Apache License 2.0
Built with FastMCP, httpx, and Playwright.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。