Overview
Artefact exposes a remote Model Context Protocol server. Once connected, your AI tool can call the same actions you'd take in the dashboard — turn HTML into an artefact, list what you've shared, edit a title, send a magic-link invite — without leaving the chat.
https://useartefact.com/api/mcpTransport: Streamable HTTP (JSON-RPC over POST).·Auth: OAuth (Claude) or Bearer API token (everything else).
Prerequisites
- An Artefact account — sign up free if you don't have one.
- An MCP-capable client: Claude.ai (web), Claude Desktop, Cursor, or any other MCP client.
- For non-Claude clients: an API token (you'll create one in Step 1).
1. Create an API token
Sign in and open Settings → API tokens & MCP. Click Create token, give it a label (e.g. Claude Desktop), and copy the value immediately — it's hashed at rest and shown only once.
claude_desktop_config.json file, Cursor, or any other MCP client.2. Connect from Claude (web)
- In claude.ai, open Settings → Connectors.
- Click Add custom connector.
- Set Name to
Artefactand Remote MCP server URL to:https://useartefact.com/api/mcp - Click Add, then sign in to Artefact in the popup to authorise access.
- The connector flips to Connected. Done.
Anthropic's official walkthrough: Get started with custom connectors using remote MCP
3. Connect from Claude Desktop (config file)
If you'd rather wire Claude Desktop manually, edit claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Paste this block (replace YOUR_TOKEN with the value from Step 1), then fully quit and restart Claude:
{
"mcpServers": {
"artefact": {
"url": "https://useartefact.com/api/mcp",
"headers": {
"Authorization": "Bearer YOUR_TOKEN"
}
}
}
}4. Other MCP clients (Cursor, agents, custom)
Any client that supports MCP Streamable HTTP can point at the same URL. Send the token as a Bearer header:
Authorization: Bearer YOUR_TOKENSmoke test from the terminal:
curl -X POST https://useartefact.com/api/mcp \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'A successful response returns the list of available tools as JSON-RPC.
Verify it works
Open a new chat in your AI tool and try a prompt like:
"Create an artefact from this HTML: <h1>Hello world</h1>. Title it 'Hello'. Then email the magic link to me at name@example.com."
The model should call create_artefact followed byshare_artefact_via_email, and reply with the share URL. Refresh your dashboard to see the new artefact.
Tool reference
| Tool | What it does |
|---|---|
| create_artefact | Turn HTML into a new password-protected artefact. Returns the share URL and the generated guest password. |
| list_artefacts | List the user's recent artefacts (id, slug, title, created date). Never returns passwords. |
| get_artefact | Fetch the current HTML and metadata of an artefact owned by the user. Use before update_artefact to diff or append rather than overwrite. |
| update_artefact | Replace the HTML and optionally the title or description of an existing artefact owned by the user. |
| delete_artefact | Soft-delete (revoke) or permanently delete an artefact. |
| share_artefact_via_email | Send magic-link email invites that bypass the guest password for specific recipients. |
Troubleshooting
- 401 Unauthorized
- The token is missing, mistyped, or has been revoked. Generate a new one inSettings → API tokensand update your client config. Note the
Bearerprefix is required. - 406 Not Acceptable
- Your client isn't sending
Accept: application/json, text/event-stream. Most MCP SDKs set this automatically — if you're calling the endpoint with rawfetch, add the header. - Tools don't appear in Claude
- After adding a connector, start a brand-new chat — existing chats don't pick up new tools. In Claude Desktop, fully quit (not just close the window) and relaunch.
- Want to disconnect a client
- OAuth clients: Settings → Connected apps → Disconnect. API tokens: Settings → API tokens → Revoke. Both take effect immediately.
FAQ
What is MCP?+
The Model Context Protocol is an open standard from Anthropic that lets AI assistants call external tools over a uniform HTTP interface. The Artefact MCP server exposes the same actions you'd take in the dashboard — create, list, update, delete, share — as tools the model can invoke.
Which clients work?+
Anything that speaks MCP Streamable HTTP. That includes Claude.ai (web), Claude Desktop, Cursor, and most agent frameworks. The endpoint is a standard remote MCP server.
Do I need a token if I use Claude?+
No. Claude's custom connector flow uses OAuth — paste the MCP URL and approve. For Claude Desktop's config file, or for any other MCP client, you need an API token from Settings.
What can the AI do once connected?+
Create new password-protected artefacts from HTML, list your artefacts, update title / description / HTML, soft-delete or permanently delete, and send magic-link email invites that bypass the password for a specific recipient.
How do I revoke access?+
For OAuth clients (Claude.ai, Claude Desktop OAuth): Settings → Connected apps → Disconnect. For API tokens: Settings → API tokens & MCP → Revoke. Revocation is immediate.
Is it secure?+
Tokens are scoped to a single user, hashed at rest, and revokable at any time. Guest passwords are never exposed to the model — the AI sees only the share URL and the password it generated when creating the artefact.