Skip to content
ThinkWatch
Start typing to search the docs.

ThinkWatch Enterprise · For organizations

An AI bastion host for organizations

ThinkWatch secures, audits, and governs every AI API call and MCP tool invocation across an organization from a single control plane.

  • Self-hosted
  • Docker Compose or Kubernetes
  • v2.0.0
  • BSL 1.1
Log explorer Sample data
›status:200 model:claude-*
live
user
status
  • bob@acme
    gemini-2.0-flash · 2253t
    200
  • carol@acme
    claude-sonnet-4-5 · 2641t
    200
  • dan@acme
    gpt-4o · 3029t
    200
  • eve@acme
    gemini-2.0-flash · 3417t
    200
  • alice@acme
    claude-sonnet-4-5 · 3805t
    200
  • bob@acme
    claude-opus-4-6 · 4193t
    200
  • ci-bot
    claude-haiku-4-5 · 4582t
    200
  • dan@acme
    gpt-4o-mini · 470t
    200
  • eve@acme
    claude-opus-4-6 · 858t
    200
  • alice@acme
    claude-haiku-4-5 · 1246t
    200
  • carol@acme
    gpt-4o-mini · 1634t
    200
  • ci-bot
    claude-opus-4-6 · 2022t
    200
  • dan@acme
    claude-haiku-4-5 · 2410t
    200
  • eve@acme
    gpt-4o-mini · 2798t
    200

Users, keys, and models in this panel are illustrative.

Drop-in compatible with

  • Claude Code
  • Cursor
  • Continue
  • Cline
  • OpenAI SDK
  • Anthropic SDK
  • Claude Code
  • Cursor
  • Continue
  • Cline
  • OpenAI SDK
  • Anthropic SDK
Challenges

AI adoption without governance

As AI agents are adopted across engineering teams, organizations face increasing governance requirements.

01

Unmanaged API keys

Keys are hardcoded in .env files, shared over chat, and rarely rotated.

02

Limited visibility

No record of which user called which model, how many tokens were consumed, or at what cost.

03

No access control

Every developer has direct access to every model and MCP tool.

04

Compliance gaps

AI-assisted code generation and data access leave no audit trail.

05

Unattributed costs

Monthly AI spend cannot be explained or attributed to users or teams.

ThinkWatch addresses these issues with a single deployment.

How it works

All AI requests pass through a single gateway

A drop-in replacement for the OpenAI and Anthropic SDKs. Agents keep their existing code and change only the base URL to point at ThinkWatch.

Callers
Claude Code
Cursor
Custom Agent
CI/CD Pipeline
Gateway :3000
ThinkWatch
AI API + MCP proxy
/v1/chat /v1/messages /v1/responses /mcp
Upstreams
OpenAI
Anthropic
Google Gemini
Azure / Bedrock
Inside the request lifecycle
Features

Gateway, MCP proxy, RBAC, and analytics in one binary

ThinkWatch is a single Rust binary backed by PostgreSQL, Redis, and ClickHouse. All functions are handled by one control plane, without separate microservices or glue code.

A single port for all supported models, with drop-in compatibility.

01

Multi-format proxy

OpenAI Chat Completions, Anthropic Messages, and OpenAI Responses APIs on a single port, compatible with Cursor, Continue, Cline, Claude Code, and the official SDKs without modification.

02

Per-model routing: automatic or manual

Each registered model gets its own routing config: an Auto mode (latency-cost, balanced, latency-only) and a Manual mode with a drag-to-redistribute traffic bar. Health-aware failover drops unhealthy peers via the circuit breaker; the decision log captures provider chosen, why, and any fallback for every request.

03

Multiple providers and a model-level kill switch

OpenAI, Anthropic, Google Gemini, Azure OpenAI, AWS Bedrock, or any OpenAI-compatible endpoint, with automatic format conversion. A single model can be paused without disabling the whole provider, and every gateway_logs row records the actual upstream_model for unambiguous post-incident review.

04

Virtual API keys

Issue scoped tw- keys per team, project, or developer. Keys can be revoked in one click; revoked keys are listed in a separate archive tab. Re-rotation is blocked during the grace window so that an emergency rotation cannot interrupt traffic. Plaintext is shown exactly once; SHA-256 hashes are stored at rest.

05

Rate limits & budget caps

Sliding-window RPM/TPM limits are enforced via Redis per key, user, or team. A pre-call budget check rejects requests once a cap is exhausted, before any upstream tokens are consumed. Hard budget caps fail closed; spend alerts trigger at 50 / 80 / 95 / 100%.

06

Real-time cost tracking

Per-model pricing with budget alerts and team attribution. SSE pass-through with zero-overhead token counting.

07

Management API & OpenAPI

API keys, users, and providers can be provisioned programmatically. A full OpenAPI specification ships with the gateway, so key lifecycle management can be integrated into CI pipelines, Terraform, or internal tooling without using the console.

MCP gateway

Built for organizations, not single users

Most MCP gateways are designed for a single user with one shared service account. ThinkWatch is designed for organizations in which each developer authenticates upstream under their own identity, each tool call is audited back to a specific person, and the entire system runs inside the organization's network.

