# MCP server

A companion **MCP** (Model Context Protocol) server lets an AI client drive the launcher through *this* API plus a profile's browser over CDP. It is a separate Node process — **not** part of this HTTP API and not hosted by it. Get it from the launcher (**Settings → MCP server → Download MCP server**, or the sidebar "Download MCP" button), which saves the source to a folder you choose; or from the repo at `rust/shardx-launcher/mcp/`.

Under the hood it just calls this API: configure it with `SHARDX_API` (this base URL) and `SHARDX_TOKEN` (the Bearer token from *Settings → Automation API*). It exposes:

* **API tools** — thin wrappers over the endpoints below (profiles, fingerprints, proxies, folders, cookies, start/stop).
* **Browser tools** (patchright over CDP) — `browser_navigate`, `browser_evaluate`, `browser_screenshot`, `browser_click`, `browser_fill`, tabs, waits, etc., targeting a profile started via `POST /profiles/{id}/start` (which returns the CDP endpoint).

Run it standalone over **stdio** (the client spawns it) or, with `MCP_HTTP_PORT` set, over HTTP at `127.0.0.1:<port>/mcp`. See the MCP server's README for setup. (The launcher only downloads it; it does not run it.)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.proxyshard.com/proxyshard/shardx-launcher-api/mcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
