Skip to content

Create tokcalc.json - #1670

Closed
stevecrates489-commits wants to merge 1 commit into
modelcontextprotocol:mainfrom
stevecrates489-commits:main
Closed

stevecrates489-commits wants to merge 1 commit into
modelcontextprotocol:mainfrom
stevecrates489-commits:main

Conversation

@stevecrates489-commits

Copy link
Copy Markdown

Summary of changes

Adds tokcalc — an open-source LLM serving capacity planner MCP server with 6 read-only tools for AI agents (Cursor, Claude Desktop, Cline).

Motivation and Context

LLM engineers and platform teams need to answer deployment questions that simple "tokens per second" calculators cannot: model fit in VRAM, KV-cache pressure at different context lengths, multi-GPU topology recommendations, continuous batching multipliers, prompt caching economics, and build-vs-buy break-even analysis.

Currently, AI agents helping with LLM infrastructure planning have no tool to call for deterministic capacity calculations. They hallucinate GPU specs, invent throughput numbers, and miss critical constraints like KV-cache memory limits at long context. tokcalc solves this by exposing a bounded, deterministic, read-only calculation engine as an MCP server.

The server covers 35 models (Llama 3/4, Qwen 2/3, DeepSeek V3/R1, Mixtral, Gemma, Phi, etc.), 30 GPUs (H100/H200/B200, A100, RTX 4090/5090, AMD MI300X, Intel Gaudi 3, TPU, Groq LPU, Apple Silicon), and 16 quantization formats (FP16/FP8, GGUF Q2_K–Q8_0, GPTQ, AWQ, EXL2, NVFP4).

How Has This Been Tested?

  • MCP Inspector: validated server initialization, tools/list (6 tools returned with correct schemas), and tools/call (all 6 tools execute and return structured JSON).
  • Claude Desktop: configured as npx -y @tokcalc/mcp-server, tested with prompts like "List the GPUs tokcalc supports" → agent called list_gpus and received 30 GPU records. Also tested "Recommend a topology for Llama 3.3 70B at 32K context" → agent called list_models → recommend_topology → returned feasible topology options.
  • npm package: published as @tokcalc/mcp-server@0.1.2, installable via npx.
  • Schema validation: all tool input schemas use formatInputSchema() with $refStrategy: "none" and strip the top-level $schema meta-key, ensuring strict MCP client compatibility.

Breaking Changes

None. This is a new server with no prior versions in the registry.

Types of changes

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Architecture: The MCP server shares its calculation engine (src/lib/token-calc.ts) with the tokcalc web app (Next.js). The engine is pure TypeScript with no network access — all calculations are deterministic and offline. The MCP server bundles this engine into a single self-contained file (~0.66 MB, 207 modules) using bun build --target=node.

Tool design principles (per Perplexity MCP research):

  • All 6 tools are read-only — no side effects, no cloud credentials, no deployments
  • Results include ranges (low/expected/high), not single magic numbers
  • Every result includes confidence levels (measured/modeled/inferred/user-supplied)
  • Every result includes assumptions + catalog version for reproducibility
  • Zod v4 schemas with formatInputSchema() for strict MCP client compatibility

server.json is included at the repository root with:

  • name: dev.tokcalc/capacity-planner
  • packages: npm @tokcalc/mcp-server v0.1.2, stdio transport
  • repository: GitHub (stevecrates489-commits/tokcalc)

npm: @tokcalc/mcp-server@0.1.2 — npx -y @tokcalc/mcp-server works out of the box

License: Apache 2.0 (same as the main tokcalc project)

Live demo: https://tokcalc.vercel.app

@github-actions

Copy link
Copy Markdown

Hi @stevecrates489-commits 👋 — thanks for your interest in the MCP Registry!

It looks like this PR is trying to publish an MCP server by adding or editing server files in this repository (under servers/, data/servers/, or in data/seed.json). That isn't how servers get published, so I'm closing this PR automatically.

Servers are published with the mcp-publisher CLI, not by opening a pull request against this repo. The CLI verifies that you own your namespace and submits your server.json directly to the live registry API.

To publish your server, follow the Publishing Quickstart. In short:

# Build the publisher CLI
make publisher

# Authenticate (e.g. via GitHub) and publish your server.json
./bin/mcp-publisher login github
./bin/mcp-publisher publish

Note: data/seed.json is seed data for local development only — adding entries there does not publish anything to the registry.

If you believe this was closed in error, please leave a comment and a maintainer will take a look. 🙇

This is an automated message.

@github-actions github-actions Bot added the invalid This doesn't seem right label Sep 24, 2026
@github-actions github-actions Bot closed this Sep 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

invalid This doesn't seem right

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant