# CopyMarkdown AI Agent Prompt & MCP Integration

Stateless MCP v2 server and Markdown extraction endpoint for AI coding agents (Claude Code, Cursor, Antigravity, ChatGPT Operator). Dedicated pipelines for `CONTENT.md`, `DESIGN.md`, and `LINKS.md`.

## Quick Setup (1-Line Fetch)
```bash
curl -s "https://www.copymarkdown.md/mcp" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
```

## MCP Configuration

Add to your MCP settings (`claude_desktop_config.json`, `mcpServers` in Cursor/Antigravity):

```json
{
  "mcpServers": {
    "copymarkdown": {
      "url": "https://www.copymarkdown.md/mcp"
    }
  }
}
```

## Available Tools

1. `url_to_markdown`
   - Extract clean, token-efficient Markdown from any public URL with headings, tables, code blocks, and links intact.
   - Input: `{ "url": "https://example.com/docs" }`

2. `generate_content_md`
   - Extract the core article or documentation body from any URL into a standardized `CONTENT.md` format, stripping navigation and advertising noise.
   - Input: `{ "url": "https://example.com/article" }`

3. `generate_design_md`
   - Extract a standardized `DESIGN.md` from any URL capturing CSS variables, typography scales, buttons, and color palettes.
   - Input: `{ "url": "https://example.com" }`

4. `generate_links_md`
   - Extract a complete link graph into a standardized `LINKS.md` format from any URL, separating internal routes from outbound citations and references with anchor text.
   - Input: `{ "url": "https://example.com" }`

## Direct Edge Curl Extraction
```bash
curl -s "https://www.copymarkdown.md/api/scrape?url=https://example.com"
```
