librarian
An MCP server that enables LLMs to search, summarize, and retrieve detailed information from Wikipedia across multiple languages. It supports automated fact-checking by allowing models to proactively verify factual claims using Wikipedia's database.
README
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.
Note: While this guide focuses on Claude Desktop setup, Librarian also supports remote hosting via WebSocket/HTTP for broader accessibility.
"The only thing that you absolutely have to know is the location of the library."
— Albert Einstein
<div align="center">
<img src="docs/Example1.png" alt="Claude Desktop Response" width="600">
Example of Claude Desktop using the librarian MCP server to fact-check information
</div>
Features
- Automatic Fact-Checking: Configure Claude Desktop 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
Installation
Claude Desktop Setup
1. Prerequisites
- Claude Desktop installed on your computer
- uv package manager installed
- Python 3.13 or higher
2. Clone and Set Up the Project
git clone <your-repository-url>
cd librarian
uv sync
3. Configure Claude Desktop
Add this configuration to your Claude Desktop configuration file:
Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
For Windows:
{
"mcpServers": {
"librarian": {
"command": "C:\\Users\\[USERNAME]\\.local\\bin\\uv.exe",
"args": ["--directory", "C:\\Users\\[USERNAME]\\path\\to\\librarian", "run", "python", "librarian_stdio.py"],
"env": {
"PYTHONPATH": "C:\\Users\\[USERNAME]\\path\\to\\librarian"
}
}
}
}
For macOS/Linux:
{
"mcpServers": {
"librarian": {
"command": "uv",
"args": ["--directory", "/path/to/your/librarian", "run", "python", "librarian_stdio.py"],
"env": {
"PYTHONPATH": "/path/to/your/librarian"
}
}
}
}
Important:
- Replace
[USERNAME]and/path/to/your/librarianwith your actual paths - The
--directoryflag ensures uv uses the correct project environment - Use the full path to
uv.exeon Windows for reliability
4. Restart Claude Desktop
After adding the configuration, restart Claude Desktop completely to load the MCP server.
5. Troubleshooting
If you encounter issues:
-
Check Claude Desktop logs:
- Windows:
%AppData%\Claude\logs\mcp-server-librarian.log - macOS:
~/Library/Logs/Claude/mcp-server-librarian.log
- Windows:
-
Common issues:
ModuleNotFoundError: Ensure you're using the--directoryflag and correct pathsFile not found: Use absolute paths for bothcommandand inargsVirtual environment warnings: These are harmless but can be avoided with proper paths
-
Test manually:
cd /path/to/librarian uv run python librarian_stdio.py # Should start without errors
Automatic Fact-Checking Setup
To make Claude Desktop 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 system prompt by referencing: fact_checking_instructions
Behavior Examples
Once configured, Claude Desktop 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 in Claude Desktop
<img src="docs/Example2.png" alt="Tools Available" width="600">
Screenshot showing the Wikipedia tools available in Claude Desktop when the MCP server is properly configured
MCP Servers Configuration
<img src="docs/Example3.png" alt="MCP Servers" width="600">
Claude Desktop showing the librarian MCP server successfully connected and available
VS Code Integration Example
<img src="docs/Example4.png" alt="VS Code Response" width="600">
Example of using the librarian tools within VS Code with GitHub Copilot
License
This project is open source. Please check the license file for details.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.