feat: llms.txt and llms-full.txt, openapi.json, MCP server
This commit is contained in:
1 parent
daba3c04c0
commit
4cff43fefb
25 files changed
+1691
-1
No files matched your search
+37
@@ -0,0 +1,37 @@
|
||||
# MCP server
|
||||
|
||||
`cmd/mcp` builds `renewcms-mcp`, a stdio [MCP](https://modelcontextprotocol.io) server for Claude Desktop, Claude Code, Cursor and similar clients. It is an HTTP client of the public API: it holds no database access and sends the API key as `Authorization: Bearer`, so what the key's user may do is the limit of what the model may do.
|
||||
|
||||
Build it with `task build:mcp` (`bin/renewcms-mcp`).
|
||||
|
||||
## Configuration
|
||||
|
||||
| Name | Description |
|
||||
| --- | --- |
|
||||
| `RENEWCMS_URL` | Address of the instance, for example `https://cms.example`. |
|
||||
| `RENEWCMS_API_KEY` | An API key created at `/integration/api-keys`. |
|
||||
|
||||
They belong to the MCP binary only and are not server variables.
|
||||
|
||||
```json
|
||||
{
|
||||
"mcpServers": {
|
||||
"renewcms": {
|
||||
"command": "/path/to/renewcms-mcp",
|
||||
"env": { "RENEWCMS_URL": "https://cms.example", "RENEWCMS_API_KEY": "rcms_..." }
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Tools
|
||||
|
||||
`list_articles`, `get_article`, `create_article` (always a draft), `update_article_body`, `publish_article`, `check_seo`, `list_media`, `upload_media` (local `path`, or `base64` with `filename`), `list_sites`, `get_sitemap`.
|
||||
|
||||
`--allow-destructive` adds `delete_article` and `delete_media`.
|
||||
|
||||
Routes that need a browser session, such as creating a site, are not exposed. API errors come back as tool errors with the status and the plain-text message.
|
||||
|
||||
## Resources and prompts
|
||||
|
||||
The resource `renewcms://docs/llms-full.txt` is the instance's own [`/llms-full.txt`](llms.md), so the model reads the documentation of the exact version it talks to. The prompt `write_and_publish_article` drafts, checks the SEO and asks before publishing.
|
||||
Reference in new issue
Block a user