ScavioScavio
ProductPricingDocs
Sign InGet Started
  1. Home
  2. Tutorials
  3. How to Convert API Docs to Markdown for Cursor
Tutorial

How to Convert API Docs to Markdown for Cursor

Fetch any API doc site as clean LLM-ready markdown inside Cursor using the Scavio MCP endpoint. No nav, no cookies, token-efficient.

Get Free API KeyAPI Docs

Cursor's context window is precious. Raw doc sites load with nav, cookie banners, and footers that waste 40 to 60% of the window. Scavio's structured content fetcher plus MCP integration strips chrome and returns LLM-ready markdown, so the agent reads more of what matters.

Prerequisites

  • Cursor IDE latest
  • A Scavio API key
  • Node.js 20+

Walkthrough

Step 1: Open Cursor MCP settings

Cursor reads MCP servers from ~/.cursor/mcp.json.

Bash
code ~/.cursor/mcp.json

Step 2: Register the Scavio MCP

One config block adds scavio_fetch and scavio_search tools.

JSON
{
  "mcpServers": {
    "scavio": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://mcp.scavio.dev/mcp"],
      "env": { "SCAVIO_API_KEY": "${SCAVIO_API_KEY}" }
    }
  }
}

Step 3: Reload Cursor

Restart the IDE to discover MCP tools.

Text
# Cmd+Shift+P then Reload Window

Step 4: Fetch a doc page in chat

Ask Cursor to pull and summarize a doc URL.

Text
@scavio fetch https://docs.prisma.io/orm/prisma-migrate and summarize the breaking changes in v6.

Step 5: Verify token savings

Check the input-token count versus a raw paste.

Text
# Before: ~8,000 tokens of raw HTML
# After:  ~2,500 tokens of structured markdown

Python Example

Python
# Cursor uses the MCP directly; no Python code required.
# Direct API call for parity:
import requests, os
API_KEY = os.environ['SCAVIO_API_KEY']
r = requests.post('https://api.scavio.dev/api/v1/extract',
    headers={'x-api-key': API_KEY},
    json={'url': 'https://docs.prisma.io/orm/prisma-migrate', 'format': 'markdown'})
print(r.json().get('markdown', '')[:500])

JavaScript Example

JavaScript
const API_KEY = process.env.SCAVIO_API_KEY;
const r = await fetch('https://api.scavio.dev/api/v1/extract', {
  method: 'POST',
  headers: { 'x-api-key': API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ url: 'https://docs.prisma.io/orm/prisma-migrate', format: 'markdown' })
});
console.log(((await r.json()).markdown || '').slice(0, 500));

Expected Output

JSON
Clean markdown representation of the doc page, stripped of nav and cookies. Cursor's context fills with content instead of chrome.

Related Tutorials

  • How to Convert a Website to LLM-Ready Markdown
  • How to Ground an LLM with GitHub Repo Data
  • How to Add Web Search to opencode CLI

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Cursor IDE latest. A Scavio API key. Node.js 20+. A Scavio API key gives you 50 free credits on signup.

Yes. The free tier includes 50 credits on signup, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Related Resources

Best Of

Best Docs-to-Markdown Tool for Cursor in 2026

Read more
Best Of

Best Search API for MCP Servers in 2026

Read more
Use Case

MCP Custom Search Server

Read more
Comparison

MCP Search Integration vs Direct API Integration

Read more
Use Case

IDE MCP Search

Read more
Glossary

Cursor MCP Web Search

Read more

Start Building

Fetch any API doc site as clean LLM-ready markdown inside Cursor using the Scavio MCP endpoint. No nav, no cookies, token-efficient.

Get Free API KeyRead the Docs
ScavioScavio

Real-time search API for AI agents. Search every platform, not just Google.

Product

  • Features
  • Pricing
  • Dashboard
  • Affiliates

Developers

  • Documentation
  • API Reference
  • Quickstart
  • MCP Integration
  • Python SDK

Alternatives

  • Tavily Alternative
  • SerpAPI Alternative
  • Firecrawl Alternative
  • Exa Alternative

Tools

  • JSON Formatter
  • cURL to Code
  • Token Counter
  • All Tools

© 2026 Scavio. All rights reserved.

Featured on TAAFT
Terms of ServicePrivacy Policy