librarian
Enables searching for Wikipedia articles, retrieving page summaries and detailed content, and accessing specific article sections for fact-checking and information gathering across multiple languages.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@librarian Summarize the Wikipedia page for the Apollo 11 moon landing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
librarian
Librarian is a MCP (Model Context Protocol) server that allows any LLM with a compatible MCP client to query Wikipedia for information. It can be configured to automatically fact-check information without requiring explicit user requests.
It communicates exclusively over Streamable HTTP (MCP spec 2026-07-28).
"The only thing that you absolutely have to know is the location of the library."
— Albert Einstein
Example of an LLM using the librarian MCP server to fact-check information
Features
Automatic Fact-Checking: Configure your LLM client to proactively verify factual claims using Wikipedia
Wikipedia Search: Search for relevant Wikipedia articles
Page Information: Get detailed information about specific Wikipedia pages
Page Summaries: Quick summaries of Wikipedia pages
Page Sections: Get specific sections from Wikipedia pages
Multi-language Support: Query Wikipedia in different languages
Related MCP server: mediawiki-mcp-server
Installation
Prerequisites
uv package manager installed
Python 3.13 or higher
Setup
git clone <your-repository-url>
cd librarian
uv syncRunning the server
uv run python librarian_server.pyThe server starts on http://0.0.0.0:8000. The MCP endpoint is available at /mcp.
For production deployments behind gunicorn, use the ASGI adapter:
gunicorn librarian_wsgi:app -w 4 -k uvicorn.workers.UvicornWorker --bind 0.0.0.0:8000Client Configuration
Add this to your MCP client configuration to connect to the server:
{
"mcpServers": {
"librarian": {
"url": "https://your-server-host/mcp"
}
}
}Connect to Claude Code
First, start the server:
uv run python librarian_server.pyThen register it with Claude Code:
claude mcp add librarian -t http http://localhost:8000/mcpThe Wikipedia tools will be available automatically in your next Claude Code session.
Automatic Fact-Checking Setup
To make your LLM client automatically use Wikipedia for fact-checking, start your conversations with:
"Use your Wikipedia tools to automatically fact-check any factual claims in our conversation. Don't wait for me to ask - proactively verify information and provide corrections when needed."Or use the built-in prompt by referencing: fact_checking_instructions
Behavior Examples
Once configured, your LLM client will automatically:
Verify historical dates and events
Check biographical information
Confirm scientific facts and discoveries
Validate geographical information
Correct common misconceptions
Provide source attribution from Wikipedia
Available Tools
search_wikipedia_pages: Search for Wikipedia articles on any topic and return the top 5 results with selection information
get_wikipedia_page_info: Get comprehensive information about a specific page including content, summary, hyperlinked words, and categories
get_wikipedia_page_summary: Get quick summaries of Wikipedia pages with customizable sentence length
get_wikipedia_page_sections: Get a list of all sections on a Wikipedia page for large pages where you need specific information
get_wikipedia_page_sections_info: Get detailed content for specific sections of a Wikipedia page by title or index
All tools support multi-language Wikipedia queries by specifying the language parameter (default: "en").
Examples
Available Tools
Screenshot showing the Wikipedia tools available when the MCP server is properly configured
MCP Servers Configuration
MCP client showing the librarian server successfully connected and available
VS Code Integration Example
Example of using the librarian tools within VS Code with GitHub Copilot
Migration to MCP 2026-07-28
This project was originally built against the MCP 2025-11-05 spec (SDK v1.x). It has been fully migrated to the MCP 2026-07-28 spec (SDK v2.0.0).
What changed in the spec
The 2026-07-28 release is the most significant MCP revision to date. Its core change is a shift from a stateful, session-based protocol to a stateless, request/response protocol:
The
initialize/initializedhandshake is removed — clients send capabilities on every request via_metaThe
Mcp-Session-Idheader is removed — servers are now load-balancer friendly out of the boxThe WebSocket transport is removed entirely
The HTTP+SSE transport is deprecated in favour of Streamable HTTP
A new
server/discoverendpoint is required (handled automatically by the SDK)Tool/resource/prompt results are now validated against the protocol schema at decoration time
What was updated in this repo
File | Change |
|
|
|
|
|
|
| Replaced custom WebSocket + SSE implementation with |
| Same replacement as above |
| Deleted — server is now HTTP-only |
| Fixed prompt return types: |
| Removed unused |
Updated connection endpoints
The previous WebSocket (wss://) and SSE (/sse) endpoints are no longer available. All clients connect via the Streamable HTTP endpoint:
{
"mcpServers": {
"librarian": {
"url": "https://your-server-host/mcp"
}
}
}License
This project is open source. Please check the license file for details.
Available Tools
5 toolsget_wikipedia_page_infoC
Get detailed information about a specific Wikipedia page including content, summary, and hyperlinked words
Inputs: page_title (required), language, include_full_content, include_categories. Returns: object
get_wikipedia_page_sectionsA
Get a list of the sections on a Wikipedia Page. Its useful for when a page on wikipedia is too large and the LLM can query for the available sections to it to get only necessary information
Inputs: page_title (required), language. Returns: object
get_wikipedia_page_sections_infoC
Get detailed sections information about a specific Wikipedia page
Inputs: page_title (required), section_titles, section_indices, language. Returns: object
get_wikipedia_page_summaryB
Get a quick summary of a Wikipedia page - lighter version of get_wikipedia_page_info
Inputs: page_title (required), language, sentences. Returns: object
search_wikipedia_pagesB
Search for Wikipedia pages on a certain word/topic and return the first 5 results with information to help choose the most relevant one
Inputs: query (required), language. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Multiple tools have unclear boundaries and overlapping purposes. get_wikipedia_page_info and get_wikipedia_page_summary both provide page information with unclear differentiation beyond 'detailed' vs 'quick summary'. get_wikipedia_page_sections and get_wikipedia_page_sections_info appear to serve nearly identical functions, with descriptions suggesting minimal distinction. This overlap will likely cause agent misselection.
All tools follow a perfectly consistent verb_noun pattern with clear, descriptive names. The naming convention is uniform across all five tools, using snake_case and starting with action verbs like 'get' or 'search'. This predictability makes it easy for agents to understand and select tools.
Five tools is a reasonable number for a Wikipedia-focused server, slightly on the lower end but well-scoped. The count feels appropriate for the domain, though it could potentially benefit from additional tools like editing or history functions. Each tool appears to serve a distinct purpose within the limited scope, making the count appropriate.
The tool surface covers basic Wikipedia retrieval operations but has notable gaps. While it provides good read capabilities (info, sections, summary, search), there's no coverage for write operations, page history, or user interactions that might be expected in a comprehensive Wikipedia interface. The surface is functional but incomplete for full Wikipedia interaction.
Related MCP Connectors
The Remote MCP server acts as a standardized bridge between LLM applications (like Claude, ChatGPT, and Cursor) and external services, enabling AI agents to access external tools and resources. Its primary capability is providing a centralized search tool to discover other MCP servers and their respective tools. Unlike local implementations, it runs remotely with OAuth authentication and permission controls for security.
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Web search API and MCP server for developers building AI agents.
Related MCP Servers
- AlicenseBqualityDmaintenanceA Model Context Protocol server that retrieves information from Wikipedia to provide context to LLMs, allowing users to search articles, get summaries, full content, sections, and links from Wikipedia.222,981 PyPI306MIT
- FlicenseBqualityDmaintenanceA MCP server that allows you to search and retrieve content on any wiki site using MediaWiki with LLMs 🤖. wikipedia.org, fandom.com, wiki.gg and more sites using Mediawiki are supported!227-
- FlicenseNot gradedqualityDmaintenanceAn MCP server that retrieves and provides Wikipedia content for requested topics, enabling easy access to Wikipedia information directly through the Model Control Protocol.1-
- AlicenseAqualityDmaintenanceAn MCP server that enables web searching, URL content extraction, and summarization without requiring API keys. It also provides advanced mathematical evaluation and multi-language Wikipedia summary retrieval tools.5532 npm10MIT