Metadata-Version: 2.4
Name: openlayer-mcp
Version: 0.3.0
Summary: MCP server for the Openlayer platform
Requires-Python: >=3.10
Requires-Dist: fastmcp<4,>=3.4
Requires-Dist: httpx>=0.27.0
Requires-Dist: openlayer>=0.2.0a51
Requires-Dist: requests>=2.28.0
Description-Content-Type: text/markdown

# Openlayer MCP

[Model Context Protocol](https://modelcontextprotocol.io) server for the
[Openlayer](https://www.openlayer.com) platform. It lets MCP clients — Cursor,
VS Code, Claude Desktop, and other AI assistants — work with Openlayer in
natural language.

With it, an assistant can:

- **Projects & versions** — list and create projects; push and inspect commits.
- **Data sources** — list, create, and inspect data sources (inference pipelines),
  and fetch their production traces, sessions, and per-user activity, with filters.
- **Tests** — list and create tests across integrity, consistency, and performance
  (including LLM-as-a-judge), trigger evaluation, read results, and drill into the
  rows that failed.
- **Anything else** — call any Openlayer API endpoint directly, and search the
  Openlayer documentation.

Tools are annotated as read-only or destructive, so clients can auto-approve reads
and confirm writes.

> Tool names and schemas may evolve; clients should discover the available tools
> dynamically rather than hard-coding them.

📖 **Full setup, the complete tool reference, and examples:**
**[openlayer.com/docs/openlayer-mcp](https://www.openlayer.com/docs/openlayer-mcp)**

## Installation

```bash
uv add openlayer-mcp     # or: pip install openlayer-mcp
```

## Configuration

Register the server with your client and set your API key.

**Claude Code** (CLI):

```bash
claude mcp add openlayer --env OPENLAYER_API_KEY=YOUR_OPENLAYER_API_KEY -- uvx openlayer-mcp
```

**Cursor, Claude Desktop, or VS Code** (JSON config):

```json
{
  "mcpServers": {
    "openlayer": {
      "command": "uvx",
      "args": ["openlayer-mcp"],
      "env": {
        "OPENLAYER_API_KEY": "YOUR_OPENLAYER_API_KEY"
      }
    }
  }
}
```

- **`OPENLAYER_API_KEY`** (required) — create one in your Openlayer workspace settings.
- **`OPENLAYER_BASE_URL`** (optional) — point at a self-hosted Openlayer instance;
  defaults to Openlayer Cloud.

**Verify** it's working by asking your assistant: *"List my Openlayer projects."*

You can also run it as a standalone server:

```bash
uv run -m openlayer_mcp
```

### Transport

The server runs over `stdio` by default (for local IDE/desktop clients). For
hosted or multi-client deployments, set `OPENLAYER_MCP_TRANSPORT` to
`streamable-http`, `http`, or `sse`:

```bash
OPENLAYER_MCP_TRANSPORT=streamable-http uv run -m openlayer_mcp
```

## Documentation

For the full guide and the complete list of available tools, see
**[openlayer.com/docs/openlayer-mcp](https://www.openlayer.com/docs/openlayer-mcp)**.
