# CSS Observer MCP server Endpoint: `https://css.observer/mcp` Transport: Streamable HTTP (stateless). JSON-RPC over POST. Server name: `css-observer` ## Authentication Every request needs `Authorization: Bearer `. Without one the server answers 401 with `WWW-Authenticate: Bearer resource_metadata="https://css.observer/.well-known/oauth-protected-resource/mcp"`. **OAuth 2.1 (preferred).** Authorization code with PKCE (S256 only) and dynamic client registration. - Protected resource metadata: https://css.observer/.well-known/oauth-protected-resource/mcp - Authorization server metadata: https://css.observer/.well-known/oauth-authorization-server - Register: `POST https://css.observer/oauth/register` (RFC 7591) - Authorize: `https://css.observer/oauth/authorize`. The user signs in and approves on a consent page - Token: `POST https://css.observer/oauth/token` (`authorization_code` and `refresh_token`) - Access tokens last 24 hours. Refresh tokens rotate on every use; a used refresh token stops working. **Personal tokens.** `cso_…` tokens from https://css.observer/app/agents, for clients without OAuth. They don't expire until revoked. ## Permissions (scopes) - `read`: search public snippets; read the user's snippets, favorites, collections and usage notes. Always granted. - `write`: create, update and fork snippets; favorites; collections; usage notes. - `publish`: publish without waiting, if the user's publish setting is "Publish right away". - `delete`: delete snippets and collections. The user chooses permissions on the consent page. Identity always comes from the token, never from tool arguments. ## Publishing `publish_playground` follows the user's setting: - `review` (default): the request waits in the user's dashboard; the tool returns `outcome: "pending_review"`. - `allow`: publishes immediately if the connection has the `publish` permission. - `never`: refused. ## Limits - 120 requests per minute per connection (429 with `Retry-After` above that). - HTML, CSS and JS are limited to 200 KB each. ## Tools - `search_playgrounds`: query, category, tags, sort, page, limit. Full-text search over public snippets - `get_playground`: playground_id (id or slug). One snippet with its full HTML, CSS and JS - `list_popular`: category, limit. Public snippets with the most favorites and forks - `list_categories`: Categories with counts - `search_components`: query, category, tags, sort, limit. Public snippets that have usage notes - `create_playground`: title, html, css, js, description, category, tags. Creates a private draft - `update_playground`: id + any changed fields. Records a revision - `fork_playground`: source_id. Copies a public snippet into the user's account, keeping attribution - `delete_playground`: id. Needs the delete permission; confirm with the user first - `publish_playground`: id, visibility (public | unlisted). Publishes now or waits for the user's approval - `create_collection`: name, description, visibility - `add_to_collection`: collection_id, playground_id - `remove_from_collection`: collection_id, playground_id - `list_collections`: The user's collections - `get_collection`: collection_id. A collection and its snippets in order - `get_my_playgrounds`: query, status, page. The user's own snippets - `get_my_favorites`: Snippets the user has favorited - `get_my_profile`: Profile, this connection's permissions, and the agent publish setting - `save_favorite`: playground_id, favorite - `save_component`: playground_id, usage, dependencies, browser_support. Adds or updates usage notes - `get_component`: component_id (or the snippet id/slug). Source plus usage notes - `list_my_components`: query. The user's snippets that have usage notes Results are JSON in both `content[0].text` and `structuredContent`. Snippet results include `url` (https://css.observer/s/), `edit_url` and `preview_url`. ## Resources - `css-observer://categories`: the list of categories - `css-observer://popular`: popular public snippets - `css-observer://guidelines`: contribution guidelines (Markdown) - `css-observer://my-library`: the user's snippets and favorites - `css-observer://my-collections`: the user's collections ## Prompts - `create_css_component` - `improve_css_component` - `make_responsive` - `convert_design_to_css` - `review_css_accessibility` - `optimize_css` - `document_component` ## Preview sandbox Snippets render on `preview.css.observer` in an opaque-origin sandbox with `connect-src 'none'`: no fetch, no XHR, no WebSockets, no external scripts, and no access to CSS Observer cookies. Google Fonts stylesheets and https images work. Write self-contained code. ## Agent activity Every tool call is logged and shown to the user at https://css.observer/app/agents.