Skip to main content

NoCFO CLI, MCP server, and Cursor skill toolkit.

Project description

NoCFO AI Toolkit

Give AI assistants full access to Finnish bookkeeping, invoicing, and business data.

PyPI Python License: MIT

Open-source Python toolkit that connects NoCFO to your terminal and AI workflows — a single package powering a CLI client, an MCP server, and a Cursor AI skill.

What You Can Ask

After connecting, you can ask your AI assistant things like:

  • "How many sales invoices do I have this month?"
  • "Who are my top 10 customers by revenue this year?"
  • "Show unpaid invoices due this week."
  • "List bookkeeping documents from January."
  • "What was my VAT total last quarter?"

Why This Is Useful

  • One connection gives your AI assistant direct access to NoCFO business data
  • No need to manually export CSV files for common questions
  • Works for both non-technical users and developers

Fastest Setup (Hosted MCP)

Use the hosted endpoint mcp.nocfo.io when your AI client supports remote MCP connectors.

Connect to Claude

  1. Open Claude settings and go to Connectors / MCP.
  2. Add a new connector.
  3. Enter server URL: mcp.nocfo.io
  4. Sign in with your NoCFO account when prompted.
  5. Open a new chat and test:
    • "List my businesses"
    • "Show this month's sales invoices"

Connect to ChatGPT

If your ChatGPT plan includes MCP/custom connectors:

  1. Open ChatGPT settings and go to Connectors / Integrations.
  2. Add a custom MCP connector.
  3. Set server URL to mcp.nocfo.io
  4. Complete sign-in flow with your NoCFO account.
  5. Test with:
    • "List my contacts"
    • "Show unpaid purchase invoices"

If your workspace does not yet show MCP/custom connector options, use the local setup below with Claude Desktop or Cursor.


Local Setup (Claude Desktop)

Use this when you want to run MCP locally on your machine.

1) Install the toolkit

pip install nocfo-cli

Alternative (no permanent install):

uvx nocfo-cli --help

2) Create NoCFO API token

  1. Open login.nocfo.io/auth/tokens
  2. Click Luo uusi avain / Create new key
  3. Name it (for example: Claude Desktop)
  4. Copy the token and save it to a password manager

3) Add NoCFO MCP to Claude config

Open Claude Desktop config and add:

{
  "mcpServers": {
    "nocfo": {
      "command": "uvx",
      "args": ["--from", "nocfo-cli", "nocfo", "mcp"],
      "env": {
        "NOCFO_JWT_TOKEN": "your_jwt_here"
      }
    }
  }
}

Then restart Claude Desktop.

Claude config file locations
OS Path
Mac ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json

Local Setup (Cursor)

Add the following to your Cursor MCP config (~/.cursor/mcp.json):

{
  "mcpServers": {
    "nocfo": {
      "command": "uvx",
      "args": ["--from", "nocfo-cli", "nocfo", "mcp"],
      "env": {
        "NOCFO_JWT_TOKEN": "your_jwt_here"
      }
    }
  }
}

Then test with a simple prompt like "List my businesses".


CLI Quick Examples

nocfo user me
nocfo businesses list
nocfo invoices list --business <business_slug>
nocfo reports balance-sheet --business <business_slug> --date-at 2026-12-31
nocfo reports balance-sheet-short --business <business_slug> --date-at 2026-12-31
nocfo reports income-statement --business <business_slug> --date-from 2026-01-01 --date-to 2026-12-31
nocfo reports income-statement-short --business <business_slug> --date-from 2026-01-01 --date-to 2026-12-31
nocfo reports ledger --business <business_slug> --date-from 2026-01-01 --date-to 2026-01-31
nocfo reports journal --business <business_slug> --date-from 2026-01-01 --date-to 2026-01-31
nocfo reports vat --business <business_slug> --date-from 2026-01-01 --date-to 2026-01-31
nocfo reports equity-changes --business <business_slug> --date-at 2026-12-31

JSON output:

nocfo --output json businesses list

Advanced / Technical

MCP server modes

  • nocfo mcp = local stdio mode
  • nocfo mcp --transport http --auth-mode oauth --mcp-base-url mcp.nocfo.io = remote HTTP mode
  • Local stdio auth order: NOCFO_JWT_TOKEN first, then NOCFO_API_TOKEN
  • NOCFO_API_TOKEN is optional for stdio when NOCFO_JWT_TOKEN is set

Detailed auth contract and troubleshooting are in MCP_AUTHENTICATION.md.

Auth precedence

Priority Source
1 --api-token CLI flag
2 NOCFO_API_TOKEN env var
3 ~/.config/nocfo-cli/config.json

Default base URL: https://api-prd.nocfo.io Default output format: table

CLI Command Groups

Group Description
auth Configure and verify authentication
businesses List and manage businesses
accounts Chart of accounts
documents Accounting entries and journal documents
contacts Customer and supplier contacts
invoices Sales invoices
purchase-invoices Purchase invoices
products Invoicing products
files File attachments
tags Document tags
user Current user info
mcp Start MCP server

Development

poetry install                # install dependencies
poetry run pytest             # run tests
poetry run nocfo --help       # run CLI locally

Regenerate OpenAPI-based command stubs:

poetry run python scripts/generate_cli_commands.py
Publishing to PyPI
poetry build
poetry config pypi-token.pypi <pypi_token>
poetry publish

For TestPyPI:

poetry config repositories.testpypi https://test.pypi.org/legacy/
poetry config pypi-token.testpypi <testpypi_token>
poetry publish -r testpypi

Security

  • Never commit PAT tokens
  • Keep .env local only
  • Use separate tokens for test and production
  • Local config contains secrets — do not share

License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nocfo_cli-1.3.0.tar.gz (29.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nocfo_cli-1.3.0-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file nocfo_cli-1.3.0.tar.gz.

File metadata

  • Download URL: nocfo_cli-1.3.0.tar.gz
  • Upload date:
  • Size: 29.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.13 Linux/6.17.0-1008-azure

File hashes

Hashes for nocfo_cli-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a601fb6d04b8aa892affbb1822d39d509a265ebe093c2a927c4b2420b4df924c
MD5 e8fa4d730eb01125835b7ca46581648f
BLAKE2b-256 497d682a2d96025cbce6e10d4be978c30074b3a3637db70812eeb855ed7f5349

See more details on using hashes here.

File details

Details for the file nocfo_cli-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: nocfo_cli-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.3 CPython/3.12.13 Linux/6.17.0-1008-azure

File hashes

Hashes for nocfo_cli-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b750f46c07caf93a409777127698a662bb8ec6ffb7675ae4a471c483ddd9d6f5
MD5 7e8b8bb22945bc2ba8fb00050bbf2fe2
BLAKE2b-256 690f9384957878769e23b7ebf83798d04bf87e99060a8ee21fda3547f566edb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page