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.4.5.tar.gz (30.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.4.5-py3-none-any.whl (43.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for nocfo_cli-1.4.5.tar.gz
Algorithm Hash digest
SHA256 925e9b44b053e98516fda0b648c0cec5a5af97868affb407fbebaef1818d4769
MD5 2d03a3115fc5b95e451e91cc96f10f75
BLAKE2b-256 f788bc5e720a382f93a23be36ba570cb145529535c639bd6755b61fb68139c32

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for nocfo_cli-1.4.5-py3-none-any.whl
Algorithm Hash digest
SHA256 943a51b0df036d555992ab0da50ac64798b8fe1d6d60862913a9913032be9e4b
MD5 efec422873c21d7a369d3a3afc6139f7
BLAKE2b-256 a14c74ca278e0bccca0738e09d8cb64bae0d8647360ec40712176ce249d60fbf

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