deepseek-costs-mcp
Provides tools to check DeepSeek account balance, list available models, and estimate costs from token usage, without proxying API calls.
README
deepseek-costs-mcp
MCP server for tracking DeepSeek API costs, built on the official DeepSeek API.
Scope
DeepSeek's official API does not expose historical usage/cost analytics (no per-key spend, no per-model token history, no time-series). The only billing-related data it exposes is:
GET /user/balance— current account balance (account-level, not per-key)GET /models— list of models available to your key
This server exposes exactly those two endpoints as MCP tools, plus a local
calculator (deepseek_estimate_cost) that converts token counts you already
have (e.g. from a chat completion's usage field) into an estimated USD cost,
using a static snapshot of DeepSeek's published pricing page. It does not
proxy or log your completions — it has no way to see which key spent what
unless DeepSeek adds that to their API.
Tools
| Tool | Calls | Notes |
|---|---|---|
deepseek_get_balance |
GET /user/balance |
Total / granted / topped-up balance, per currency |
deepseek_list_models |
GET /models |
Models available to the configured key |
deepseek_estimate_cost |
(local calculator) | { model, cacheHitInputTokens?, cacheMissInputTokens?, outputTokens? } → cost breakdown in USD |
Pricing snapshot: src/pricing.ts (dated 2026-07-14). Re-check
https://api-docs.deepseek.com/quick_start/pricing/ periodically — DeepSeek can
change prices without a versioned API.
Setup
npm install
npm run build
Set your key:
cp .env.example .env
# edit .env and set DEEPSEEK_API_KEY
The server reads DEEPSEEK_API_KEY from the process environment (not
dotenv-loaded automatically) — whatever MCP client launches it must inject
that variable.
Running standalone
DEEPSEEK_API_KEY=sk-... node dist/index.js
It speaks MCP over stdio.
Connecting to Hermes Agent
Point Hermes Agent's MCP client config at the built entry point as a stdio server, e.g.:
{
"mcpServers": {
"deepseek-costs": {
"command": "node",
"args": [
"<path>/deepseek-costs/dist/index.js"
],
"env": {
"DEEPSEEK_API_KEY": "sk-..."
}
}
}
}
Adjust the config key/path to whatever format Hermes Agent expects for stdio MCP servers. After connecting, the three tools above should show up in its tool list.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.