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

# MCP server

> Connect Claude Code, Cursor, Codex, or VS Code to Sila with the hosted MCP server.

Sila runs a hosted [Model Context Protocol](https://modelcontextprotocol.io) server. Your agent can scrape pages and run crawls with your workspace credits.

```
https://api.sila.sh/mcp
```

## Sign in

The server accepts two kinds of credentials:

* **OAuth.** Add the URL to your client and sign in to Sila when the client asks. Sila shows a consent screen that names the app and where access goes. Click **Allow** to continue.
* **API key.** Send `Authorization: Bearer sila_…` with every request. Create a key on the **API keys** page. See [Authentication](https://docs.sila.sh/authentication.md).

There is no anonymous access. Requests without a valid credential return `401`.

## Set up your client

> [tab] Claude Code
>
> ```bash theme={null}
> claude mcp add --transport http sila https://api.sila.sh/mcp
> ```
>
> Run `/mcp` inside Claude Code and choose **sila** to sign in. To use an API key instead:
>
> ```bash theme={null}
> claude mcp add --transport http sila https://api.sila.sh/mcp \
>   --header "Authorization: Bearer sila_your_key"
> ```

> [tab] Cursor
>
> Add this to `~/.cursor/mcp.json`, or to `.cursor/mcp.json` in a project:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "sila": {
>       "url": "https://api.sila.sh/mcp"
>     }
>   }
> }
> ```
>
> Cursor opens the sign-in page the first time you use the server. To use an API key, add a `headers` field:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "sila": {
>       "url": "https://api.sila.sh/mcp",
>       "headers": { "Authorization": "Bearer sila_your_key" }
>     }
>   }
> }
> ```

> [tab] Codex
>
> Add this to `~/.codex/config.toml`:
>
> ```toml theme={null}
> [mcp_servers.sila]
> url = "https://api.sila.sh/mcp"
> ```
>
> Then sign in:
>
> ```bash theme={null}
> codex mcp login sila
> ```
>
> To use an API key instead, store it in an environment variable and point Codex at it:
>
> ```toml theme={null}
> [mcp_servers.sila]
> url = "https://api.sila.sh/mcp"
> bearer_token_env_var = "SILA_API_KEY"
> ```

> [tab] VS Code
>
> Add this to `.vscode/mcp.json`:
>
> ```json theme={null}
> {
>   "servers": {
>     "sila": {
>       "type": "http",
>       "url": "https://api.sila.sh/mcp"
>     }
>   }
> }
> ```
>
> VS Code starts the sign-in flow when you start the server. To use an API key, add a `headers` field:
>
> ```json theme={null}
> {
>   "servers": {
>     "sila": {
>       "type": "http",
>       "url": "https://api.sila.sh/mcp",
>       "headers": { "Authorization": "Bearer sila_your_key" }
>     }
>   }
> }
> ```

> [tab] Other clients
>
> Any client that supports remote (streamable HTTP) MCP servers works. Many accept this shape:
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "sila": {
>       "url": "https://api.sila.sh/mcp"
>     }
>   }
> }
> ```

> [!TIP]
>
> Run `npx -y @sila-sh/cli@latest init --all --browser` to log in and install the Sila skills in one step. See [CLI](https://docs.sila.sh/cli.md).

## Tools

| Tool | Input | What it does |
| - | - | - |
| `sila_scrape` | `url`, `formats` (default `["markdown"]`), `render` (default `auto`) | Scrapes one page. Returns the markdown, the other formats as JSON, and a screenshot as an image. |
| `sila_crawl` | `url`, `limit`, `respectRobots` (default `true`), `discovery` | Starts a crawl. Returns the crawl `id` and `status`. |
| `sila_crawl_status` | `id` | Returns the crawl status and stats. |
| `sila_crawl_pages` | `id`, `cursor` (default `0`) | Returns one batch of stored pages. |
| `sila_crawl_cancel` | `id` | Stops a queued or running crawl. |
| `sila_usage` | none | Returns your credits used and remaining this month. |

Inputs match the REST API. See [Scrape a page](https://docs.sila.sh/api-reference/scrape.md) and [Create a crawl](https://docs.sila.sh/api-reference/crawls-create.md) for the formats, `render` values, and `discovery` values.

A crawl runs in the background. Call `sila_crawl_status` until it finishes, then read the pages with `sila_crawl_pages`. Start at `cursor` `0` and pass `nextCursor` back as the next `cursor`.

## Credits

MCP calls use the same credits as the REST API.

| Page type | Credits |
| - | - |
| Fetched statically | 1 |
| Needed the headless browser, or any `screenshot` format | 5 |

See [Credits and plans](https://docs.sila.sh/credits-and-plans.md).

## Errors

A failed tool call returns an error result with the API error code and message, for example `credits_exhausted: …`. See [Errors](https://docs.sila.sh/errors.md) for every code. The server also returns `429 rate_limited` when you send too many requests.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.