ScalixScalix Docs

Agent Tools (MCP)

40+ platform tools for AI agents — standard MCP endpoint plus a plain-HTTP tool surface, with the same auth and metering as any API key

Overview

Every Scalix service is exposed to AI agents as tools: 40+ tools across database, storage, functions, compute, KV, events, cron, domains, builds, auth, search, and more. There are two ways in, both authenticated with your normal API key:

  • Standard MCP — point any MCP-capable client or agent framework at https://api.scalix.world/v1/mcp (JSON-RPC 2.0 over HTTP). Scalix implements the open Model Context Protocol, so it works with any compliant client — Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Cline, Continue, Zed, and custom/framework agents alike. It is not tied to any single vendor's agent.
  • Plain HTTP — list tools with GET /api/v1/mcp, call them with POST /api/v1/mcp/call. No MCP client required — any language that can make an HTTP request works.

Every tool call runs with the permissions, metering, and audit trail of the API key that makes it — agent usage is governed exactly like human usage.

Create an API key in the console (API Keys), then use it as Authorization: Bearer <key> below. Examples use $SCALIX_API_KEY.

Connect an MCP client

Clients that support remote HTTP servers

Most modern clients connect directly to the HTTP endpoint. The config shape is the same everywhere — a server named scalix, an HTTP URL, and a Bearer header.

Claude Code:

bash
claude mcp add --transport http scalix https://api.scalix.world/v1/mcp \
  --header "Authorization: Bearer $SCALIX_API_KEY"

Cursor, VS Code, Windsurf, and other config-file clients — add to the client's MCP config (Cursor mcp.json, VS Code .vscode/mcp.json, etc.):

json
{
  "mcpServers": {
    "scalix": {
      "type": "http",
      "url": "https://api.scalix.world/v1/mcp",
      "headers": { "Authorization": "Bearer YOUR_SCALIX_API_KEY" }
    }
  }
}

Any MCP client (universal stdio bridge)

Clients that only speak stdio to a local process — Claude Desktop, Cline, Continue, older MCP clients — reach the remote endpoint through the standard mcp-remote bridge. This works with every MCP client, so it's the fallback when a client has no native HTTP transport:

json
{
  "mcpServers": {
    "scalix": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "https://api.scalix.world/v1/mcp",
        "--header", "Authorization: Bearer YOUR_SCALIX_API_KEY"
      ]
    }
  }
}

For Claude Desktop, put this in claude_desktop_config.json (Settings → Developer → Edit Config) and restart the app.

Custom and framework agents

Agents built with your own code or a framework (LangChain, LlamaIndex, the OpenAI/Anthropic SDKs, etc.) can speak MCP JSON-RPC directly, or skip MCP and use the plain-HTTP tool surface below. Raw JSON-RPC handshake:

bash
# initialize, then list tools
curl -X POST https://api.scalix.world/v1/mcp \
  -H "Authorization: Bearer $SCALIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

The endpoint implements initialize, ping, tools/list, and tools/call over streamable HTTP (POST). It does not maintain SSE streams — a GET returns 405, which spec-compliant clients handle by using plain POST responses.

Calling convention (plain HTTP)

List every tool available to your key:

bash
curl https://api.scalix.world/api/v1/mcp \
  -H "Authorization: Bearer $SCALIX_API_KEY"

Each definition carries the tool name, a description, and a JSON-Schema input_schema. Call a tool by POSTing its name and arguments:

bash
curl -X POST https://api.scalix.world/api/v1/mcp/call \
  -H "Authorization: Bearer $SCALIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "scalix_db_query",
    "arguments": { "sql": "SELECT count(*) FROM orders" }
  }'

SQL through scalix_db_query executes on the same metered, scope-checked path as the SQL API (POST /api/v1/sql) — use whichever surface fits your agent.

Tool catalog

Platform tools (scalix_*), by family:

FamilyTools
Databasescalix_db_query · scalix_db_schema · scalix_db_table · scalix_db_sandbox · scalix_db_migrate
Storagescalix_storage_list · scalix_storage_upload · scalix_storage_download · scalix_storage_create_bucket
Functionsscalix_fn_list · scalix_fn_deploy · scalix_fn_invoke
Scalix Runscalix_run_deploy · scalix_run_list · scalix_run_scale · scalix_run_rollback
Computescalix_compute_deploy · scalix_compute_list · scalix_compute_scale · scalix_compute_delete
KVscalix_kv_get · scalix_kv_set · scalix_kv_list
AIscalix_ai_infer · scalix_ai_models
Events & Cronscalix_events_publish · scalix_events_topics · scalix_cron_create
Domainsscalix_domain_add · scalix_domain_list · scalix_domain_verify
Buildsscalix_build_create · scalix_build_status
Projects & Authscalix_project_create · scalix_project_list · scalix_auth_configure
Sandboxesscalix_sandbox_run
Platformscalix_status · scalix_usage · scalix_search

Database-native tools served in-process by the gateway (schema inspection, NL-to-SQL, query optimization, branch sandboxes) are also in the catalog: get_schema, get_table, get_relationships, search_columns, list_pii, optimize_query, nl_to_sql, create_sandbox, destroy_sandbox.

Permissions and read-only keys

Tool calls are authorized by the calling key's scopes — a key without functions:write cannot deploy a function through a tool call any more than it could through the REST API. Read-only keys are refused every tool that mutates state (deploys, uploads, creates, scaling, rollbacks, sandbox creation); reads (scalix_db_query, listings, status, search) work normally.

Discovery for agents

  • GET /v1/me — capability discovery for the current token: identity (org and project), effective scopes, the tools those scopes unlock, and plan limits including the rate limit.
  • Live OpenAPI 3.1 spec at https://api.scalix.world/openapi.json — fetch it at runtime for tool synthesis or code generation.
  • API reference — every REST endpoint, with auth and error semantics.

Errors everywhere carry a stable machine-readable code, a human-readable error, and a request_id; responses carry X-RateLimit-* headers so agents can pace themselves.

Example: an agent shipping a change

plaintext
1. GET /v1/me                    → discover identity, scopes, and rate limits
2. scalix_db_schema              → learn the data model
3. scalix_db_sandbox             → branch the database for safe experimentation
4. scalix_db_query               → validate the change against the branch
5. scalix_fn_deploy              → ship the function
6. scalix_run_rollback           → roll back if the revision misbehaves