# Siteleaf — how to use (mcp.ai)

Connect your Siteleaf account and use 35 tools for developer tools straight from your AI agent. Connect with your own API key. A friendly CMS for static sites. Powered by Jekyll, with GitHub sync, and a complete API.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_siteleaf?ms=1787291520000`
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. `siteleaf_cancel_job`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/siteleaf`
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/siteleaf/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/siteleaf/cancel/job` — Cancel an active Siteleaf job by job ID. This irreversibly requests that the job stop.
  - body: { job_id: string }
- `POST https://api.mcp.ai/api/siteleaf/create/collection` — Create a content collection in a Siteleaf site.
  - body: { path?: string, title: string, output?: boolean, site_id: string, metadata?: object, permalink?: string }
- `POST https://api.mcp.ai/api/siteleaf/create/collection/file` — Upload one static file to a Siteleaf collection identified by its path. This action cannot create collection documents or content files with YAML front matter.
  - body: { file: object, site_id: string, collection_path: string }
- `POST https://api.mcp.ai/api/siteleaf/create/document` — Create a document in a Siteleaf collection with content, taxonomy, metadata, and visibility.
  - body: { body?: string, date?: string, path?: string, tags?: string[], title: string, site_id: string, metadata?: object, permalink?: string, categories?: string[], visibility?: string, collection_path: string }
- `POST https://api.mcp.ai/api/siteleaf/create/page` — Create a page in a Siteleaf site.
  - body: { body?: string, date?: string, path?: string, title: string, site_id: string, metadata?: object, permalink?: string, visibility?: string }
- `POST https://api.mcp.ai/api/siteleaf/create/role` — Grant a Siteleaf user an admin, publisher, or writer role on a site.
  - body: { kind: string, site_id: string, user_id: string }
- `POST https://api.mcp.ai/api/siteleaf/create/site` — Create a Siteleaf site with its domain, timezone, metadata, and defaults.
  - body: { empty?: boolean, title: string, domain: string, defaults?: object[], metadata?: object, timezone?: string }
- `POST https://api.mcp.ai/api/siteleaf/delete/collection` — Permanently delete a Siteleaf collection by site ID and collection path. This cannot be undone.
  - body: { site_id: string, collection_path: string }
- `POST https://api.mcp.ai/api/siteleaf/delete/document` — Permanently delete a Siteleaf document by ID. This cannot be undone.
  - body: { document_id: string }
- `POST https://api.mcp.ai/api/siteleaf/delete/page` — Permanently delete a Siteleaf page by ID. This cannot be undone.
  - body: { page_id: string }
- `POST https://api.mcp.ai/api/siteleaf/delete/role` — Delete a Siteleaf role by ID, removing the user's access to its site.
  - body: { role_id: string }
- `POST https://api.mcp.ai/api/siteleaf/delete/site` — Permanently delete a Siteleaf site by ID. This cannot be undone.
  - body: { site_id: string }
- `POST https://api.mcp.ai/api/siteleaf/delete/source` — Permanently delete one raw source file from a Siteleaf site. Directories and _config.yml are protected and cannot be deleted.
  - body: { site_id: string, source_name: string }
- `POST https://api.mcp.ai/api/siteleaf/get/collection` — Get a collection by site ID and collection path.
  - body: { site_id: string, collection_path: string }
- `POST https://api.mcp.ai/api/siteleaf/get/current/user` — Return the Siteleaf user authenticated by the connected API key.
- `POST https://api.mcp.ai/api/siteleaf/get/document` — Get a Siteleaf document by ID.
  - body: { document_id: string }
- `POST https://api.mcp.ai/api/siteleaf/get/job` — Get the complete buffered status stream for a Siteleaf job, including all status events and the latest status details. The call waits until Siteleaf closes the event stream.
  - body: { job_id: string }
- `POST https://api.mcp.ai/api/siteleaf/get/page` — Get a Siteleaf page by ID.
  - body: { page_id: string }
