wikipedia-mcp-server

v0.2.6 pre-1.0

Search Wikipedia articles, read summaries and full text, target sections, find nearby pages, and list language editions via MCP. STDIO or Streamable HTTP.

wikipedia.caseyjhand.com/mcp
claude mcp add --transport http wikipedia-mcp-server https://wikipedia.caseyjhand.com/mcp
codex mcp add wikipedia-mcp-server --url https://wikipedia.caseyjhand.com/mcp
{
  "mcpServers": {
    "wikipedia-mcp-server": {
      "url": "https://wikipedia.caseyjhand.com/mcp"
    }
  }
}
gemini mcp add --transport http wikipedia-mcp-server https://wikipedia.caseyjhand.com/mcp
{
  "mcpServers": {
    "wikipedia-mcp-server": {
      "command": "bunx",
      "args": [
        "mcp-remote",
        "https://wikipedia.caseyjhand.com/mcp"
      ]
    }
  }
}
{
  "mcpServers": {
    "wikipedia-mcp-server": {
      "type": "http",
      "url": "https://wikipedia.caseyjhand.com/mcp"
    }
  }
}
curl -X POST https://wikipedia.caseyjhand.com/mcp \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"curl","version":"1.0.0"}}}'

Tools

6

wikipedia_search_articles

open-world

Search Wikipedia articles by full-text query. Returns ranked results with plain-text titles, short descriptions, Wikidata QIDs, snippets (HTML stripped), page IDs, and word counts — the description is usually enough to tell same-named articles apart without a summary call per result. When Wikipedia has a spelling correction for the query, it is returned as suggestion. Best when the exact article title is unknown or when multiple articles on a topic are needed. Pass a result title to wikipedia_get_summary, wikipedia_get_article, or wikipedia_get_sections for follow-up reads. Use offset to page beyond the first result page. Supports all Wikipedia language editions.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "wikipedia_search_articles",
    "arguments": {
      "query": "<query>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "query": {
      "type": "string",
      "description": "Search query (e.g. \"Python programming language\"). Must not be empty."
    },
    "limit": {
      "default": 10,
      "description": "Maximum number of results to return per page (default 10, max 50). Must be a positive integer.",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "offset": {
      "default": 0,
      "description": "Result offset for pagination (default 0). Pass the nextOffset from a previous response to fetch the next page; limit still governs the per-page size. An offset past the total match count returns an empty result array, not an error. Wikipedia serves no result past 10,000, so an offset at or beyond that fails — narrow the query instead.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "language": {
      "default": "en",
      "description": "Wikipedia language edition code (default \"en\"). Examples: \"fr\", \"de\", \"ja\".",
      "type": "string"
    }
  },
  "required": [
    "query",
    "limit",
    "offset",
    "language"
  ],
  "additionalProperties": false
}
view source ↗

wikipedia_get_summary

open-world

Fetch the short article summary that answers "what is X?". The extract is a truncated fragment from the start of the lead section — usually a sentence or two, and as little as a tenth of the lead — alongside the Wikidata QID (wikibase_item) for cross-referencing with wikidata-mcp-server, a short description, a thumbnail URL, the canonical article URL, the revision the extract was read from, and, for a geotagged article, latitude and longitude that pass straight to wikipedia_search_nearby to answer "what else is notable near this". For the lead section in full, call wikipedia_get_article with section_index 0. Redirect pages are followed automatically. When page_type is "disambiguation", the title matched a disambiguation page — call wikipedia_search_articles with a more specific query to find the intended article. Prefer this over wikipedia_get_article unless article depth is needed.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "wikipedia_get_summary",
    "arguments": {
      "title": "<title>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Article title (URL-decoded), e.g. \"Python (programming language)\". A trailing #fragment is accepted and ignored; the characters < > [ ] { } and | cannot appear in a Wikipedia page name."
    },
    "language": {
      "default": "en",
      "description": "Wikipedia language edition code (default \"en\"). Examples: \"fr\", \"de\", \"ja\".",
      "type": "string"
    }
  },
  "required": [
    "title",
    "language"
  ],
  "additionalProperties": false
}
view source ↗

wikipedia_get_article

open-world

Fetch article content as clean plain text. Without section_index: returns the full article with == Section == markers preserved for structure — or, when the article exceeds the size budget, a compact section outline (truncated: true) that points to wikipedia_get_sections plus a section_index read instead of the full text. With section_index (from wikipedia_get_sections): returns that section and every subsection nested under it, each heading above its own body. section_index 0 is the lead section, the text above the first heading, which is the full prose wikipedia_get_summary returns only a truncated fragment of. Section-targeted reads are faster and smaller when only part of the article is needed. Both paths keep superscripts and subscripts apart from the text beside them (10²³, H₂O), render formulas as their TeX, and render code samples as fenced blocks with their indentation intact. A section read also renders data tables as pipe-delimited rows (header row first) and infoboxes as "label: value" lines; a table too large to include leaves a "[table omitted: N rows]" marker in its place. The full-article path carries no data tables or infoboxes, so read the section for those. Tables used only for layout, such as multi-column lists, keep their content as ordinary text. Page furniture is omitted as well — maintenance banners, sister-project and library-resource boxes, portal bars, and spoken-article notices — while a hatnote naming a related article is kept. Every read returns the canonical article URL and the ID of the revision it was read from, for citation; a full read also returns that revision's timestamp. Redirect pages are followed automatically, and the citation fields name the target article.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "wikipedia_get_article",
    "arguments": {
      "title": "<title>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Article title (e.g. \"Python (programming language)\"). A trailing #fragment is accepted and ignored; the characters < > [ ] { } and | cannot appear in a Wikipedia page name."
    },
    "section_index": {
      "description": "Section index from wikipedia_get_sections. 0 reads the lead section (Introduction) — the text above the first heading. Omit for the full article. Providing this returns the targeted section plus every subsection nested under it, as plain text.",
      "type": "integer",
      "minimum": 0,
      "maximum": 9007199254740991
    },
    "language": {
      "default": "en",
      "description": "Wikipedia language edition code (default \"en\"). Examples: \"fr\", \"de\", \"ja\".",
      "type": "string"
    }
  },
  "required": [
    "title",
    "language"
  ],
  "additionalProperties": false
}
view source ↗

