# Openlayer — how to use (mcp.ai)

Connect your Openlayer account and use 10 tools for artificial intelligence straight from your AI agent. Connect with your own API key. Openlayer is an AI quality platform for managing projects, monitoring production data, evaluating tests, and inspecting model and application performance.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_openlayer?ms=1787291460000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `openlayer_get_data_source`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/openlayer`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/openlayer/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/openlayer/get/data/source` — Return one Openlayer monitoring data source, including its backend, monitoring status, record and test counts, and optional project or workspace details.
  - body: { expand?: string[], data_source_id: string }
- `POST https://api.mcp.ai/api/openlayer/get/project/version` — Return one Openlayer project commit or version with its processing status, commit metadata, storage URI, and passing, failing, and total test counts.
  - body: { project_version_id: string }
- `POST https://api.mcp.ai/api/openlayer/get/workspace` — Return a workspace's identity, status, connected-account membership, usage counts, and plan limits. Obtain workspace_id from List Projects first.
  - body: { workspace_id: string }
- `POST https://api.mcp.ai/api/openlayer/list/data/source/test/results` — Return one page of the latest monitoring test results for an Openlayer data source, optionally filtered by test category or execution status.
  - body: { type?: string, status?: string, per_page?: integer, next_cursor?: string, data_source_id: string }
- `POST https://api.mcp.ai/api/openlayer/list/data/sources` — Return one page of monitoring data sources for an Openlayer project, optionally filtered by name.
  - body: { name?: string, per_page?: integer, project_id: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/openlayer/list/project/version/test/results` — Return one page of test results for a project version, optionally filtered by test category, archive state, or result status.
  - body: { type?: string, status?: string, per_page?: integer, next_cursor?: string, include_archived?: boolean, project_version_id: string }
- `POST https://api.mcp.ai/api/openlayer/list/project/versions` — Return one page of commits and versions for an Openlayer project, including processing status, commit metadata, and passing, failing, and total test counts.
  - body: { per_page?: integer, project_id: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/openlayer/list/projects` — Return one page of projects visible to the connected Openlayer workspace, optionally filtered by name or task type.
  - body: { name?: string, per_page?: integer, task_type?: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/openlayer/list/test/results` — Return one page of results for a test, with optional project-version, data-source, and status filters and optional generated insights.
  - body: { status?: string[], test_id: string, per_page?: integer, next_cursor?: string, data_source_id?: string, include_insights?: boolean, project_version_id?: string }
- `POST https://api.mcp.ai/api/openlayer/list/tests` — Return one page of tests configured for an Openlayer project, with filters for category, archive state, origin version, production-data use, and suggested status.
  - body: { type?: string, per_page?: integer, suggested?: boolean, project_id: string, next_cursor?: string, include_archived?: boolean, origin_version_id?: string, uses_production_data?: boolean }

## Example prompts
- "What can I do in Openlayer?"
- "Show me a summary of my Openlayer account"

## More
- Page: https://mcp.ai/openlayer
- Agent spec (llms.txt): https://mcp.ai/openlayer/llms.txt
- Postman collection: https://mcp.ai/openlayer/postman.json
