<!-- Wikimedia Enterprise docs. Canonical page: https://enterprise.wikimedia.com/docs/agents/ -->

# AI Agents and MCP

This documentation is published in forms an AI agent can read directly, alongside the pages you are reading now. Everything below is generated from the same source as the HTML at build time.

## Agent access at a glance

- **Index:** [`/llms.txt`](https://enterprise.wikimedia.com/llms.txt), a curated map of the site with a sentence of context per section
- **Markdown pages:** append `.md` to any `/docs/` URL, for example [`/docs/snapshot.md`](https://enterprise.wikimedia.com/docs/snapshot.md), or request the page URL with `Accept: text/markdown`
- **OpenAPI definition:** [`/docs/api/wme-api.yaml`](https://enterprise.wikimedia.com/docs/api/wme-api.yaml), the source of truth for every request and response shape
- **MCP server:** `https://enterprise.wikimedia.com/mcp`, read-only, no account needed
- **Pricing as markdown:** [`/pricing.md`](https://enterprise.wikimedia.com/pricing.md)

## Markdown versions of every guide

Every guide under `/docs/` has a markdown version at the same URL with `.md` appended, and the docs index is at `/docs/index.md`. A request for the page URL that lists `text/markdown` in its `Accept` header, which Claude Code, Cursor and OpenCode send by default, receives the markdown version at that URL; `/pricing/`, the `/api/` product pages, and the `/project-data/` dataset pages answer the same way, and each has its own `.md` URL, such as `/project-data/wikipedia-api.md`. Each HTML page also links to its markdown version with a `<link rel="alternate" type="text/markdown">` tag, so an agent that reads the page header finds it. The markdown versions carry the same headings as the pages, so a section link such as `/docs/status-codes/#4xx-client-error` names the same heading in both.

`/llms.txt` lists the markdown versions in reading order together with the API reference, the SDKs, the product pages and pricing. It follows the [llmstxt.org](https://llmstxt.org/) convention.

## The docs MCP server

The [Model Context Protocol](https://modelcontextprotocol.io/) lets an AI application call tools a server exposes. Our server exposes this documentation: it searches the guides and the OpenAPI definition and returns full pages and endpoints. It calls no Wikimedia Enterprise API endpoint, holds no credentials and stores nothing between requests.

- **Endpoint:** `https://enterprise.wikimedia.com/mcp`
- **Transport:** Streamable HTTP, MCP revision 2026-07-28. Clients on the 2025 revisions are served too.
- **Authentication:** none. The server is public and read-only.
- **Registry:** listed in the [official MCP registry](https://registry.modelcontextprotocol.io/?q=wikimedia.enterprise) as `com.wikimedia.enterprise/docs`, so a client that browses the registry finds it by that name.

### Tools

| Tool             | What it returns                                                                                                                                                                                                                                                                                                                                                                                      |
| ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search`         | Matches across guide sections, endpoints and response models for a query. Exact tokens work best: a field name such as `reference_risk_score`, a status code such as `429`, or a path such as `/v2/snapshots/{identifier}/download`. Each result carries an `id` for `fetch` and a `url` on this site. A search that matches nothing returns a note saying the server covers the documentation only. |
| `fetch`          | The full text for one result id: a guide as markdown (`docs/snapshot`), one endpoint rendered from the OpenAPI definition (`op/getSnapshotsByIdentifier`), or one response model (`schema/article`).                                                                                                                                                                                                 |
| `list_endpoints` | Every endpoint in reference order, optionally filtered by tag, with its title, its plain-language line and a link into the [API reference](https://enterprise.wikimedia.com/docs/api/).                                                                                                                                                                                                              |
| `get_endpoint`   | One endpoint with every `$ref` resolved, as structured JSON plus a markdown rendering. Identify it by `operationId`, or by `method` and `path`.                                                                                                                                                                                                                                                      |

`search` and `fetch` follow the shape ChatGPT requires of a connector, so the server works in ChatGPT as well as in clients that call any tool.

The server also lists each guide's markdown version and the OpenAPI definition as MCP resources, under their public URLs.

### Add it to your client

The URL is the same everywhere: `https://enterprise.wikimedia.com/mcp`, transport Streamable HTTP, no credentials. The examples name it `wme-docs`; any name works.

**Claude Code**:

```bash
claude mcp add --transport http wme-docs https://enterprise.wikimedia.com/mcp
```

**Claude.ai and Claude Desktop**: Customize > Connectors > Add > Add custom connector, and paste the URL. Available on every plan, Free included; leave the OAuth fields empty.

**Codex CLI**:

```bash
codex mcp add wme-docs --url https://enterprise.wikimedia.com/mcp
```

That writes the entry to `config.toml`; the same block by hand is `[mcp_servers.wme-docs]` with `url = "https://enterprise.wikimedia.com/mcp"`. In the Codex app: Settings > MCP servers > Add server, choose Streamable HTTP, paste the URL, then Restart.

**ChatGPT**: Settings > Connectors, add the URL as a custom connector with no authentication. The `search` and `fetch` tools are the pair ChatGPT calls.

**Gemini CLI**:

```bash
gemini mcp add --transport http wme-docs https://enterprise.wikimedia.com/mcp
```

**Grok Build**:

```bash
grok mcp add --transport http wme-docs https://enterprise.wikimedia.com/mcp
```

An `https://` argument selects the HTTP transport on its own. Add `--scope project` to write `.grok/config.toml` in the repository instead of your user config.

**VS Code**: add this entry to `.vscode/mcp.json`:

```json
{
  "servers": {
    "wme-docs": {
      "type": "http",
      "url": "https://enterprise.wikimedia.com/mcp"
    }
  }
}
```

**Cursor**: the same entry in `.cursor/mcp.json`, with `mcpServers` as the top-level key instead of `servers`.

**Any other MCP client** finds the server in the [official MCP registry](https://registry.modelcontextprotocol.io/) under `com.wikimedia.enterprise/docs`, or takes the URL directly as a remote Streamable HTTP server.

> **Note:** The endpoint accepts POST only. A GET returns `405 Method Not Allowed`, the answer the 2026-07-28 revision specifies for a server that serves POST alone.

## See also

- [API reference](https://enterprise.wikimedia.com/docs/api/) and the [OpenAPI definition](https://enterprise.wikimedia.com/docs/api/wme-api.yaml)
- [Getting Started](https://enterprise.wikimedia.com/docs/) for accounts and a first call
- [Best Practices](https://enterprise.wikimedia.com/docs/best-practices/) for keeping request counts low