wikipedia_get_sections

open-world

Fetch the table of contents for a Wikipedia article. Returns section titles, heading levels, section numbering (e.g. "2.1"), and section_index values. The first entry is the lead section, index 0, titled Introduction — the text above the first heading, which Wikipedia's own table of contents omits. Pass a section_index to wikipedia_get_article to retrieve just that section. Useful for enumerating article structure before doing a targeted section read. Redirect pages are followed automatically.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "wikipedia_get_sections",
    "arguments": {
      "title": "<title>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Article title (e.g. \"Python (programming language)\"). A trailing #fragment is accepted and ignored; the characters < > [ ] { } and | cannot appear in a Wikipedia page name."
    },
    "language": {
      "default": "en",
      "description": "Wikipedia language edition code (default \"en\"). Examples: \"fr\", \"de\", \"ja\".",
      "type": "string"
    }
  },
  "required": [
    "title",
    "language"
  ],
  "additionalProperties": false
}
view source ↗

wikipedia_search_nearby

open-world

Find Wikipedia articles about places near a geographic coordinate. Returns articles sorted by distance from the query point, with titles, short descriptions, Wikidata QIDs, page IDs, coordinates, and distance in meters. Useful for "what is notable near X?" research workflows. Only articles carrying their own coordinate tag (GeoData, set on the article itself — not the Wikidata item's coordinate) are returned, and that tag is what places and measures each result; not all articles about locations are geotagged, and an article whose tag is wrong appears where the tag puts it, which its description usually makes plain.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "wikipedia_search_nearby",
    "arguments": {
      "latitude": "<latitude>",
      "longitude": "<longitude>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "latitude": {
      "type": "number",
      "description": "WGS 84 latitude in decimal degrees (range: −90 to 90)."
    },
    "longitude": {
      "type": "number",
      "description": "WGS 84 longitude in decimal degrees (range: −180 to 180)."
    },
    "radius_meters": {
      "default": 1000,
      "description": "Search radius in meters (default 1000, min 10, max 10000 — the MediaWiki geosearch bounds). Must be an integer; a value above the maximum is clamped to it.",
      "type": "integer",
      "minimum": 10,
      "maximum": 9007199254740991
    },
    "limit": {
      "default": 10,
      "description": "Maximum number of results to return (default 10, max 500 — the MediaWiki geosearch ceiling). Must be a positive integer. Geosearch has no pagination, so articles past this limit are only reachable by raising it or searching narrower radii.",
      "type": "integer",
      "minimum": 1,
      "maximum": 500
    },
    "language": {
      "default": "en",
      "description": "Wikipedia language edition code (default \"en\"). Examples: \"fr\", \"de\", \"ja\".",
      "type": "string"
    }
  },
  "required": [
    "latitude",
    "longitude",
    "radius_meters",
    "limit",
    "language"
  ],
  "additionalProperties": false
}
view source ↗

wikipedia_get_languages

open-world

List the language editions available for a Wikipedia article. Returns language codes, article titles in each language, and full URLs. Useful for cross-language research and for discovering the correct article title in a target language before fetching it. A popular article exists in hundreds of editions, so pass editions to narrow the answer to the codes you care about — the codes with no article come back under missing, and total_languages still reports the full count. Redirect pages are followed automatically, and source_title reports the resolved article the links belong to. The language parameter specifies which edition to query from.

read
invocation
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "wikipedia_get_languages",
    "arguments": {
      "title": "<title>"
    }
  }
}
schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "description": "Article title in the source language edition. A trailing #fragment is accepted and ignored; the characters < > [ ] { } and | cannot appear in a Wikipedia page name."
    },
    "language": {
      "default": "en",
      "description": "Wikipedia language edition to query from (default \"en\"). Examples: \"fr\", \"de\", \"ja\".",
      "type": "string"
    },
    "editions": {
      "description": "Edition codes to keep, e.g. [\"fr\", \"de\", \"gsw\"]. Each is matched case-insensitively against both edition_code and language_code, so either spelling of a mismatch edition finds it (\"gsw\" matches the edition whose edition_code is \"als\"). Omit to list every edition. A code with no article for this title is reported under missing rather than dropped, and is not a failure.",
      "minItems": 1,
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "title",
    "language"
  ],
  "additionalProperties": false
}
view source ↗