Skip to main content

okovia-mcp

OkOvia MCP server — ask any MCP client (Claude Desktop, Claude Code, …) about the cost, margin, reliability, and quality of your AI usage, in natural language.

It talks to the OkOvia API with your key and exposes the read dashboards as MCP tools. It runs on your machine; no data beyond the API calls leaves it, and it never sends prompts or content.

What you can ask

  • "How much did my AI features cost, highest first?"
  • "Which model or provider is driving the cost?"
  • "Show the most recent operations and their cost. Detail op_7K9x."
  • "What's my reliability — which model has the most errors or timeouts?"
  • "Compare the models I use."

Requirements

  • Python 3.10+ (run via uvx or pipx)
  • An OkOvia secret API key (vik_sec_…) from the console → Settings → Service accounts

Configure your MCP client

Claude Desktop / Claude Code (mcpServers block):

{
  "mcpServers": {
    "okovia": {
      "command": "uvx",
      "args": ["okovia-mcp"],
      "env": {
        "OKOVIA_API_KEY": "vik_sec_your_key",
        "OKOVIA_ENDPOINT": "https://api.okovia.com"
      }
    }
  }
}

OKOVIA_ENDPOINT defaults to https://api.okovia.com — set it only for self-hosted deployments.

Tools

Tool What it returns
check_connection API reachable + endpoint
cost_by_feature cost (USD) + op count per feature
cost_by_model / cost_by_provider / cost_by_channel cost grouped by that dimension
cost_by_customer cost, revenue and gross margin per customer (tenant_id in operation metadata)
list_operations recent operations with total cost (limit, default 20)
get_operation full detail for one operation id
reliability success/error/timeout rates, daily timeline, top error codes
quality client-side eval scores (0..1): totals, timeline, per-evaluator/feature/model with cost per operation
model_comparison models side by side (incl. avg eval score when available)

Everything is scoped to the workspace/project the API key belongs to — the server passes no ids of its own.

Security

Use a read-only key (vik_read_..., create one on the console's API Keys page): it can query dashboards and reports but can never submit events or manage anything — if it leaks, your data can be read but not touched. Secret keys still work for backwards compatibility, but carry admin scope; prefer rotating to a read key.

Development

pip install -e ".[dev]"
pytest            # client tests — stdlib only, no MCP runtime or network needed

client.py is stdlib-only and independently tested; server.py wires those methods as MCP tools via the official mcp SDK.

MIT licensed. Part of OkOvia.

Release files for okovia-mcp 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for okovia-mcp 0.3.0
File Size Uploaded
okovia_mcp-0.3.0.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for okovia-mcp 0.3.0
File Interpreter ABI Platform
okovia_mcp-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.9 kB

Release files / okovia_mcp-0.3.0.tar.gz

Download URL okovia_mcp-0.3.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
670359ab8105f1f66ecfd5a65a654d8d2cfd0016d6d8ce74efeae3bbf4ceb5cf
BLAKE2b-256 checksum
How to use checksums
8fae95e9a3503a6237f76cb16c81d5317220d5069b8f02f19a9366b5362c3d3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / okovia_mcp-0.3.0-py3-none-any.whl

Download URL okovia_mcp-0.3.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1bb23b030bb53167c3d2c7a99c1841d1eebad02d39b1fb23793a536eb7ffa22
BLAKE2b-256 checksum
How to use checksums
04a07bc4bd66619ebca6bc2062a2011bdbfdc2f72536c695be54789fe8ec8579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page