> ## Documentation Index
> Fetch the complete documentation index at: https://docs.universalbench.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> UniversalBench exposes three MCP tools: ub_read, ub_write, and ub_ai. This is the entire public API.

UniversalBench is a single endpoint, three-tool API. The endpoint is your personal MCP URL. The three tools are `ub_read` for read-only queries, `ub_write` for code execution and state-modifying operations, and `ub_ai` for AI and live web search. Each tool accepts multiple optional input fields. Mix and match fields per call within each tool.

## Base URL

Every customer gets a personal URL with their identity baked in:

```
https://universalbench-mcp.penantiaglobal.workers.dev/u/ubk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
```

Copy yours from the dashboard at [universalbench.dev](https://universalbench.dev). Treat it like a password.

## Protocol

UniversalBench speaks the standard MCP protocol over HTTP using the Streamable HTTP transport. Most users connect via an MCP client (Claude Desktop, Cursor, Claude Code, custom agents on the MCP SDKs) and never see the wire format.

If you want to call the API directly without an MCP SDK, post JSON RPC envelopes to your URL:

```bash theme={null}
curl -X POST https://universalbench-mcp.penantiaglobal.workers.dev/u/ubk_your_key \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"ub_write","arguments":{"code":"print(2 + 2)"}}}'
```

## Discovery

To list the three available tools and their full schemas:

```json theme={null}
{ "jsonrpc": "2.0", "id": 1, "method": "tools/list" }
```

The response returns `ub_read`, `ub_write`, and `ub_ai` with their full input schemas. The schemas are dynamic and reflect the live capability set, so new capabilities appear in your AI's tool descriptions automatically when we ship them. See [Tools](/api-reference/tools) for current field documentation.

## Errors

Errors follow standard JSON RPC error semantics:

| Code   | Meaning                                                                       |
| :----- | :---------------------------------------------------------------------------- |
| -32001 | Authentication failed (URL token invalid or revoked)                          |
| -32002 | Monthly free tier exhausted and wallet is empty                               |
| -32601 | Tool name not recognized (accepted names are ub\_read, ub\_write, and ub\_ai) |
| -32700 | Request body is not valid JSON                                                |

Tool execution failures (Python exceptions, bash non zero exit codes, network errors) are returned as successful JSON RPC responses with the error captured in the `content` field. This lets your AI see and reason about the error rather than failing the entire call.
