CleanSnapv1 API
Beginner·6 min read·Topic: cleansnap mcp server claude cursor setup

CleanSnap MCP Server Setup for Claude Desktop, Cursor & Windsurf (2026 Guide)

Wire CleanSnap into Claude Desktop, Cursor, or Windsurf via MCP so your coding assistant reads live API documentation, RFCs, and pricing pages as crisp Markdown—without OneTrust cookie walls, bloated navbars, or headless-browser delays.

Why this breaks in production

Default IDE web fetchers routinely fail on real-world developer workflows: either they return 180 KB of raw HTML packed with Tailwind utility classes, React hydration scripts, and GDPR consent dialogs (blowing through your chat context window in two tool calls), or they spin up slow headless Chromium instances that time out on simple documentation lookups.

Connecting CleanSnap's extraction endpoint through Model Context Protocol (MCP) gives Claude Desktop and Cursor a deterministic, sub-second `fetch_clean_markdown` capability. Every URL returns clean Markdown with preserved fenced code blocks (`ts`, `python`, `bash`), GFM tables, OpenGraph metadata, and deduplicated contextual links—cutting context bloat by 80%–92% before a single token hits Claude Sonnet or Opus.

Because CleanSnap runs zero-login for instant playground testing and uses pure stateless HTTP extraction with SSRF protection, you can configure your local IDE config in under 2 minutes with zero Docker containers or Chromium binaries installed on your laptop.

Recommended Engineering Approach

1

Locate your IDE's MCP configuration file

For Claude Desktop on macOS open `~/Library/Application Support/Claude/claude_desktop_config.json` (on Windows: `%APPDATA%\Claude\claude_desktop_config.json`). For Cursor, open `.cursor/mcp.json` in your repo root or global `~/.cursor/mcp.json` via Settings → Features → MCP.

2

Register the CleanSnap MCP bridge with strict token-saving defaults

Add the `cleansnap` entry under `mcpServers` with `CLEANSNAP_STRIP_COOKIES=true`, `CLEANSNAP_STRIP_NAV=true`, and `CLEANSNAP_MAX_CHARS=18000` so documentation fetches stay crisp and never evict your repository files from the active prompt.

3

Restart your client and verify the tool appears in the MCP hammer/tools menu

Fully quit and reopen Claude Desktop (Cmd+Q / Ctrl+Q) or click Refresh in Cursor's MCP panel. Confirm the CleanSnap tool shows a green active status indicator.

4

Test with a real docs URL + multi-hop follow-up prompt

Prompt Claude or Cursor: 'Use cleansnap to read https://usecleansnap.com/guides/preserve-code-blocks-html-to-markdown and generate a typed Node.js helper matching those exact pitfalls.' Verify fenced code indentation and clean token count.

Working Code Example

claude_desktop_config.json / .cursor/mcp.jsonjson
{
  "mcpServers": {
    "cleansnap": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://usecleansnap.com/api/v1/extract"
      ],
      "env": {
        "CLEANSNAP_STRIP_COOKIES": "true",
        "CLEANSNAP_STRIP_NAV": "true",
        "CLEANSNAP_INCLUDE_METADATA": "true",
        "CLEANSNAP_INCLUDE_LINKS": "true",
        "CLEANSNAP_MAX_CHARS": "18000"
      }
    }
  }
}
TRY IT LIVE — ZERO LOGIN

Test this workflow in the CleanSnap Playground

Pre-load the Sample Docs Page or paste your own URL to inspect clean Markdown, token savings, and auto-generated cURL / Node / Python / MCP code.

Run Sample Docs Page

Common Edge Cases & Pitfalls

  • Trailing commas in `claude_desktop_config.json` or `.cursor/mcp.json` cause silent JSON parse failures and hide all MCP servers—always validate with `jq` or VS Code before restarting.
  • Setting `CLEANSNAP_MAX_CHARS` above 60,000 in interactive coding sessions lets a single giant API reference crowd out your local source files and double Anthropic API latency.
  • Forgetting to keep Node.js 18+ on your system `PATH` (especially on macOS with `nvm` or `fnm`) causes Claude Desktop's GUI environment to fail finding `npx`—specify the absolute path to `npx` if the server fails to spawn.
  • Using MCP to fetch private localhost URLs (`http://127.0.0.1:3000`) will intentionally be blocked by CleanSnap's production SSRF guard; use CleanSnap for public documentation, GitHub, blogs, and SaaS specs.

Frequently Asked Questions

Does CleanSnap MCP require an API key or credit card to test in Claude or Cursor?

No. You can test the live `/api/v1/extract` endpoint immediately with zero login under the free playground rate limit (transparently exposed via `X-RateLimit-Remaining` headers), then upgrade to a dedicated API key when scaling team usage.

Will CleanSnap preserve Python indentation and TypeScript code blocks inside Cursor?

Yes. CleanSnap extracts `<pre><code>` blocks before whitespace normalization, strips Prism/Shiki syntax-highlight spans, decodes HTML entities cleanly, and outputs fenced Markdown blocks with language identifiers intact.

Does this MCP configuration also work in Windsurf, Cline, and Antigravity?

Yes. Any agent client or IDE supporting the standard `mcpServers` JSON specification (`command`, `args`, `env`) can connect to CleanSnap using the exact snippet above.

Related Developer Guides