- `POST https://api.mcp.ai/api/siteleaf/get/role` — Get a Siteleaf site-access role by ID.
  - body: { role_id: string }
- `POST https://api.mcp.ai/api/siteleaf/get/site` — Get one Siteleaf site by ID, including its settings and current or most recent preview, publish, and synchronization job states.
  - body: { site_id: string }
- `POST https://api.mcp.ai/api/siteleaf/get/site/taxonomy` — Return the unique post tags and categories used by a Siteleaf site.
  - body: { site_id: string }
- `POST https://api.mcp.ai/api/siteleaf/get/source` — Get raw source-file metadata or list a source directory for a Siteleaf site.
  - body: { site_id: string, source_name?: string }
- `POST https://api.mcp.ai/api/siteleaf/list/collection/files` — Search and list static files in a Siteleaf collection with sorting and agent-controlled pagination.
  - body: { sort?: string, query?: string, site_id: string, per_page?: integer, next_cursor?: string, collection_path: string }
- `POST https://api.mcp.ai/api/siteleaf/list/collections` — List content collections in a Siteleaf site with agent-controlled pagination.
  - body: { site_id: string, per_page?: integer, next_cursor?: string }
- `POST https://api.mcp.ai/api/siteleaf/list/documents` — Search and list documents in a Siteleaf collection with visibility, extension, sorting, and pagination filters.
  - body: { sort?: string, query?: string, site_id: string, per_page?: integer, extensions?: string, visibility?: string, next_cursor?: string, collection_path: string }
- `POST https://api.mcp.ai/api/siteleaf/list/pages` — Search and list pages in a Siteleaf site with visibility, extension, sorting, and pagination filters.
  - body: { sort?: string, query?: string, site_id: string, per_page?: integer, extensions?: string, visibility?: string, next_cursor?: string }
- `POST https://api.mcp.ai/api/siteleaf/list/site/users` — List users who have access to a Siteleaf site with agent-controlled pagination.
  - body: { site_id: string, per_page?: integer, next_cursor?: string }
- `POST https://api.mcp.ai/api/siteleaf/list/sites` — List sites accessible to the connected Siteleaf account, with optional sorting and agent-controlled pagination.
  - body: { sort?: string, per_page?: integer, next_cursor?: string }
- `POST https://api.mcp.ai/api/siteleaf/publish/site` — Start an asynchronous compile-and-publish job for a Siteleaf site and return its job ID. This publishes externally visible site content and does not wait for job completion.
  - body: { site_id: string }
- `POST https://api.mcp.ai/api/siteleaf/update/collection` — Update at least one of a collection's title, path, permalink, output behavior, or metadata.
  - body: { title?: string, output?: boolean, site_id: string, metadata?: object, new_path?: string, permalink?: string, collection_path: string }
- `POST https://api.mcp.ai/api/siteleaf/update/document` — Update at least one of a document's content, path, taxonomy, visibility, metadata, or date.
  - body: { body?: string, date?: string, path?: string, tags?: string[], title?: string, metadata?: object, permalink?: string, categories?: string[], visibility?: string, document_id: string }
- `POST https://api.mcp.ai/api/siteleaf/update/page` — Update at least one of a page's content, path, visibility, metadata, or publication date.
  - body: { body?: string, date?: string, path?: string, title?: string, page_id: string, metadata?: object, permalink?: string, visibility?: string }
- `POST https://api.mcp.ai/api/siteleaf/update/role` — Change an existing Siteleaf role to admin, publisher, or writer.
  - body: { kind: string, role_id: string }
- `POST https://api.mcp.ai/api/siteleaf/update/site` — Update at least one of a site's title, domain, timezone, metadata, or Jekyll content defaults. Hosting credentials and repository sync are intentionally not accepted as agent inputs.
  - body: { title?: string, domain?: string, site_id: string, defaults?: object[], metadata?: object, timezone?: string }
- `POST https://api.mcp.ai/api/siteleaf/upsert/source` — Create or replace one raw source file in a Siteleaf site.
  - body: { file: object, site_id: string, source_name: string }

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

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