← Back to demo.st

MCP endpoint

Add the endpoint URL and your MCP token in your agent (Cursor, Claude Desktop, etc.) to publish subdomains and sites.

Discovery: /.well-known/mcp · Machine-readable: /mcp.json

Your MCP token

Authenticated tools (reserve, upload, clear, release) require a token. Sign in, then copy the token below and add it to your MCP client as Authorization: Bearer <token>.

Sign in to get your MCP token. Sign in

How to add demo.st MCP in your agent

  1. Sign in on this site (register if needed).
  2. Open this MCP page while signed in and copy your MCP token from the section above (or open GET /api/mcp/token in the browser and copy token from the JSON).
  3. In your MCP client (e.g. Cursor): add a new MCP server with URL = the endpoint above (e.g. ).
  4. Add a header: Authorization = Bearer <your token> (paste the token you copied).
  5. Restart or reload the MCP client. You can then reserve a subdomain, upload a zip, and use document API tools (get_site_api_key, collections, records).

Example config (e.g. Cursor .cursor/mcp.json): {"mcpServers":{"demo-st":{"url":"<endpoint>","headers":{"Authorization":"Bearer <token>"}}}}

Transport

Hosting

Subdomain hosting is static files (HTML, CSS, JavaScript, images) via Nginx — no PHP or custom backends. For data, use the optional document API at https://api.demo.st/v1 with a per-site public key from get_site_api_key.

Document API

After reserving a subdomain, get your site key (below or via get_site_api_key). From your site, call https://api.demo.st/v1/:collection with Authorization: Bearer dk_.... Collections are created automatically on first use. Isolation is by site key (Postman without your key cannot read your data). Browser CORS also requires Origin https://{your-subdomain}.demo.st.

const API = 'https://api.demo.st/v1';
const KEY = 'dk_...'; // from this page or get_site_api_key

fetch(API + '/todos', {
  method: 'POST',
  headers: { Authorization: 'Bearer ' + KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ title: 'Ship it', done: false })
});

Tools

For agents (AI clients)

Use GET /.well-known/mcp or GET /mcp.json for the endpoint URL and auth details. Call POST /mcp with Streamable HTTP. Authenticated tools require the user to add an MCP token: the user must sign in on this site, obtain a token (e.g. from GET /api/mcp/token), and configure the client to send Authorization: Bearer <token> on every request. Without that header, reserve/upload/clear/release will fail with a message telling the user to get a token.