MCP server/search

Librarian MCP Server

Query Wikipedia for information and automate fact-checking with LLMs.

★ 1mlziade/librarian ↗by mlziadeupdated
Manual setup required. The maintainer's config contains paths only you know - edit the placeholders below before adding it to Claude Code.
1

Prepare the server locally

Run this once before adding it to Claude Code.

git clone <your-repository-url>
cd librarian
uv sync
2

Register it in Claude Code

claude mcp add -e "PYTHONPATH=${PYTHONPATH}" librarian -- uv --directory /path/to/your/librarian run python librarian_stdio.py

Replace any placeholder paths in the command with the real path on your machine.

Required:PYTHONPATH
3

Make your agent remember this setup

librarian's config, env vars, and the gotchas you hit — recalled in every future Claude Code, Cursor, and Codex session.

npx conare@latest

Free · one command · indexes the sessions already on disk. Set up in the browser instead →

What it does

  • Automatic fact-checking of factual claims
  • Wikipedia search functionality
  • Detailed page information and summary retrieval
  • Access to specific page sections
  • Multi-language Wikipedia support

Tools 5

search_wikipedia_pagesSearch for Wikipedia articles on any topic and return the top 5 results.
get_wikipedia_page_infoGet comprehensive information about a specific page including content, summary, hyperlinked words, and categories.
get_wikipedia_page_summaryGet quick summaries of Wikipedia pages with customizable sentence length.
get_wikipedia_page_sectionsGet a list of all sections on a Wikipedia page.
get_wikipedia_page_sections_infoGet detailed content for specific sections of a Wikipedia page by title or index.

Environment Variables

PYTHONPATHrequiredPath to the librarian project directory

Try it

Use your Wikipedia tools to automatically fact-check any factual claims in our conversation.
Search for Wikipedia articles about the history of the internet.
Get a summary of the Wikipedia page for 'Artificial Intelligence' in French.
List the sections of the Wikipedia page for 'Quantum Computing'.
Retrieve the content of the 'History' section from the Wikipedia page for 'Python (programming language)'.
Original README from mlziade/librarian

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

Example of Claude Desktop using the librarian MCP server to fact-check information

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/librarian with your actual paths
  • The --directory flag ensures uv uses the correct project environment
  • Use the full path to uv.exe on 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:

  1. Check Claude Desktop logs:

    • Windows: %AppData%\Claude\logs\mcp-server-librarian.log
    • macOS: ~/Library/Logs/Claude/mcp-server-librarian.log
  2. Common issues:

    • ModuleNotFoundError: Ensure you're using the --directory flag and correct paths
    • File not found: Use absolute paths for both command and in args
    • Virtual environment warnings: These are harmless but can be avoided with proper paths
  3. 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

  1. search_wikipedia_pages: Search for Wikipedia articles on any topic and return the top 5 results with selection information
  2. get_wikipedia_page_info: Get comprehensive information about a specific page including content, summary, hyperlinked words, and categories
  3. get_wikipedia_page_summary: Get quick summaries of Wikipedia pages with customizable sentence length
  4. get_wikipedia_page_sections: Get a list of all sections on a Wikipedia page for large pages where you need specific information
  5. 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

Availab

Frequently Asked Questions

What are the key features of Librarian?

Automatic fact-checking of factual claims. Wikipedia search functionality. Detailed page information and summary retrieval. Access to specific page sections. Multi-language Wikipedia support.

What can I use Librarian for?

Proactively verifying historical dates and events during research. Validating biographical information for accuracy. Confirming scientific facts and discoveries in technical writing. Correcting common misconceptions in real-time conversations.

How do I install Librarian?

Install Librarian by running: git clone <your-repository-url> && cd librarian && uv sync

What MCP clients work with Librarian?

Librarian works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Conare · memory for coding agents

Turn this server into reusable context

Keep Librarian docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Set up free$npx conare@latest