Skip to main content
Glama

Why

Giving your agent good tools is a chore today:

  • A key for every tool. Sign up, pick a plan, paste an API key into a config file. Five tools, five accounts.

  • MCP servers crowd the context. Every server you install loads its tool definitions into every session, needed or not.

  • Your agent forgets anyway. It reaches for plain web search out of habit, so you write rules to remind it, and it still slips.

  • Some tools you need once. Installing something permanent for a one-off lookup isn't worth the setup.

Tenjin handles all of it. Install it once and keep working. The Tenjin router watches the moments where a tool could help: your prompt, your agent's web searches and page fetches, and the tasks it hands to subagents. When a curated tool beats what your agent was about to do, the router suggests it and your agent calls it. Your wallet pays for each call through x402, so you manage no keys and install nothing new.

Related MCP server: HiveCapital

Quick start

Requires Node.js 24 or newer and Claude Code. Codex support is on the way.

npm i -g tenjin-cli
tenjin install          # sets up Claude Code and creates your wallet
tenjin wallet fund 2    # optional: add $2 with a card, via Coinbase
✓ Tenjin is set up for Claude Code
✓ Wallet created: 0x3c0D84055994c3062819Ce8730869D0aDeA4c3Bf
  Automatic router: up to $0.25 per call; daily limit $5 a day

Next: tenjin wallet fund, then restart Claude Code

Restart Claude Code. That's it.

Then work as usual. Try:

> What are BTC and ETH trading at?
> How do I paginate list results with the Stripe Node SDK?
> Is ada@example.com a deliverable address?
> Integrate x^2 sin(x) dx from 0 to pi.

Each answer names the provider and the price. Your agent keeps its own tools, and the router steps in only when it has something better.

What it can do

The router picks from a catalog we curate and maintain. When nothing in it fits, it can point your agent at a reviewed third-party pay-per-call service from the Tenjin list, and your agent decides whether to use it or to ask you first. Routing is free today: you pay the provider's price and nothing else. A flat routing fee of $0.003 per routing call is coming, under the spend limits you approve at install.

Tool

What your agent gets

Price per call

Docs lookup · Context7

Current, version-specific docs for a library or API

Free

Web research · Exa

Search results with the page content, not just links

$0.007

Read a page · Firecrawl

One exact page as clean text, even when a plain fetch fails

$0.01

Crypto prices · CoinMarketCap

Live quotes for any coin

$0.01

Compute · Wolfram Alpha

Math, unit conversions, science and data questions

$0.02

Email check · Hunter

Whether an address is real and deliverable

$0.008

Person lookup · Apollo

A professional profile and work email from a name and company, a LinkedIn URL or an email

$0.01

Company profile · Apollo

Industry, headcount, revenue and funding from a domain

$0.01

Company match · CompanyEnrich

The company behind a name or a social URL

$0.01225

X posts · glim

Posts matching a search, or one post with its thread

$0.005

Reddit · glim

Posts matching a search, or one thread with its comments

$0.01 / $0.005

Every tool, including the Tenjin list, with current prices: tenjin.sh/tools. More are added by demand: tell us what you want.

Tenjin list and experimental Bazaar

The Tenjin list is on by default. When nothing in the catalog fits a step (such as generating a sound effect), the router may suggest one third-party pay-per-call x402 service that Tenjin has reviewed. The suggestion names the seller, the URL, the price and the input it takes, and your agent judges whether to use it or to ask you first. It is paid like any lookup, under your spend limits.

The open Bazaar is experimental and off by default. Turn it on with:

tenjin config set experimental.bazaar on

With it on, the router may also suggest sellers from Coinbase's open x402 Bazaar, and to find them, short snippets of your prompts are sent to Coinbase's public Bazaar search. Those sellers are unreviewed third parties, matches can be noisy, prices can vary with the input, and payments are real, under your spend limits. tenjin config and tenjin doctor show both settings. Turn it off with tenjin config set experimental.bazaar off.

How it works

flowchart LR
    A["Your prompt,<br>a web search,<br>or a subagent task"] --> B{"Tenjin<br>router"}
    B -- "a tool fits" --> C["Agent calls it<br>through x402"]
    C --> D["Wallet pays the provider,<br>result comes back"]
    B -- "nothing better" --> E["Agent carries on"]

The Tenjin router hooks into Claude Code at your prompt, before each web search or page fetch, when your agent hands work to a subagent, and around a question your agent asks you. At each point it asks Jev, a decision model from TypeSafe, whether a tool in the catalog fits. When none does, Jev may pick one third-party service from a short list matching the step (the Tenjin list, plus the open Bazaar if you turned it on), or none. Either way Jev only chooses from a list, so it never writes a call or an instruction for your agent; a third-party listing's description is the seller's own, and your agent judges it.

When one fits, your agent sees a one-line suggestion with the tool and its price, and calls it through Tenjin's x402 MCP server: the offer's id alone shows the tool's inputs, an example and what it returns, and the id with the agent's input runs it. Tenjin builds the call, pays the provider from your wallet, within your limits, and hands back the result. Your status line shows the call as it happens:

