<!-- https://leantools.ai/doc/quickstart · HTML twin of this page; the whole documentation: https://leantools.ai/llms-full.txt -->
# Quickstart

Getting started

From an empty browser tab to an agent that searches the web through LeanTools, in five steps. No servers to run and no card required: every new workspace starts with starter credit.

1. **Create a workspace** 
Go to [/signup](https://leantools.ai/signup), enter your email, a password and a workspace name. The workspace is created with starter credit, an MCP endpoint and a **default API key**. The key is shown exactly once on the onboarding page: copy it right away. Lost keys cannot be recovered, only replaced (Settings → API keys → Rotate).
2. **Connect your harness** 
Every harness talks to the same endpoint, `/mcp`, with the key as a bearer token.
 
```
claude mcp add --transport http leantools https://YOUR-HOST/mcp \
  --header "Authorization: Bearer lt-YOUR-KEY"
claude mcp list
# leantools  connected · N tools
```

```
# ~/.codex/config.toml
[mcp_servers.leantools]
url = "https://YOUR-HOST/mcp"
http_headers = { Authorization = "Bearer lt-YOUR-KEY" }
```

```
{
  "mcpServers": {
    "leantools": {
      "type": "http",
      "url": "https://YOUR-HOST/mcp",
      "headers": { "Authorization": "Bearer lt-YOUR-KEY" }
    }
  }
}
```

```
curl -s https://YOUR-HOST/mcp \
  -H "Authorization: Bearer lt-YOUR-KEY" -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```
3. **Make the first call** 
Ask your agent to search the web, or send a test call from the onboarding page. The native `web_search.search` tool is enabled on every new workspace.
 
tools/call · web_search.search

```
{
  "jsonrpc": "2.0", "id": 2, "method": "tools/call",
  "params": { "name": "web_search.search", "arguments": { "query": "Model Context Protocol", "resultCount": 5 } }
}
```
 
result (the text is the JSON the REST route would answer, plus usage)

```
{ "jsonrpc": "2.0", "id": 2, "result": { "content": [ { "type": "text",
  "text": "{\"query\":\"Model Context Protocol\",\"totalResultCount\":5,\"items\":[{\"position\":\"1\",\"title\":\"…\",\"url\":\"https://…\",\"description\":\"…\"}],\"usage\":{\"credits\":0.005,\"balance\":9.995}}" } ], "isError": false } }
```
 
The console's Home page switches from *Get started* to *Dashboard* the moment the first successful call lands.
4. **Switch on what you need** 
Open [Tools & Connectors](https://leantools.ai/app#/tools). Toggle native tools on or off, set a monthly budget per tool, link a connector with your own credentials, decide which of its functions agents may call and whether writes need approval, and subscribe to datasets. Nothing here requires redeploying your agent: the next `tools/list` reflects the change.
5. **Create a key per agent** 
Under [Settings → API keys](https://leantools.ai/app#/settings/keys), create one key per agent, scoped to the tools it needs, with a monthly spend cap and an optional expiry. Keys are the unit of attribution in the activity log and of spend in the dashboard.

## What happens on every call

Requests are admitted in a fixed order, and each refusal has a stable code you can branch on:

| Check | Refusal |
| --- | --- |
| Key present, known, active, not expired | `401 authentication_error`, `401 key_expired` |
| Workspace active | `403 account_suspended`, `403 account_closed` |
| Tool switched on in the workspace | `403 tool_disabled` |
| Key scoped to the tool | `403 service_not_allowed` |
| Tool budget and key cap not exhausted | `402 tool_budget_reached`, `402 key_cap_reached` |
| Credits remain (unless the meter is free) | `402 insufficient_credits` |
| Connector guardrails (function exposed, key allowed, rate and daily caps, approval) | `403 action_disabled`, `403 key_not_allowed`, `429 rate_limited`, `429 daily_cap_reached`, `202 approval_pending` |

Failed and refused calls cost nothing. See [Credits and billing](https://leantools.ai/doc/credits) and [Errors](https://leantools.ai/doc/errors).

## Next steps

 [**MCP server**Protocol details, the tool catalogue and result shapes.](https://leantools.ai/doc/mcp) [**Connectors and approvals**Link a CRM or inbox, hold writes for review.](https://leantools.ai/doc/connectors) [**REST reference**Every service over plain HTTP, including LeanModel's OpenAI-compatible endpoints, avatar streams and realtime audio.](https://leantools.ai/doc/api) [**Console guide**Members, roles, keys, billing and activity.](https://leantools.ai/doc/console)
