FinHub API & MCP Documentation

REST API and Model Context Protocol (MCP) server for billing, subscriptions, and usage management.

POST 1. Get a JWT Token

All API and MCP requests require a Bearer token. Obtain one by logging in:

curl -X POST /api/v1/login \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"..."}'

Response includes token (valid 24h) and type: "bearer".

REST 2. Use the REST API

Pass the token as a Bearer header on all requests:

curl /api/v1/subscriptions \
  -H "Authorization: Bearer <token>"

Two access levels:

MCP 3. Connect via MCP

FinHub exposes an MCP server over Streamable HTTP at:

POST /api/v1/mcp

Authentication is OAuth 2.1 (Authorization Code + PKCE, scope mcp:tools) with dynamic client registration — no pre-shared token. MCP clients discover the flow from /.well-known/mcp.json and open a browser for your FinHub login on first connect.

Protocol: JSON-RPC 2.0. Tool visibility follows your FinHub permissions (billing/forms, e-mandate, and FinSys tools — FinSys tools take an explicit environment parameter).

Claude Code config (.mcp.json):

{
  "mcpServers": {
    "finhub": {
      "type": "http",
      "url": "https://finhub.finhero.asia/api/v1/mcp"
    }
  }
}

API Reference