🧩 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.

POST /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 Code
claude mcp add --transport http onysoft https://api.onysoft.com/mcp \
  --header "Authorization: Bearer sk-ony-your-api-key"

Claude Desktop / Cursor (JSON configuration):

JSON
{
  "mcpServers": {
    "onysoft": {
      "type": "http",
      "url": "https://api.onysoft.com/mcp",
      "headers": {
        "Authorization": "Bearer sk-ony-your-api-key"
      }
    }
  }
}

Tools

Tool What it does
list_modelsLists active catalog models with sale prices (search + provider filter)
get_model_priceReturns a single model's current price, context window and output limit
calculate_costCalculates cost for given token counts (USD + TRY at the current rate)
get_balanceReturns the key's current balance
get_usage_summaryRequest count, total cost and top models (default: last 30 days)
onyrouter_routeOnyRouter: 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:

tools/call → calculate_cost
// 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:

tools/call → onyrouter_route
{
  "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
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:

Error Codes

JSON-RPC code Meaning HTTP
-32001Authentication error (missing/invalid/suspended/expired key)401 / 403
-32002Rate limit exceeded (60 calls per minute) — check the Retry-After header429
-32601Unknown method200
-32700Invalid JSON body400

Limits and Notes

To learn MCP from the ground up, see our guide: MCP Nedir?

Want help finding the right model?