Skip to content
All works

2026ShippedTools

Tanji Client

tanji-client

A local client for Tanji AI prospecting: one owner process, multi-account sessions, a cache you can measure.

Role
Design & development, solo
Year
2026
Status
Shipped
Stack
TypeScriptMCPSQLitesystemd

Tanji is genuinely powerful in a browser and genuinely awkward from a program: login depends on SSO cookies, frequent requests trigger rate limits, page APIs change, and multiple scripts sharing one account fight over the same browser profile.

The problem

Tanji charges by quota. Searching companies, reading registration data, shareholders and key people, and unlocking contact details all spend quota. Doing that by hand in a web page is slow and easy to waste on poor-fit leads. I wanted a local interface that caches, limits its own request rate and can be called by an agent — without getting the account blocked.

What I built

tanji-client converges all of this into one local owner process: a browser, a REST service, a cache and a rate limiter. Other processes — CLI, MCP, scripts — talk to the local REST API and never open a browser themselves.

Multi-account support gives every account its own profile, cache and port. MCP only proxies to REST by default and never holds the profile, so the “already running” lock problem disappears.

Architecture notes

  • Filters are data, not a form: 12 categories and 345 advanced filter conditions live in a registry, and the client accepts filter files. Advanced filtering becomes a data problem.
  • Rate limiting is product design: company detail has a light mode that fetches only the basic and detail sections; unlock spends a single upstream call by default; the limiter has two channels — priority for unlocks and logins, bulk for reads — so a long batch never blocks an unlock.
  • Cache: cache-aside with TTLs, roughly one to two milliseconds on a hit, plus a clear command for when you need the truth.
  • Login: handles the awkward state where the account centre is still logged in but the product session expired; captchas fall back to a visible browser.
  • Operations: systemd service, multi-account startup, log rotation, health checks.

What I learned

Multi-account systems are isolation problems before they are feature problems. Rate limiting should be designed with the API, not patched in after the first account gets limited.

Honesty matters too: the README states the real limits — the cache has no LRU, some cache keys ignore sort order, and unlock consumes quota so it requires explicit confirmation. Writing that down made the tool easier to trust, not harder.

59 tests, 13 MCP tools, 345 filter conditions. The project is released under the Unlicense (public domain).

345

Filter conditions

59

Tests

13

MCP tools

Next projectFuma Platformfuma-platformView project