🧩 Onysoft MCP Server
Access catalog, pricing, balance and OnyRouter tools from MCP hosts like Claude Code, Claude Desktop and Cursor.
Onysoft runs a remote (streamable HTTP) MCP server. Any MCP-enabled application that connects with your sk-ony API key can query the model catalog with current TRY prices, calculate token costs, view your balance and usage summary, and get model recommendations from OnyRouter. Model calls themselves still go through the /v1 endpoint — MCP is the tool layer, /v1 is the model layer.
/mcp
JSON-RPC 2.0 / MCP streamable HTTP endpoint. Authentication: Authorization: Bearer sk-ony-... header. The server is stateless (no session management required).
How It Works
Your MCP host (Claude Code, Claude Desktop, Cursor...) connects in three steps: first an initialize handshake negotiates the protocol version and capabilities, then tools/list fetches the tool catalog, and afterwards the model invokes tools/call whenever it needs one. All of this is automatic — once the server is added, the tools appear as natural capabilities of your assistant.
The server is stateless: no session ID is kept, and every request authenticates on its own via the Authorization header. Since each tool describes itself with a name + description + JSON schema triple, the model decides on its own which tool to call and with which parameters.
Setup
Claude Code (one command):
claude mcp add --transport http onysoft https://api.onysoft.com/mcp \
--header "Authorization: Bearer sk-ony-your-api-key"
Claude Desktop / Cursor (JSON configuration):
{
"mcpServers": {
"onysoft": {
"type": "http",
"url": "https://api.onysoft.com/mcp",
"headers": {
"Authorization": "Bearer sk-ony-your-api-key"
}
}
}
}
Tools
| Tool | What it does |
|---|---|
list_models | Lists active catalog models with sale prices (search + provider filter) |
get_model_price | Returns a single model's current price, context window and output limit |
calculate_cost | Calculates cost for given token counts (USD + TRY at the current rate) |
get_balance | Returns the key's current balance |
get_usage_summary | Request count, total cost and top models (default: last 30 days) |
onyrouter_route | OnyRouter: recommends the best-fit model for a task text (routing is free) |
Claude Desktop config file: ~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows. In Cursor: Settings → MCP → Add Server. Put your key only in configs on your own machine; on shared machines we recommend creating a separate sk-ony key.
Example: Token Cost Calculation
When you ask your assistant "how much would a job with 10K input and 2K output tokens cost on GPT-5.6 Luna?", the host calls the calculate_cost tool with these parameters and receives the structured answer:
// istek (host otomatik gönderir)
{ "name": "calculate_cost",
"arguments": { "model": "openai/gpt-5.6-luna", "input_tokens": 10000, "output_tokens": 2000 } }
// structuredContent yanıtı
{
"model": "openai/gpt-5.6-luna",
"girdi_token": 10000,
"cikti_token": 2000,
"maliyet_usd": 0.00264,
"maliyet_tl": 0.1256,
"tcmb_usd_try": 47.5736,
"olcum": "2026-08-06T03:24:03+03:00",
"kaynak": "api.onysoft.com canlı katalog"
}
Example: Model Recommendation via OnyRouter
For a question like "I need to find the bug in this Python code — which model should I use?", the onyrouter_route tool classifies the task text and returns a recommendation:
{
"onerilen_model": "anthropic/claude-sonnet-5",
"kategori": "kod",
"kaynak_katman": "classifier",
"not": "Bu modeli /v1/chat/completions çağrısında model alanında kullanın..."
}
Testing with Raw JSON-RPC (curl)
You can also try the server without any MCP host, directly with curl — one endpoint, standard JSON-RPC 2.0:
curl https://api.onysoft.com/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-ony-your-api-key" \
-d '{
"jsonrpc": "2.0", "id": 1, "method": "tools/call",
"params": {
"name": "calculate_cost",
"arguments": { "model": "openai/gpt-5.6-luna", "input_tokens": 10000, "output_tokens": 2000 }
}
}'
What Can You Ask Your Assistant?
With the server added, questions like these are routed to Onysoft tools automatically:
- "What's my Onysoft balance?" → get_balance
- "What's the current TRY price of Claude Sonnet 5?" → get_model_price
- "How much would a chatbot doing 1,000 requests a day cost monthly on Luna?" → calculate_cost
- "Which models did I use in the last 30 days and how much?" → get_usage_summary
- "Which model should I pick for long-document analysis?" → onyrouter_route
Error Codes
| JSON-RPC code | Meaning | HTTP |
|---|---|---|
-32001 | Authentication error (missing/invalid/suspended/expired key) | 401 / 403 |
-32002 | Rate limit exceeded (60 calls per minute) — check the Retry-After header | 429 |
-32601 | Unknown method | 200 |
-32700 | Invalid JSON body | 400 |
Limits and Notes
- Rate limit: 60 MCP calls per minute per key.
- All tools are read-oriented; they never spend from your balance. Price outputs include a measurement timestamp.
- Model generation (chat/completions) is NOT an MCP tool — model-bound requests go through the /v1 endpoint.
To learn MCP from the ground up, see our guide: MCP Nedir?