# Unyly API v1

> The Unyly catalog of MCP servers and agent skills as a REST API: search, filter, server cards, tools, install configs for Claude Desktop, Claude Code, Cursor, VS Code, Codex and Windsurf, security checks, badges, submissions.

- Base URL: https://unyly.org/api/v1
- OpenAPI 3.1: https://unyly.org/api/v1/openapi.json
- Human docs: https://unyly.org/developers
- Keys: https://unyly.org/account/api

## Authentication

Public GET endpoints work without a key at low per-IP limits. With a key: `Authorization: Bearer uk_live_…` (or `X-Api-Key`). Scopes: `read` (default), `write:submissions`, `write:installs`. Gateway tokens (`ugw_…`) from /account/gateway are accepted too.

## Limits

| Plan | Per minute | Per day | Per month | Semantic searches / day |
|---|---|---|---|---|
| anonymous | 20 | 500 | no cap | 5 |
| free | 60 | 5000 | 50000 | 50 |
| pro | 300 | 50000 | 1000000 | 1000 |
| team | 1000 | 250000 | 5000000 | 10000 |
| business | 3000 | no cap | 30000000 | no cap |

Headers on every response: `X-RateLimit-Limit`, `X-RateLimit-Remaining`, `X-RateLimit-Reset` (minute window, Unix time) and `X-Quota-Limit`, `X-Quota-Remaining`, `X-Quota-Reset` (the tighter of day and month). A 429 carries `Retry-After` in seconds. Semantic search costs 10 units; everything else costs 1; `GET /me` costs 0.

## Conventions

- Single objects: `{ "data": {…} }`. Lists: `{ "data": […], "has_more": bool, "next_cursor": string|null }`; pass `cursor` to continue, `count=true` adds `total`.
- `fields=slug,name,installs` trims list items. `expand=install,similar` enriches a server card.
- Catalog GETs send `ETag` and `Cache-Control: public, max-age=60`; send `If-None-Match` to get 304.
- CORS is open (`*`) — but never ship a key in browser code; use a server.

## Errors

`{ "error": { "code": "rate_limited", "message": "…", "doc_url": "…", "request_id": "req_…" } }`

| Code | Status | Meaning |
|---|---|---|
| invalid_request | 400 | The request is malformed. |
| invalid_json | 400 | The request body is not valid JSON. |
| invalid_parameter | 400 | A parameter is missing or invalid. |
| invalid_cursor | 400 | The cursor is invalid or belongs to another query. |
| unauthorized | 401 | This endpoint needs an API key. |
| invalid_api_key | 401 | The API key is invalid or has been revoked. |
| insufficient_scope | 403 | The API key lacks the scope this endpoint needs. |
| not_found | 404 | Nothing exists at this path. |
| server_not_found | 404 | No public MCP server with this slug. |
| skill_not_found | 404 | No public skill with this slug. |
| method_not_allowed | 405 | This method is not supported on this path. |
| already_listed | 409 | This repository is already in the catalog. |
| already_submitted | 409 | This repository is already waiting for review. |
| payload_too_large | 413 | The request body is too large. |
| rate_limited | 429 | Too many requests per minute. Slow down and retry. |
| quota_exceeded | 429 | The plan quota for this period is used up. |
| internal_error | 500 | Something went wrong on our side. |
| upstream_unavailable | 503 | A dependency is temporarily unavailable. |

## Servers

MCP servers: list, filter, card, tools, install config per client, security, badge.

### GET /servers

List and filter MCP servers. The same filters as unyly.org/browse. Use `fields` to slim the payload.

- `q` (query, string) — Keyword search.
- `category` (query, string) — Hall id from GET /categories.
- `pricing` (query, free | pro | paid)
- `verified` (query, boolean) — Only servers reviewed by Unyly.
- `hosted` (query, boolean) — Only servers that run in the Unyly cloud.
- `sort` (query, installs | newest | rating | name, default "installs") — Ignored when `q` is set (results are ranked by relevance).
- `limit` (query, integer, default 20) — Items per page, 1–100.
- `cursor` (query, string) — Opaque cursor from `next_cursor` of the previous page.
- `count` (query, boolean, default false) — Also return `total` (one extra count query).
- `fields` (query, array) — Comma-separated fields to return per item. `slug` is always included.

```bash
curl "https://unyly.org/api/v1/servers?q=github&limit=2"
```

### GET /servers/{slug}

Get a server card. Description, tools, env keys, security report and badge. `expand` adds install configs and similar servers.

- `slug` (path, string, required) — Slug from the catalog.
- `expand` (query, array) — Comma-separated: install, similar.

```bash
curl "https://unyly.org/api/v1/servers/github"
```

### GET /servers/{slug}/tools

List the tools a server exposes.

- `slug` (path, string, required) — Slug from the catalog.

```bash
curl "https://unyly.org/api/v1/servers/github/tools"
```

### GET /servers/{slug}/install

Install config for a client. Deeplinks, CLI commands and config files for Claude Desktop, Claude Code, Cursor, VS Code, Codex and Windsurf. Remote servers get URL-based configs.

- `slug` (path, string, required) — Slug from the catalog.
- `client` (query, claude-desktop | claude-code | cursor | vscode | codex | windsurf) — One client only. Default: all.

```bash
curl "https://unyly.org/api/v1/servers/github/install?client=cursor"
```

### GET /servers/{slug}/security

Security check of a server. Risk level from source availability, review status and credentials the server asks for.

