wasp-mcp
wasp-mcp
Web Agent Semantic Protocol — MCP-Server
wasp-mcp ist ein Model Context Protocol-Server, der es Claude (oder jedem anderen MCP-Client) ermöglicht, beliebige Webseiten mit token-effizientem, strukturorientiertem Abruf abzufragen. Anstatt rohes HTML in das Kontextfenster zu laden, erstellt WASP einen leichtgewichtigen strukturellen Index (das Manifest) aus den Überschriften einer Seite und ruft dann nur den Inhalt für die für eine Abfrage relevanten Abschnitte ab.
Das Ergebnis: Antworten, die auf echten Seiteninhalten basieren, zu einem Bruchteil der Token-Kosten eines naiven Scrapings.
Siehe das WASP-Whitepaper für die vollständige Protokollspezifikation.
Funktionsweise
Jede Webseite hat zwei nützliche Ebenen:
Struktur — Überschriften und Abschnittsanker, die ein Inhaltsverzeichnis bilden. Klein, kostengünstig zu indizieren.
Inhalt — der Text unter jeder Überschrift. Teuer, vollständig zu senden; das meiste ist für eine bestimmte Abfrage irrelevant.
WASP nutzt diese Aufteilung mit einer zweistufigen Pipeline:
Tier 1 — get_manifest(url)
↓ Try GET /.well-known/wasp.json (site-native manifest, 3 s timeout)
↓ Fall back: fetch HTML → parse headings → generate manifest client-side
→ Returns: structured index (headings, anchors, depth, token estimates)
Tier 2 — fetch_chunk(url, anchor)
↓ Resolve anchor → DOM element (getElementById → querySelector → fuzzy match)
↓ Extract section text via Range API / heading-sibling walk
→ Returns: plain-text body of that section only
query_page(url, query)
↓ get_manifest → score chunks by keyword match → fetch_chunk for top results
↓ Build numbered [1. Heading] context → call Claude API → inline [N] citations
→ Returns: { answer, sources[] }Ein naives Full-Page-Scraping eines typischen Fakultätsprofils kostet ca. 16.700 Token. Die gleiche Abfrage über WASP kostet ca. 2.700 — eine 6-fache Reduzierung.
Related MCP server: MCP Web Research Server
Installation
Voraussetzungen: Node.js ≥ 18, ein Anthropic API-Key.
git clone https://github.com/seanfeeney/wasp-mcp
cd wasp-mcp
npm install
npm run buildAPI-Key festlegen:
export ANTHROPIC_API_KEY=sk-ant-...Server starten (stdio-Transport, für Claude Desktop / Claude Code):
node dist/index.jsZu Claude Code hinzufügen
Fügen Sie wasp-mcp als lokalen MCP-Server in Ihrer Claude Code-Projektkonfiguration hinzu:
claude mcp add wasp -- node /absolute/path/to/wasp-mcp/dist/index.jsOder bearbeiten Sie .claude/settings.json manuell:
{
"mcpServers": {
"wasp": {
"command": "node",
"args": ["/absolute/path/to/wasp-mcp/dist/index.js"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}Starten Sie Claude Code nach dem Speichern neu. Bestätigen Sie, dass der Server aktiv ist:
/mcpMCP-Tools
get_manifest
Ruft den strukturellen Index für eine URL ab. Versucht zuerst die eigene /.well-known/wasp.json der Website; greift andernfalls auf die clientseitige DOM-Generierung aus dem abgerufenen HTML zurück.
Parameter
Name | Typ | Erforderlich | Beschreibung |
| string | ja | Vollständig qualifizierte URL der Seite |
Beispiel
get_manifest("https://engineering.tamu.edu/cse/profiles/aklappenecker.html"){
"wasp": "1.0",
"url": "https://engineering.tamu.edu/cse/profiles/aklappenecker.html",
"title": "Andreas Klappenecker — Texas A&M CSE",
"summary": "Faculty profile for Andreas Klappenecker.",
"keywords": ["quantum computing", "cryptography", "image processing"],
"chunks": [
{ "id": "chunk_001", "heading": "Andreas Klappenecker", "anchor": "#wasp-001", "depth": 1, "tokens": 5, "order": 1 },
{ "id": "chunk_002", "heading": "Research Interests", "anchor": "#wasp-002", "depth": 2, "tokens": 4, "order": 2 },
{ "id": "chunk_003", "heading": "Selected Publications","anchor": "#wasp-003", "depth": 2, "tokens": 5, "order": 3 }
],
"generated": "client"
}fetch_chunk
Ruft den Klartext-Hauptteil eines einzelnen Abschnitts ab, der durch seinen Anker identifiziert wird. Die Ankerauflösung verwendet ein dreistufiges Fallback: getElementById → querySelector → Fuzzy-Überschriftenabgleich.
Parameter
Name | Typ | Erforderlich | Beschreibung |
| string | ja | Seiten-URL (wird für Cache-Suche verwendet; wird bei Nicht-Vorhandensein neu geladen) |
| string | ja | CSS-Anker-String aus dem Manifest (z. B. |
Beispiel
fetch_chunk(
"https://engineering.tamu.edu/cse/profiles/aklappenecker.html",
"#wasp-002"
)Quantum computing, image processing, cryptography.query_page
Vollständiger End-to-End-Abruf: Erstellt das Manifest, bewertet Abschnitte anhand der Abfrage, ruft relevante Abschnittsinhalte ab, ruft Claude auf und gibt eine zitierte Antwort zurück.
Parameter
Name | Typ | Erforderlich | Beschreibung | ||
| string | ja | Abzufragende Seite | ||
| string | ja | Frage in natürlicher Sprache | ||
| string | nein |
|
|
|
Beispiel
query_page(
"https://engineering.tamu.edu/cse/profiles/aklappenecker.html",
"What are this professor's research interests?"
){
"answer": "Professor Klappenecker's research interests are quantum computing [1], image processing [1], and cryptography [1].",
"sources": [
{ "heading": "Research Interests", "anchor": "#wasp-002" }
]
}Token-Effizienz
Ansatz | An LLM gesendete Token | Beispielseite |
Rohes HTML-Scraping | ~16.700 | TAMU-Fakultätsprofil |
WASP | ~2.700 | gleiche Seite, gleiche Abfrage |
Reduzierung | 6,1-fach |
Die Token-Einsparungen steigen mit der Seitenlänge. Eine 50.000-Token-Dokumentationsseite kann eine 20- bis 40-fache Reduzierung erfahren, wenn nur 2–3 Abschnitte relevant sind.
Projektstruktur
wasp-mcp/
index.ts MCP server entry — registers tools
manifest.ts get_manifest() — discovery + DOM generation
chunks.ts fetch_chunk() — anchor resolution + text extraction
retrieval.ts query_page() — scoring, enrichment, LLM call
providers.ts claude / openai / ollama provider adapters
cache.ts In-memory URL → { manifest, html } cache with TTL
types.ts Shared TypeScript typesLizenz
MIT © Sean Feeney, 2026
Available Tools
3 toolsfetch_chunkA
Fetch the plain-text content of a specific section of a webpage by its CSS anchor. Call get_manifest first to discover available anchors. Uses a three-stage anchor resolution: getElementById → querySelector → fuzzy heading match.
Inputs: url (required), anchor (required).
get_manifestA
Fetch the WASP structural index for a webpage. Returns a manifest with the page title, summary, keywords, language, and a list of heading sections (chunks) with their anchors and token estimates. Checks /.well-known/wasp.json first (native manifest); falls back to DOM-generated manifest if not found.
Inputs: url (required).
query_pageA
Ask a natural-language question about a webpage. Internally runs the full WASP two-tier retrieval pipeline: fetch manifest → score relevant chunks → fetch chunk content → call Claude API → return answer with inline citations. Requires ANTHROPIC_API_KEY environment variable (or OPENAI_API_KEY for provider=openai).
Inputs: url (required), query (required), provider.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: get_manifest retrieves the page index, fetch_chunk gets content of a specific section, and query_page performs a full Q&A pipeline. No functional overlap.
All tool names follow a consistent verb_noun pattern (get_manifest, fetch_chunk, query_page), making the API predictable and easy to navigate.
Three tools is appropriate for the server's purpose of indexing and querying webpages. Each tool earns its place and there are no superfluous or missing functions.
The set covers the full pipeline: manifest retrieval (get_manifest), targeted content access (fetch_chunk), and high-level question answering (query_page). No obvious gaps for the intended functionality.
Related MCP Connectors
Hosted Web Crawler MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
YouTube transcripts, TikTok videos, Instagram profiles, Reddit threads & HN MCP (-87% LLM tokens).
YouTube transcripts, TikTok videos, Instagram profiles, Reddit threads & HN MCP (-87% LLM tokens).
Autonomous Website Intelligence & OSINT Suite for AI Agents (10 Tools) Surgically extract clean token-optimized Markdown for RAG, detect 65+ tech stacks, identify corporate mail providers (Google Workspace vs Microsoft 365), and audit SSL/security posture with hardened SSRF protection. Quick Install in Claude Desktop (claude_desktop_config.json): json { "mcpServers": { "webintel": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-fetch", "https://webintel-apis.vercel.app/api/mcp"] } } }
Related MCP Servers
- AlicenseBqualityFmaintenanceA Model Context Protocol (MCP) server for web research. Bring real-time info into Claude and easily research any topic.3299MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables Claude to perform web research by integrating Google search, extracting webpage content, and capturing screenshots.320MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables Claude to perform web research by integrating Google search, extracting webpage content, and capturing screenshots in real-time.410MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI assistants to securely fetch and extract readable text content from web pages through a standardized interface.1MIT