Home Writing Projects CV

Features

CLI

Submit expenses, list pending items, approve or reject—all from your terminal

Python client

Programmatic access for scripts, automation, and integration with other tools

MCP server

Manage expenses in natural language with Claude Code integration

HTML→PDF conversion

Auto-converts HTML email receipts to PDF for OpenCollective upload

OAuth2 authentication

Secure browser-based auth flow with persistent token storage

Full API coverage

Expenses, collectives, accounts, file uploads—all via GraphQL

Usage

Submit expenses

# Reimbursement with receipt
oc reimbursement "Conference" 500.00 receipt.pdf -c policyengine

# Invoice for services
oc invoice "Consulting" 2000.00 -c policyengine

Manage expenses

# List pending expenses
oc expenses -c policyengine --pending

# Approve or reject
oc approve exp-abc123
oc reject exp-def456

Python client

from opencollective import OpenCollectiveClient

client = OpenCollectiveClient(access_token="...")
client.submit_reimbursement("policyengine", "Travel", 50000, "receipt.pdf")
expenses = client.list_expenses("policyengine", status="PENDING")

MCP server for Claude Code

{
  "mcpServers": {
    "opencollective": {
      "command": "python",
      "args": ["-m", "opencollective.mcp_server"]
    }
  }
}

Installation

1

Install

pip install opencollective

# With PDF conversion support
pip install "opencollective[pdf]"
2

Authenticate

oc auth

Opens browser for OAuth2 login, stores token locally

3

Use

oc me  # verify authentication
oc expenses -c your-collective

This is an unofficial community project, not affiliated with OpenCollective.