x402 · request: calling pro-api.coinmarketcap.com/x402/v3/cryptocurrency/quotes/latest · {"query":{"symbol":"BTC,ETH"}}

To pick a tool, the router sends your current turn and up to six recent messages, with keys, passwords and seed phrases masked. Tool results and page contents stay on your machine, and the packet expires after 15 minutes. tenjin config set router.context turn sends only the current message. Full details, and everything install writes →

Wallet and payments

Tenjin pays for tools with x402, an open standard that builds payments into HTTP. A paid endpoint answers 402 Payment Required with its price, the client signs a payment for that amount, and the endpoint returns the result. Neither side needs an account or an API key. Read more: x402.org · whitepaper · Coinbase docs · spec and SDKs.

Your wallet

tenjin install creates a wallet on your machine that holds USDC on Base. Tenjin encrypts the private key, unlocks it through your OS keychain, and never sends it anywhere. Tenjin never holds or moves your funds. Paying a provider costs no gas.

Limits

Limit

Default

Change it

Per lookup

$0.25

tenjin config set maxAutoSpend 0.10

Per day

$5

tenjin config set sessionBudget 2

Tenjin refuses any payment over either limit before it signs anything.

Routing fee

Once Tenjin's server turns it on, each routing call costs a flat $0.003, paid over x402 batch-settlement by tenjin mcp from a channel deposit of up to $0.25 (less when your per-call limit is lower). A deposit is an automatic payment: it counts against the limits above, and approving them at install approves the fee. The fees come out of the deposit and are not counted again. When a call cannot be paid, it takes the free path, and Claude Code tells you once per session why and what fixes it; tenjin doctor says the same. Details are in docs/agent-permissions.md.

Funding

tenjin wallet fund 2 opens a Coinbase Onramp checkout for your wallet: pay by card, or Apple Pay where your region supports it. Sign in to Coinbase or create an account during checkout. You can also send USDC on Base to the address tenjin wallet show prints.

$1–2 goes a long way. $2 covers about 280 web searches, 200 page reads or 100 Wolfram Alpha answers.

Withdrawing

tenjin wallet send <amount> USDC <address> sends funds to any address. It's a regular onchain transfer, so it needs a little ETH on Base for gas.

Everyday commands

tenjin status                  # what you've spent today
tenjin wallet balance          # what's left
tenjin wallet fund 5           # top up
tenjin payments reconcile      # settle paid lookups whose settlement was unknown
tenjin update                  # newest version; wallet and settings stay
tenjin config set router.enabled false             # pause the router on this machine
tenjin config set --project router.enabled false   # ...or just in this repo
tenjin uninstall               # remove the Claude Code setup; your wallet stays

Use tenjin install --project to set it up for a single project. Add --json to any command for machine-readable output.

Every paid lookup is recorded on your machine in ~/.tenjin/paid/ledger.jsonl: what was sent (masked), who was paid, how much, the settlement transaction, and any files saved. Files a paid lookup returns, and media files a paid third-party service links to, are saved under ~/.tenjin/downloads/. When a tool names the fields it returns, your agent gets those fields and the provider's whole response is saved under ~/.tenjin/results/ for a day, at the path the result names. When a seller never confirmed settlement, tenjin payments reconcile asks USDC on Base whether the payment was used once it has expired, and one that was never charged goes back to today's limit; the request tool does the same for up to three beside each lookup, without waiting for it.

tenjin install sets Claude Code's status line only if you don't already have one. If you do, yours is left alone and the install prints a command that shows both; tenjin install --status-line compose writes it for you, and --status-line skip leaves the setting untouched. The status line reads local files only: no network, no wallet, and it can't affect a lookup or a payment.

Limits are set only where no setting exists yet, so an update never overwrites yours. The daily budget is a rolling 24-hour window. Setting either limit to 0 blocks automatic payments; tenjin config set sessionBudget none removes the daily ceiling only.

tenjin pay <url> pays any x402 endpoint you name. It ignores the automatic limits and always asks for your consent to the quoted price, interactively or with --yes. It is never used as a workaround when the router refuses. See the safety model.

Updating to 0.1.0-alpha.18 could accidentally register the server in ~/.mcp.json while refreshing a user install. After upgrading to a release with the fix, check that file. If its x402 entry runs tenjin mcp and you didn't install at project scope in your home directory on purpose, remove just that registration:

(cd ~ && claude mcp remove x402 -s project)

This keeps your other MCP entries and the user registration in ~/.claude.json. Run tenjin install, then restart Claude Code. Don't use tenjin uninstall --project from home for this: its settings path is also the user settings path.

When refreshing from home, Tenjin keeps the existing user registration if there is one, or preserves a project-only registration; with neither, it defaults to user scope. tenjin install --refresh --project selects project scope explicitly.

Request a tool

Tenjin is in alpha, and the catalog grows with what people ask for. Missing a service your agent keeps needing? Hit a lookup that went to the wrong place? We want to hear it.

Learn more

Developing

Before contributing, read CONTRIBUTING.md for the contributor agreement.

pnpm install
pnpm run githooks   # once, to use the repo's git hooks
pnpm run build
pnpm run test
pnpm run typecheck
pnpm run lint

Maintenance

ActivityActive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers