Skip to main content

Apertis MCP Server

@apertis/mcp-server is an MCP server that lets agents (Claude Code, OpenCode, or any MCP-compatible client) manage your Apertis account and query the API gateway at runtime — list models, check quota, create API keys, and ask for task-aware model recommendations.

GitHub: apertis-ai/apertis-mcp · npm: @apertis/mcp-server

Installation

No install step required — the server runs via npx. Just point your MCP client at it.

Claude Code

Add to ~/.claude/settings.json:

{
"mcpServers": {
"apertis": {
"command": "npx",
"args": ["@apertis/mcp-server"],
"env": {
"APERTIS_API_KEY": "sk-your-key-here"
}
}
}
}

OpenCode

Add to openclaw.json:

{
"mcpServers": {
"apertis": {
"command": "npx",
"args": ["@apertis/mcp-server"],
"env": {
"APERTIS_API_KEY": "sk-your-key-here"
}
}
}
}

Restart your agent and the Apertis tools become available.

Environment Variables

VariableRequiredDefaultDescription
APERTIS_API_KEYYesYour Apertis API key (sk-...)
APERTIS_BASE_URLNohttps://api.apertis.aiAPI base URL

Available Tools

ToolDescription
list_modelsList available models with optional filtering (free/paid, capability)
get_model_infoGet detailed info about a specific model (pricing, context, provider)
compare_modelsSide-by-side comparison of 2–5 models
check_quotaCheck account balance, subscription status, remaining quota
get_usage_statsUsage statistics by model and period (today/week/month)
list_api_keysList API keys with status and quota (masked)
create_api_keyCreate a new API key with optional quota limit
suggest_modelFreeform keyword-based model search over the full catalog
recommend_modelCurated Apertis pick for a task type with live pricing

recommend_model — Dynamic Model Selection

Prefer recommend_model when the task fits one of the 5 canonical types — it wraps the GET /v1/recommend endpoint and returns a single opinionated pick rather than a ranked list.

Input

ParameterRequiredDescription
taskYescoding / long-context / fast-chat / reasoning / vision
budgetNolow / medium (default) / high

Example conversation

You:   What model should I use for coding right now?
Agent: [calls recommend_model(task="coding", budget="medium")]
→ Apertis recommends claude-sonnet-4-6
Input: $2.40/1M, Output: $12.00/1M
Why: Best coding ability per dollar. 200K context.
Alternatives:
- deepseek-v3 ($0.30/1M) — 3x cheaper, good for simpler coding
- claude-opus-4-6 ($4.00/1M) — most capable, higher cost

Use the returned model value directly in subsequent API calls.

Resources

In addition to tools, the server exposes three read-only resources:

Resource URIDescription
apertis://accountCurrent account info, balance, subscription
apertis://modelsFull model catalog (cached 5 min)
apertis://usage/todayToday's usage summary

Security

  • All API keys in tool output are masked (first 4 + last 4 characters)
  • New keys are shown in full once — save them immediately
  • Keep APERTIS_API_KEY out of source control; use your MCP client's env-var expansion