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 "Install 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., "@librarianSummarize 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
| Name | Required | Description | Default |
|---|---|---|---|
| page_title | Yes | ||
| language | No | en | |
| include_full_content | No | ||
| include_categories | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It implies a read-only operation ('Get detailed information'), but doesn't specify rate limits, authentication needs, error handling, or the format of returned data (e.g., JSON structure). While it hints at output content, it lacks details on pagination, response size, or potential side effects, which is insufficient for a tool with multiple parameters and an output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose. It avoids redundancy and wastes no words, making it easy to parse. However, it could be slightly more structured by explicitly listing key features or use cases, but overall, it's appropriately concise for the tool's complexity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 4 parameters, 0% schema coverage, no annotations, but an output schema exists, the description is minimally adequate. It covers the basic purpose and output types, but lacks details on parameter usage, behavioral traits, and sibling differentiation. The output schema mitigates the need to explain return values, but the description doesn't provide enough context for optimal agent decision-making without additional inference.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the schema provides no parameter descriptions. The description mentions 'content, summary, and hyperlinked words', which loosely relates to parameters like 'include_full_content' and 'include_categories', but doesn't explain their purposes, defaults, or effects. It adds minimal semantic value beyond the parameter names, failing to fully compensate for the coverage gap, though it hints at the tool's scope.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get detailed information') and resource ('about a specific Wikipedia page'), specifying the types of information returned ('content, summary, and hyperlinked words'). It distinguishes from siblings like 'get_wikipedia_page_summary' by mentioning additional details beyond just a summary. However, it doesn't explicitly differentiate from 'get_wikipedia_page_sections' or 'get_wikipedia_page_sections_info', which might provide overlapping or more structured content.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings. It doesn't mention alternatives like 'get_wikipedia_page_summary' for a brief overview or 'search_wikipedia_pages' for finding pages. There's no context on prerequisites, such as needing a valid page title, or exclusions, leaving the agent to infer usage from the tool name and parameters alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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
| Name | Required | Description | Default |
|---|---|---|---|
| page_title | Yes | ||
| language | No | en |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions the tool 'gets a list' and is 'useful for' large pages, but lacks details on permissions, rate limits, error handling, or response format. For a tool with no annotations, this leaves significant gaps in understanding its operational traits, making it minimally adequate but with clear deficiencies.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, consisting of two sentences that directly state the tool's purpose and usage context. Every sentence earns its place by providing essential information without redundancy or fluff, making it efficient and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is reasonably complete. It explains what the tool does and when to use it, and since an output schema exists, it doesn't need to detail return values. However, it could improve by addressing parameter semantics or behavioral aspects to be fully comprehensive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 2 parameters with 0% description coverage, meaning no parameter details are provided in the schema. The description doesn't add any meaning about the parameters, such as explaining 'page_title' or 'language' usage. Since there are parameters but no compensation in the description, it meets the baseline for minimal viability without enhancing understanding beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get a list of the sections on a Wikipedia Page.' It specifies the verb ('Get') and resource ('sections on a Wikipedia Page'), making the function understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_wikipedia_page_sections_info', which might offer similar or overlapping functionality, preventing a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use the tool: 'when a page on wikipedia is too large and the LLM can query for the available sections to it to get only necessary information.' This explains the tool's utility in handling large pages by listing sections for targeted queries. It doesn't specify when not to use it or name alternatives among siblings, so it falls short of a 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_wikipedia_page_sections_infoC
Get detailed sections information about a specific Wikipedia page
| Name | Required | Description | Default |
|---|---|---|---|
| page_title | Yes | ||
| section_titles | No | ||
| section_indices | No | ||
| language | No | en |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'detailed sections information' but doesn't specify what that entails (e.g., content, metadata, structure), whether it's a read-only operation, potential rate limits, or error handling. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded, making it easy to parse quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (4 parameters, no annotations) and the presence of an output schema, the description is minimally adequate but incomplete. It covers the basic purpose but lacks details on usage, parameters, and behavioral traits, which are crucial for effective tool selection and invocation in this context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0% schema description coverage and 4 parameters (1 required, 3 optional), the description adds minimal value beyond the schema. It implies parameters like 'page_title' and possibly 'language' but doesn't explain their semantics, such as format for 'section_titles' or 'section_indices', or the purpose of 'language' beyond its default. This fails to compensate for the low schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Get detailed sections information') and resource ('about a specific Wikipedia page'), making the purpose understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_wikipedia_page_sections' or 'get_wikipedia_page_info', which likely provide related but different information.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as 'get_wikipedia_page_sections' or 'get_wikipedia_page_summary'. It lacks context about specific use cases, exclusions, or prerequisites, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_wikipedia_page_summaryB
Get a quick summary of a Wikipedia page - lighter version of get_wikipedia_page_info
| Name | Required | Description | Default |
|---|---|---|---|
| page_title | Yes | ||
| language | No | en | |
| sentences | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It mentions 'quick summary' and 'lighter version', hinting at performance or output brevity, but doesn't disclose critical behavioral traits like rate limits, error handling, authentication needs, or what 'lighter' entails (e.g., truncated content vs. full metadata). This leaves significant gaps for an agent to understand operational constraints.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise with two short phrases: 'Get a quick summary of a Wikipedia page' and 'lighter version of get_wikipedia_page_info'. Every word earns its place by stating purpose and providing a key comparison, with no wasted text or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (3 parameters, no annotations, but with an output schema), the description is minimally adequate. It covers the basic purpose and hints at a sibling comparison, but lacks details on behavior, parameters, or output expectations. The output schema existence reduces the need to explain return values, but overall completeness is limited for effective agent use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It doesn't mention any parameters explicitly, failing to add meaning beyond the schema. However, with 3 parameters (page_title, language, sentences) and default values provided in the schema, the baseline is 3 as the schema handles basic documentation, but the description adds no value to clarify usage or semantics.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Get a quick summary of a Wikipedia page' specifies the verb ('Get') and resource ('summary of a Wikipedia page'). It distinguishes from sibling 'get_wikipedia_page_info' by calling itself a 'lighter version', though it doesn't explicitly differentiate from other siblings like 'get_wikipedia_page_sections' or 'search_wikipedia_pages'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides some usage guidance by comparing to 'get_wikipedia_page_info' as a 'lighter version', implying this tool is for simpler, quicker summaries. However, it doesn't explicitly state when to use this tool versus alternatives like 'get_wikipedia_page_sections' or 'search_wikipedia_pages', nor does it mention any prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | ||
| language | No | en |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses that the tool returns the first 5 results with information to aid selection, which is useful behavioral context. However, it lacks details on rate limits, error handling, pagination beyond the first 5, or authentication needs. For a search tool with zero annotation coverage, this leaves significant gaps in understanding its operational behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, well-structured sentence that efficiently conveys the core functionality without unnecessary details. It's front-loaded with the main action and outcome, making it easy to understand at a glance. Every word serves a purpose, earning its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (search with filtering), no annotations, and an output schema (which reduces the need to describe return values), the description is minimally adequate. It covers the basic purpose and result count but lacks details on parameters, behavioral traits, and differentiation from siblings. With output schema handling return values, the description meets a baseline but has clear gaps in context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate for undocumented parameters. It mentions searching on a 'word/topic' (hinting at the query parameter) but doesn't explain the language parameter or provide any syntax, format, or constraints for either parameter. With 2 parameters and no schema descriptions, the description adds minimal semantic value beyond basic inference.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: searching Wikipedia pages on a word/topic and returning the first 5 results with information to help choose the most relevant one. It specifies the verb (search), resource (Wikipedia pages), and scope (first 5 results). However, it doesn't explicitly differentiate from sibling tools like get_wikipedia_page_info or get_wikipedia_page_summary, which appear to retrieve specific page details rather than search results.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for searching topics and selecting relevant results, but provides no explicit guidance on when to use this tool versus alternatives like get_wikipedia_page_summary or get_wikipedia_page_info. It mentions 'help choose the most relevant one,' suggesting it's for initial discovery, but doesn't clarify exclusions or prerequisites.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.1.0- First observed
get_wikipedia_page_info - First observed
get_wikipedia_page_sections - First observed
get_wikipedia_page_sections_info - First observed
get_wikipedia_page_summary - First observed
search_wikipedia_pages
TDQS
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.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- AlicenseBqualityBmaintenanceA 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.22291MIT
- FlicenseBqualityCmaintenanceA 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!226-
- 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.53196MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mlziade/librarian'
If you have feedback or need assistance with the MCP directory API, please join our Discord server