mcps and skills

This commit is contained in:
2026-08-11 00:42:46 +03:00
parent 6ffb24f20a
commit 4e67077e12
44 changed files with 2158 additions and 0 deletions
+116
View File
@@ -217,6 +217,122 @@ curl -X POST {{BASE_URL}}/api/tools \
Same fields as create, all optional.
## MCP Servers
A directory of Model Context Protocol servers shown at `/mcp-servers` on the public site. Fields: `id`, `name`, `slug`, `description`, `url`, `docs_url`, `logo_url`, `category`, `category_label`, `install_command`, `config_example`, `transport`, `transport_label`, `language`, `capabilities` (array of strings), `tags` (array of strings), `views`, `clicks`, `featured`, `approved`, `submitted_by`, `created_at`, `updated_at`.
**An MCP server is only visible on the public site once `approved` is `true`.** New servers default to `approved: false` unless you explicitly set `approved: true` in the create request — this is a moderation gate, use it deliberately.
### `GET /api/mcp-servers`
Query params (all optional): `category` (one of the keys below), `approved` (`true`/`false`).
Valid `category` values: `official`, `filesystem`, `databases`, `developer-tools`, `productivity`, `search`, `browser-automation`, `communication`, `data-analytics`, `other`.
### `POST /api/mcp-servers`
| Field | Type | Required | Notes |
|---|---|---|---|
| `name` | string | yes | max 255 |
| `slug` | string | no | must be unique; auto-generated from `name` if omitted |
| `description` | string | yes | |
| `url` | string (URL) | yes | link to the repository or homepage |
| `docs_url` | string (URL) | no | dedicated documentation link, if different from `url` |
| `logo_url` | string (URL) | no | |
| `category` | string | yes | one of the category keys above |
| `install_command` | string | no | e.g. `"npx -y @modelcontextprotocol/server-filesystem /path"` |
| `config_example` | string | no | a config snippet for an MCP client (e.g. the `mcpServers` JSON block) |
| `transport` | string | no | one of `stdio`, `sse`, `http` |
| `language` | string | no | e.g. `"TypeScript"`, `"Python"` |
| `capabilities` | array\<string\> | no | short bullet points of what it exposes, e.g. `["Read files", "Write files"]` |
| `tags` | array\<string\> | no | e.g. `["official", "read-only"]` |
| `featured` | boolean | no | defaults to `false` |
| `approved` | boolean | no | defaults to `false` — see note above |
**Submit an MCP server listing:**
```bash
curl -X POST {{BASE_URL}}/api/mcp-servers \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{
"name": "Example Filesystem Server",
"description": "Gives an MCP client read/write access to a local directory.",
"url": "https://github.com/example/example-mcp-filesystem",
"docs_url": "https://github.com/example/example-mcp-filesystem#readme",
"category": "filesystem",
"install_command": "npx -y @example/mcp-filesystem /path/to/dir",
"config_example": "{\n \"mcpServers\": {\n \"filesystem\": {\n \"command\": \"npx\",\n \"args\": [\"-y\", \"@example/mcp-filesystem\", \"/path/to/dir\"]\n }\n }\n}",
"transport": "stdio",
"language": "TypeScript",
"capabilities": ["Read files", "Write files", "List directories"],
"tags": ["official", "filesystem"],
"approved": true
}'
```
`views` and `clicks` are tracked automatically by the public site and cannot be set via the API.
### `GET /api/mcp-servers/{id}` · `PUT/PATCH /api/mcp-servers/{id}` · `DELETE /api/mcp-servers/{id}`
Same fields as create, all optional.
## Claude Skills
A directory of Claude Skills shown at `/skills` on the public site. Fields: `id`, `name`, `slug`, `description`, `url`, `docs_url`, `logo_url`, `category`, `category_label`, `install_instructions`, `example_prompt`, `requirements`, `tags` (array of strings), `views`, `clicks`, `featured`, `approved`, `submitted_by`, `created_at`, `updated_at`.
**A skill is only visible on the public site once `approved` is `true`.** New skills default to `approved: false` unless you explicitly set `approved: true` in the create request — this is a moderation gate, use it deliberately.
### `GET /api/skills`
Query params (all optional): `category` (one of the keys below), `approved` (`true`/`false`).
Valid `category` values: `document-processing`, `development`, `design`, `productivity`, `data-analysis`, `communication`, `other`.
### `POST /api/skills`
| Field | Type | Required | Notes |
|---|---|---|---|
| `name` | string | yes | max 255 |
| `slug` | string | no | must be unique; auto-generated from `name` if omitted |
| `description` | string | yes | |
| `url` | string (URL) | yes | link to the repository or homepage |
| `docs_url` | string (URL) | no | dedicated documentation link, if different from `url` |
| `logo_url` | string (URL) | no | |
| `category` | string | yes | one of the category keys above |
| `install_instructions` | string | no | e.g. `"Copy into ~/.claude/skills/ and restart Claude"` |
| `example_prompt` | string | no | a sample prompt that would trigger/use this skill |
| `requirements` | string | no | e.g. `"Claude Code"`, `"Claude with Code Execution tool"` |
| `tags` | array\<string\> | no | e.g. `["official", "anthropic"]` |
| `featured` | boolean | no | defaults to `false` |
| `approved` | boolean | no | defaults to `false` — see note above |
**Submit a skill listing:**
```bash
curl -X POST {{BASE_URL}}/api/skills \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{
"name": "Example PDF Skill",
"description": "Extracts text and tables from PDF files and can fill out PDF forms.",
"url": "https://github.com/example/example-pdf-skill",
"docs_url": "https://github.com/example/example-pdf-skill#readme",
"category": "document-processing",
"install_instructions": "Copy this folder into ~/.claude/skills/pdf/ and restart Claude.",
"example_prompt": "Extract the line items from this invoice PDF into a table.",
"requirements": "Claude Code",
"tags": ["official", "pdf"],
"approved": true
}'
```
`views` and `clicks` are tracked automatically by the public site and cannot be set via the API.
### `GET /api/skills/{id}` · `PUT/PATCH /api/skills/{id}` · `DELETE /api/skills/{id}`
Same fields as create, all optional.
## End-to-end example: publish a post as an agent
```bash