Integrations

Model Context Protocol (MCP)

Expose Thunderbit as an MCP server so Claude, Cursor, Windsurf, and Claude Code can read URLs

MCP is an open protocol for plugging tools into LLM hosts. Once you wire Thunderbit up as an MCP server, every MCP-aware client — Claude Desktop, Cursor, Windsurf, Claude Code, Zed — gets a read_url tool for free.

Install

npm install @modelcontextprotocol/sdk zod

Server (TypeScript)

import { Server } from '@modelcontextprotocol/sdk/server/index.js';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';

const API = 'https://openapi.thunderbit.com/openapi/v1';
const H = { Authorization: `Bearer ${process.env.THUNDERBIT_API_KEY}` };

const server = new Server(
  { name: 'thunderbit', version: '0.1.0' },
  { capabilities: { tools: {} } },
);

server.setRequestHandler(ListToolsRequestSchema, async () => ({
  tools: [
    {
      name: 'read_url',
      description: 'Fetch a URL and return clean Markdown.',
      inputSchema: {
        type: 'object',
        properties: {
          url: { type: 'string' },
          renderMode: { type: 'string', enum: ['basic', 'advanced'], default: 'basic' },
        },
        required: ['url'],
      },
    },
  ],
}));

server.setRequestHandler(CallToolRequestSchema, async (req) => {
  const { url, renderMode = 'basic' } = req.params.arguments as any;
  const res = await fetch(`${API}/distill`, {
    method: 'POST',
    headers: { ...H, 'Content-Type': 'application/json' },
    body: JSON.stringify({ url, renderMode }),
  });
  const json = await res.json();
  return { content: [{ type: 'text', text: json.data.markdown }] };
});

await server.connect(new StdioServerTransport());

Wire into Claude Desktop

~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "thunderbit": {
      "command": "node",
      "args": ["/abs/path/to/server.js"],
      "env": { "THUNDERBIT_API_KEY": "tb_live_..." }
    }
  }
}

Restart Claude Desktop — read_url shows up in the tool picker.

Wire into Cursor / Windsurf / Claude Code

All three read MCP config from a similar JSON. See each editor's docs — the mcpServers shape is identical.

Tips

  • Add a second tool extract_data backed by /extract for structured pulls
  • For batch jobs, expose read_urls (plural) backed by /batch/distill and poll inside the handler
  • Keep the server stdio-based for desktop hosts; switch to SSE if hosting remotely