Skip to content
TokenHub

OPEN SOURCE · MIT · SELF-HOSTABLE

Claude Code & Desktopfor your whole team.Under your control.

TokenHub is an open-source gateway for your team's AI accounts. Connect them once, give each person their own key and spend limit, and see every request, without sharing a single password or token.

TokenHub admin Usage page showing which accounts serve the team and recent requests with input and output tokens, using sample data
TokenHub admin Usage page showing which accounts serve the team and recent requests with input and output tokens, using sample data
The admin Usage page, with sample data.

Control without the busywork.

Give people access, set limits and see where the money goes, all from one console.

Prompts stay private

Prompt and response text is never stored, only metadata. Account tokens are encrypted at rest.

Spend limits that hold

Daily and weekly budgets per member, priced at list rates in USD.

Every request, accounted for

Who used which model, how many tokens, and what it cost.

Pick who gets what

Limit each member to certain models or accounts.

A workspace per company

Its own address, accounts and members. Nothing is shared between workspaces.

No dead ends

When one account hits its limit, the next healthy one takes the request.

Up and running in three steps

  1. 1

    Add your accounts

    An admin connects Claude subscriptions, API keys or other providers in the console.

  2. 2

    Invite your team

    Each member signs in and pairs their device with one command.

  3. 3

    Work as usual

    Claude Code and Claude Desktop run as normal. Usage shows up in the console.

CONNECT IN ONE COMMAND

Works where your team already works.

Run one command, confirm the code in your browser, and keep using the app you know.

  • Claude Code Pairs the terminal you already use. tokenhub connect
  • Claude Desktop Points the desktop app at your gateway. Restart it afterwards. tokenhub desktop
  • Your own apps Any app or SDK that speaks the Anthropic Messages API. POST /v1/messages

Replace <workspace> with your team's workspace name. Don't know it? Ask your admin. Needs Node.js 18+. Your admin turns on device pairing.

terminal

# Claude Code

$ npx @emesoft/tokenhub@latest connect <workspace>

# Claude Desktop

$ npx @emesoft/tokenhub@latest desktop <workspace>

# Confirm the code in your browser, then start working

$ claude

Bring the accounts you already pay for

Mix subscriptions and API keys in one workspace. TokenHub spreads requests across them.

Anthropic

Claude Pro/Max subscriptions or API keys.

OAuth / API key

Codex

ChatGPT/Codex subscriptions, translated to serve Claude requests.

OAuth

DeepSeek

API keys, Anthropic-compatible.

API key

Custom

Any Anthropic-compatible endpoint.

Messages API

Provider names show compatibility only. TokenHub is not affiliated with Anthropic, OpenAI or DeepSeek.

Device keys · example
DeviceAccess
Work laptopActive
Old desktopRevoked

One device revoked. The other stays connected.

ONE KEY PER DEVICE

Offboarding takes one click.

Every laptop and desktop gets its own key. When a device is lost or someone leaves, revoke that key. Everyone else keeps working.

  • Keys open the gateway only. They never reveal the accounts behind it.
  • Members see their own usage. Admins see the whole team.

OPEN SOURCE · MIT

Run it yourself in four steps.

Your accounts, keys and logs stay on your own server. No third party in the middle.

  • MIT licensed. Use it, fork it, run it commercially.
  • Read every line that touches your tokens.
  • No external database: built-in SQLite on Node.js 24+.
terminal

# Get the code

$ git clone https://github.com/chuongnd2612/tokenhub.git
$ cd tokenhub && npm install

# Set TOKEN_ENCRYPTION_KEY and the admin login

$ cp .env.example .env

# Start, then open /platform

$ npm run build && npm start

AI access your team can actually manage.

Personal keys, spend limits and clear usage for Claude Code and Claude Desktop.