MCP gateway comparison
Capability ThinkWatch SaaS gateways DIY mcp-proxy
Per-user upstream OAuth (no shared service account) ✓ shared account —
One-paste onboarding via Dynamic Client Registration ✓ partial —
Tool-level RBAC and per-user tool catalogs ✓ limited —
Full audit trail in ClickHouse (queryable, forwardable) ✓ hosted-only —
Response cache scoped per (user, account_label) ✓ n/a —
Self-hosted, single Rust binary, distroless ✓ SaaS-only varies
Bilingual UI out of the box (English + 中文) ✓ English-only —
BSL 1.1: free for non-production and small production use ✓ varies by vendor OSS

SaaS gateways = hosted MCP gateways, where traffic leaves your network and upstream access is typically shared. DIY = mcp-proxy or homegrown shims. Individual products vary; check the one you are evaluating.

Capabilities
01 ThinkWatch

Per-user upstream identity

With per-user OAuth, GitHub issues are created by Alice and Linear tickets are assigned to Bob, rather than to a shared mcp-bot service account. Audit trails extend end to end, from the IDE through ThinkWatch to the upstream system.

02 ThinkWatch

Onboarding through Dynamic Client Registration

Dynamic Client Registration performs the OAuth handshake. The connection is established once the server URL is pasted and access is approved on the consent page, with no app registration or manual copying of client_id and secret.

03 ThinkWatch

Access control for tools

Tool-level RBAC and per-user tool catalogs ensure that each user sees only the tools permitted by their role and upstream account. The Viewer role cannot gain write access to production through an MCP tool.

04 ThinkWatch

Fully self-hosted

ThinkWatch is a single self-hosted Rust binary backed by Postgres, Redis, and ClickHouse. There is no SaaS lock-in, and MCP traffic does not leave the network perimeter.

Console

Visibility into every token, key, and call

Real-time observability for AI requests across an organization. The panels below are React components rendered with mock data, not screenshots, and illustrate the console interface.

Overview · MTD
Tokens used (MTD)
+12.4%
0
Cost (MTD)
+8.1%
$0.00
Active API keys
+3
0
Requests / min
live
0
Unified log explorer
›status:200 model:claude-*
live
user
status
  • bob@acme
    gemini-2.0-flash · 2253t
    200
  • carol@acme
    claude-sonnet-4-5 · 2641t
    200
  • dan@acme
    gpt-4o · 3029t
    200
  • eve@acme
    gemini-2.0-flash · 3417t
    200
  • alice@acme
    claude-sonnet-4-5 · 3805t
    200
  • bob@acme
    claude-opus-4-6 · 4193t
    200
  • ci-bot
    claude-haiku-4-5 · 4582t
    200
  • dan@acme
    gpt-4o-mini · 470t
    200
  • eve@acme
    claude-opus-4-6 · 858t
    200
  • alice@acme
    claude-haiku-4-5 · 1246t
    200
  • carol@acme
    gpt-4o-mini · 1634t
    200
  • ci-bot
    claude-opus-4-6 · 2022t
    200
  • dan@acme
    claude-haiku-4-5 · 2410t
    200
  • eve@acme
    gpt-4o-mini · 2798t
    200
Upstream health
Provider health
monitoring
  • OpenAIus-eastHealthyCB:Closed
    412 ms99.8%
  • Anthropicus-westHealthyCB:Closed
    538 ms99.6%
  • Google Geminius-centralHealthyCB:Closed
    297 ms99.9%
  • Azure OpenAIeastus2DegradedCB:HalfOpen
    1240 ms96.2%
  • AWS Bedrockus-east-1HealthyCB:Closed
    624 ms99.4%
Sliding-window rate limit
Rate limit · sliding window
tw-prod-aH3k · 100 RPM
61 / 100
current bucket
Avg / min
63
Window
30s
Headroom
39
Quick start

Run it from source in four steps.

These are the development steps from the ThinkWatch README. For production, the deployment guide covers Docker Compose, Kubernetes with Helm, SSL, and production hardening.

Deployment guide
  1. Start infrastructure

    Brings up PostgreSQL, Redis, ClickHouse, and the other development services with Docker Compose.

    $ make infra
  2. Generate dev secrets and start the backend

    Writes .env from .env.example with random secrets, then starts the gateway (:3000) and the console (:3001).

    $ make dev-secrets$ make dev-backend
  3. Start the web console

    Installs dependencies and starts the Vite dev server.

    $ cd web && pnpm install && pnpm dev
  4. Finish the setup wizard

    Create the super_admin account, configure the site, and optionally add the first provider and API key.

    http://localhost:5173/setup
Point the client at the gateway
curl https://gateway.your-org.com/v1/chat/completions \
  -H "Authorization: Bearer tw-your-api-key-here" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-4o",
    "messages": [{"role": "user", "content": "Hello"}],
    "stream": true
  }'

Drop-in replacement: change the base URL and use a virtual tw- key.

Free production tier

BSL 1.1. Free for non-production use, and free in production up to 10,000,000 billable tokens and 10,000 MCP tool calls per month.

See licensing and tiers
Community

Project activity

ThinkWatch is developed in the open. Star the repository to follow releases and contribute to the roadmap.

Star history chart for ThinkWatchProject/ThinkWatch