# Putcode > A home for your code snippets. Save the HTML, CSS and JS you build with ChatGPT, Claude or any AI agent, each with a live preview. Reuse it in your next chat with any AI, embed it in a blog or guide, or share it. **Brand name:** always **Putcode**. Domain: `putcode.dev`. A snippet is HTML, CSS and optional JavaScript rendered in a sandboxed preview. Snippets start as private drafts. Owners can publish them as Unlisted (link only) or Public (on their profile, and in Explore at https://putcode.dev/explore unless they turn that off). Published snippets can be forked, collected, and embedded on other sites (https://putcode.dev/embed/). Snippets can carry usage notes, dependencies and browser support. It's free. On the Team plan, a team shares a library that every member and their agents can use. Sign up at https://putcode.dev/signup with email and password, or continue with Google. **MCP server URL (use this everywhere):** `https://putcode.dev/mcp` When an app asks for connector metadata, use: - Name: `Putcode` - Description: `Your code snippet library over MCP. Save, search, fork and reuse HTML, CSS and JS snippets with live previews, on your own or with your team.` - Icon: `https://putcode.dev/icon.png` (256×256 PNG, 2 KB; SVG: `https://putcode.dev/favicon.svg`) ## Connect an agent Add the MCP URL above, then authenticate. Prefer OAuth: the app opens Putcode, the user signs in, picks permissions and clicks Allow. Use a personal `pc_…` token only for apps that don't support OAuth: https://putcode.dev/app/agents **ChatGPT (web, custom plugin)** 1. ChatGPT Plugins → + → Add custom MCP server. 2. Name `Putcode`, URL `https://putcode.dev/mcp`, Authentication: OAuth. 3. Create as a plugin → sign in → Allow → Install. In a chat, type `@` and pick Putcode. **Claude (claude.ai / Desktop)** 1. Customize → Connectors → Add → Custom connector. 2. Name `Putcode`, URL `https://putcode.dev/mcp`, paste the description if asked. 3. Add → Connect → sign in to Putcode → Allow. **Claude Code** ```bash claude mcp add --transport http putcode https://putcode.dev/mcp ``` Then `/mcp` → putcode → Authenticate. **Cursor** Add to `.cursor/mcp.json` (project or user), then approve the sign-in prompt: ```json { "mcpServers": { "putcode": { "url": "https://putcode.dev/mcp" } } } ``` **Codex (CLI / IDE)** ```bash codex mcp add putcode --url https://putcode.dev/mcp codex mcp login putcode ``` **Bearer token (headless / no OAuth)** ```json { "mcpServers": { "putcode": { "url": "https://putcode.dev/mcp", "headers": { "Authorization": "Bearer pc_YOUR_TOKEN" } } } } ``` Create or revoke tokens at https://putcode.dev/app/agents. Never share them. **After connecting** Ask in plain words: "save this button to Putcode", "find a pricing table in my snippets", "fork the command palette and make it match our brand". To confirm the connection works, call `get_my_profile`. ## How agents should use it - Before writing a snippet from scratch, search first (`search_playgrounds`, or `search_components` for snippets with usage notes) and fork a close match. - `create_playground` always makes a private draft. Give the user the returned URL. Publish only when they ask; `publish_playground` may wait for their approval depending on their settings. - `update_playground` records a revision on every call, so batch edits. - Previews block network requests. Scripts may only load from esm.sh, pinned: `import gsap from "https://esm.sh/gsap@3.12.5"` (a static import turns the script into a module). Google Fonts stylesheets and https images work. Web Workers, WebAssembly, WebGPU and eval are off, and previews that keep the main thread busy are paused. - Never delete without the user's explicit confirmation. Never put secrets in snippets. **MCP tools:** `search_playgrounds`, `get_playground`, `list_popular`, `list_categories`, `search_components`, `create_playground`, `update_playground`, `fork_playground`, `delete_playground`, `publish_playground`, `create_collection`, `add_to_collection`, `remove_from_collection`, `list_collections`, `get_collection`, `get_my_playgrounds`, `get_my_favorites`, `list_teams`, `get_team_playgrounds`, `get_my_profile`, `save_favorite`, `save_component`, `get_component`, `list_my_components`. Full reference: https://putcode.dev/mcp.txt ## Docs - [MCP reference](https://putcode.dev/mcp.txt): Endpoint, auth, permissions, every tool, resources, prompts - [MCP setup page](https://putcode.dev/docs/mcp): The same setup steps for people - [Setup guide for each app](https://putcode.dev/docs/agents): ChatGPT, Claude, Claude Code, Codex, Cursor, Gemini, Gemini CLI, VS Code, others (send Accept: text/markdown for Markdown) - [Guidelines](https://putcode.dev/guidelines): What to publish and how ## Agent discovery - [MCP server card](https://putcode.dev/.well-known/mcp/server-card.json) - [OAuth protected resource](https://putcode.dev/.well-known/oauth-protected-resource/mcp) - [OAuth authorization server](https://putcode.dev/.well-known/oauth-authorization-server) ## Product links - [Home](https://putcode.dev/): Product - [Explore](https://putcode.dev/explore): Public snippets - [New snippet](https://putcode.dev/new): Editor - [Agents & MCP](https://putcode.dev/app/agents): Connect or revoke apps and tokens ## Optional - [Privacy](https://putcode.dev/privacy): Privacy policy - [Terms](https://putcode.dev/terms): Terms of service