ClockNext MCP Server
Integrates usage-based billing into AI coding tools, enabling meter usage, signal verification, and billing management via the ClockNext API.
README
@clocknext/mcp
The ClockNext MCP server — meter usage, verify signals, and manage usage‑based billing directly from AI coding tools (Claude Code, Cursor, Codex, Antigravity) and any other Model Context Protocol client.
It runs locally over stdio: your AI tool spawns it as a subprocess, and your
organisation's cnk_… API key stays in the server's environment — never in the
model's context.
Install as a Claude Code plugin (recommended)
In Claude Code:
/plugin marketplace add ClockNext/clocknext-mcp
/plugin install clocknext@clocknext
Claude Code prompts for your ClockNext API key at install (stored securely) and
wires the server up automatically — no manual config, no env vars. Run /mcp to
confirm the clocknext tools are available.
Manual setup (other MCP clients)
You need a ClockNext API key (Settings → API Keys). Then add the server to your tool's MCP config.
Claude Code
claude mcp add clocknext --env CLOCKNEXT_API_KEY=cnk_your_key -- npx -y @clocknext/mcp
Cursor / Windsurf / Antigravity — .cursor/mcp.json (or the tool's MCP JSON):
{
"mcpServers": {
"clocknext": {
"command": "npx",
"args": ["-y", "@clocknext/mcp"],
"env": { "CLOCKNEXT_API_KEY": "cnk_your_key" }
}
}
}
Codex — ~/.codex/config.toml:
[mcp_servers.clocknext]
command = "npx"
args = ["-y", "@clocknext/mcp"]
env = { CLOCKNEXT_API_KEY = "cnk_your_key" }
Environment
| Variable | Required | Description |
|---|---|---|
CLOCKNEXT_API_KEY |
yes | Your org's cnk_… key (Settings → API Keys). |
CLOCKNEXT_BASE_URL |
no | Override the API origin (e.g. a staging URL). Defaults to production. |
Tools
| Tool | What it does |
|---|---|
clocknext_whoami |
Identify the org behind the key and whether it's sandbox or live. Call first. |
clocknext_list_models |
List enabled models + USD prices per 1M tokens. Use a modelId in signals. |
clocknext_verify_signal |
Dry run — validate + price a signal without recording it. Preflight your setup. |
clocknext_record_usage |
Record one real (billed) usage signal. Supports an idempotencyKey for safe retries. |
A typical agent flow: whoami → list_models → verify_signal (confirm the
customer/model/plan price correctly) → record_usage.
Development
npm install # links the local @clocknext/sdk (file:../clocknext-sdk)
npm run build # tsup → dist/index.js (executable bin)
npm run dev # run from source via tsx
CLOCKNEXT_API_KEY=cnk_... npm start
Built on the official @modelcontextprotocol/sdk over @clocknext/sdk. stdio
today; a hosted Streamable‑HTTP variant is planned. Logs go to stderr (stdout
is the protocol channel).
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.