- `slug` (path, string, required) — Slug from the catalog.

```bash
curl "https://unyly.org/api/v1/servers/github/security"
```

### GET /servers/{slug}/similar

Similar servers.

- `slug` (path, string, required) — Slug from the catalog.
- `limit` (query, integer, default 10) — Items per page, 1–20.

```bash
curl "https://unyly.org/api/v1/servers/github/similar?limit=2"
```

### GET /servers/{slug}/badge

README badge. SVG URL plus ready Markdown and HTML snippets.

- `slug` (path, string, required) — Slug from the catalog.

```bash
curl "https://unyly.org/api/v1/servers/github/badge"
```

## Skills

Agent skills (SKILL.md): list, card and install commands.

### GET /skills

List and filter skills.

- `q` (query, string) — Keyword search.
- `category` (query, string)
- `verified` (query, boolean)
- `no_scripts` (query, boolean) — Only skills without executable scripts.
- `sort` (query, installs | newest | name, default "installs")
- `limit` (query, integer, default 20) — Items per page, 1–100.
- `cursor` (query, string) — Opaque cursor from `next_cursor` of the previous page.
- `count` (query, boolean, default false) — Also return `total` (one extra count query).
- `fields` (query, array) — Comma-separated fields to return per item. `slug` is always included.

```bash
curl "https://unyly.org/api/v1/skills?q=pdf&limit=2"
```

### GET /skills/{slug}

Get a skill card. Includes install commands and a security report. `expand=skill_md` adds the full SKILL.md.

- `slug` (path, string, required) — Slug from the catalog.
- `expand` (query, array)

```bash
curl "https://unyly.org/api/v1/skills/docx"
```

### GET /skills/{slug}/install

Install commands for a skill.

- `slug` (path, string, required) — Slug from the catalog.

```bash
curl "https://unyly.org/api/v1/skills/docx/install"
```

## Search

Keyword search across servers and skills, and semantic search by task.

### GET /search

Keyword search across servers and skills. Stemmed full-text search with synonyms, in English and Russian.

- `q` (query, string, required) — What to find.
- `type` (query, all | servers | skills, default "all")
- `limit` (query, integer, default 5) — Results per type, 1–20.

```bash
curl "https://unyly.org/api/v1/search?q=postgres&limit=2"
```

### POST /search/semantic

Find servers for a task. Describe the task in plain words; an LLM picks up to 6 servers and explains why. Costs 10 quota units and has its own daily cap.

Body:
- `query` (string, required) — The task in plain words.

```bash
curl -X POST "https://unyly.org/api/v1/search/semantic" \
  -H "Content-Type: application/json" \
  -d '{"query":"read my Gmail and summarise unread threads"}'
```

## Catalog

Halls (categories), trending, new arrivals and live catalog size.

### GET /categories

Halls (categories) with counts.

- `type` (query, servers | skills, default "servers")

```bash
curl "https://unyly.org/api/v1/categories?type=servers"
```

### GET /trending

Most installed right now.

- `type` (query, servers | skills, default "servers")
- `limit` (query, integer, default 20) — Items per page, 1–100.
- `cursor` (query, string) — Opaque cursor from `next_cursor` of the previous page.

```bash
curl "https://unyly.org/api/v1/trending?limit=2"
```

### GET /new

New arrivals. Servers ordered by their latest release, skills by their latest commit.

- `type` (query, servers | skills, default "servers")
- `limit` (query, integer, default 20) — Items per page, 1–100.
- `cursor` (query, string) — Opaque cursor from `next_cursor` of the previous page.

```bash
curl "https://unyly.org/api/v1/new?limit=2"
```

### GET /stats

Live catalog size. Recomputed every 10 minutes.

```bash
curl "https://unyly.org/api/v1/stats"
```

## Account

Who the key belongs to, the plan and remaining quota.

### GET /me

Who am I, plan and remaining quota. Works without a key too: then it shows the anonymous per-IP limits. Does not spend quota.

```bash
curl "https://unyly.org/api/v1/me"
```

## Publishing

Submit servers and skills, report installs. Needs a key with a write scope.

### POST /submissions

Submit a server or skill for review. Queues a GitHub repository for review. The account email of the key owner is used for follow-up. Up to 20 submissions a day per account.
Requires a key with `write:submissions`.

Body:
- `kind` (server | skill)
- `repo` (string, required) — GitHub repository as owner/name.
- `name` (string)
- `tagline` (string) — One line about what it does.
- `category` (string) — Hall id from GET /categories.

```bash
curl -X POST "https://unyly.org/api/v1/submissions" \
  -H "Authorization: Bearer $UNYLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

### POST /installs

Report an install. For clients and installers built on the catalog. Counted once per account, item and day so rankings stay honest.
Requires a key with `write:installs`.

Body:
- `kind` (server | skill)
- `slug` (string, required)
- `client` (claude-desktop | claude-code | cursor | vscode | codex | windsurf | hosted | other)

```bash
curl -X POST "https://unyly.org/api/v1/installs" \
  -H "Authorization: Bearer $UNYLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

## Not in v1 (separate products)

- Gateway: one MCP connector for the whole catalog — https://gateway.unyly.org/mcp (OAuth or `?token=ugw_…`).
- Deploy: run sites and MCP servers at slug.unyly.org; agents use the MCP endpoint https://deploy.unyly.org/mcp and REST under /api/runner/*.
- Hosting from a repo: POST /api/hosted with a `ugw_` token.
