npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

finan-mcp

v2.1.0

Published

MCP server for Finan Open API — enables AI agents to interact with Finan Banking, Payment, and Business APIs

Readme

finan-mcp

MCP server for Finan Open API — enables AI agents (Claude, GPT, Cursor, etc.) to interact with Finan's Open Banking, Payment, and Business APIs.

v2.1 — Added QR code generation tool. Complete rewrite using official @modelcontextprotocol/sdk. Replaces v1.x (fastmcp-based). All 21 tools verified against production API.

Install

npm install -g finan-mcp

Or run directly with npx:

npx finan-mcp

Configuration

Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "finan": {
      "command": "npx",
      "args": ["-y", "finan-mcp"],
      "env": {
        "FINAN_CLIENT_ID": "your-client-id",
        "FINAN_SECRET_KEY": "your-secret-key"
      }
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "finan": {
      "command": "npx",
      "args": ["-y", "finan-mcp"],
      "env": {
        "FINAN_CLIENT_ID": "your-client-id",
        "FINAN_SECRET_KEY": "your-secret-key"
      }
    }
  }
}

Cursor / Windsurf

Add to .cursor/mcp.json or .windsurf/mcp.json:

{
  "mcpServers": {
    "finan": {
      "command": "npx",
      "args": ["-y", "finan-mcp"],
      "env": {
        "FINAN_CLIENT_ID": "your-client-id",
        "FINAN_SECRET_KEY": "your-secret-key"
      }
    }
  }
}

n8n

Use the MCP Client node with command transport:

| Field | Value | |-------|-------| | Command | npx | | Arguments | -y finan-mcp | | Environment | FINAN_CLIENT_ID=xxx, FINAN_SECRET_KEY=xxx |

Get API Credentials

  1. Sign up at book.finan.one
  2. Go to Settings > Open API
  3. Copy your Client ID and Secret Key

Tools (21)

QR Code

| Tool | Description | |------|-------------| | generate_qr_code | Generate a QR code image for payment transactions. Returns base64-encoded PNG |

Parameters:

| Name | Type | Required | Description | |------|------|----------|-------------| | data | string | Yes | Code content to encode (e.g. payment string, URL) | | border | int | Yes | Border frame width around the QR code (0 for no border) |

Account

| Tool | Description | |------|-------------| | get_master_bank_accounts | List master bank accounts. Filter by id or account_number | | get_bank_accounts | List bank accounts. Filter by id or account_number | | get_bank_account | Get a specific bank account by ID | | create_bank_account | Create a new bank account under a master account |

Payment

| Tool | Description | |------|-------------| | create_payment | Create a payment request. Returns QR code (bank_transfer) or payment URL (card/momo) | | get_payments | List payments. Filter by reference_type and reference_id | | get_payment | Get a specific payment by ID |

Customer

| Tool | Description | |------|-------------| | create_customer | Create a new customer (personal or company) | | get_customers | List all customers (paginated) | | get_customer | Get a specific customer by ID | | update_customer | Update a customer (full replace — all required fields must be included) | | delete_customer | Delete a customer |

Product

| Tool | Description | |------|-------------| | create_product | Create a product with sale/purchase pricing | | get_products | List all products (paginated) | | get_product | Get a specific product by ID | | delete_product | Delete a product |

Invoice

| Tool | Description | |------|-------------| | create_invoice | Create an invoice linked to customer + products | | get_invoices | List all invoices (paginated) | | get_invoice | Get a specific invoice by ID | | delete_invoice | Delete an invoice |

Usage Examples

Once configured, ask your AI agent naturally:

"Show me all bank accounts"
> calls get_bank_accounts()

"Create a 500,000 VND payment via bank transfer"
> calls create_payment(amount: 500000, payment_method: "bank_transfer", ...)

"Generate a QR code for this payment link"
> calls generate_qr_code(data: "https://pay.finan.vn/xxx", border: 0)

"Create an invoice for customer CUST-001 with product SKU-001, due in 7 days"
> calls create_invoice(customer_code: "CUST-001", items: [{code: "SKU-001", ...}], ...)

"Delete customer MCP-TEST-001"
> calls delete_customer(customer_id: "...")

Environment Variables

| Variable | Required | Default | Description | |----------|----------|---------|-------------| | FINAN_CLIENT_ID | Yes | — | Your Finan client ID | | FINAN_SECRET_KEY | Yes | — | Your Finan secret key | | FINAN_BASE_URL | No | https://api.finan.one/open | Override API base URL |

How It Works

The MCP server handles Finan's SHA-256 signature authentication automatically:

signature = SHA256(secret_key + "_" + METHOD + "_" + path + "_" + payload + "_" + timestamp)

Every request includes:

  • x-client-id — your client ID
  • x-signature — computed SHA-256 signature
  • x-timestamp — current Unix timestamp (valid 30 seconds)

Agents never need to compute signatures — the server does it for every tool call.

API Response Format

All tools return the raw API response:

{
  "message": { "content": "Thực thi API thành công" },
  "code": 102000,
  "request_id": "abc123...",
  "data": { ... },
  "meta": { "page": 1, "page_size": 50, "total_pages": 1, "total_rows": 5 }
}

Development

git clone https://code.finan.one/ai-agent/book-mcp.git
cd book-mcp
npm install

# Development with hot reload
FINAN_CLIENT_ID=xxx FINAN_SECRET_KEY=xxx npm run dev

# Build for production
npm run build

# Test with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.js

Changelog

v2.1.0 (2026-04-01)

  • Added generate_qr_code tool — generates QR code images for payment transactions
  • Returns base64-encoded PNG via MCP image content type

v2.0.0 (2026-03-31)

  • Complete rewrite using official @modelcontextprotocol/sdk
  • 20 tools covering all Finan Open API endpoints
  • All tools verified against production API
  • Correct response wrapper parsing (message, code, request_id, data, meta)
  • SHA-256 signature generation with query string support
  • Proper error handling with descriptive messages

v1.x

  • Initial release using fastmcp
  • Basic tool support

Links

License

MIT