██╗ ██╗ ██████╗ ██╗ ██╗████████╗ ██╗ ██╗██╗██╗ ██╗██╗ ██████╗ ██╗ ██╗
██║ ██║██╔════╝ ██║ ██║╚══██╔══╝ ██║ ██║██║██║ ██╔╝██║ ██╔════╝ ██║ ██║
██║ ██║██║ ███╗███████║ ██║ ██║ █╗ ██║██║█████╔╝ ██║ ██║ ██║ ██║
██║ ██║██║ ██║██╔══██║ ██║ ██║███╗██║██║██╔═██╗ ██║ ██║ ██║ ██║
███████╗██║╚██████╔╝██║ ██║ ██║ ╚███╔███╔╝██║██║ ██╗██║ ╚██████╗ ███████╗██║
╚══════╝╚═╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝ ╚══╝╚══╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═════╝ ╚══════╝╚═╝
A fast, lightweight Wikipedia client for the terminal — and an MCP server so AI assistants can read Wikipedia too.
Usage | Quickstart | MCP Server | Docs | Dev
Ships as two binaries sharing one internal Wikimedia REST API client:
wikipedia— terminal CLI to search, read, and random-discover articleswikipedia-mcp— MCP server over stdio for AI clients
I started this repository in my early programming career. I wrote the CLI in pure Python using functional programming. I mainly used it with my bashrc to render a random Wikipedia article on terminal startup. Took me roughly a week to build after work.
I stumbled across this project in 2026, and asked myself: can I rebuild this into a lightweight LLM-ready CLI in one prompt as cheap as possible? I used DeepSeek V4 Flash via OpenRouter on Opencode. First shot I got a working CLI and MCP server. I added a TUI in 2 more prompts. And this wiki on gh-pages in 3 more prompts. I landed the entire rewrite in 1.5h at $1.10 API cost.
Download the latest release and make binaries executable:
chmod +x wikipedia
wikipedia -r # gets you a random article summarywikipedia # random article summary
wikipedia -s "Go programming language" # search and read
wikipedia -s "Go" -f # full article
wikipedia -l de -s "Go" # other languages
wikipedia --tui # interactive TUI| Flag | Short | Description |
|---|---|---|
--search |
-s |
Search query (default: random) |
--full |
-f |
Show full article |
--lang |
-l |
Language code (default: en) |
--random |
-r |
Force random article |
--tui |
-t |
Interactive TUI |
--mcp |
Run as MCP server | |
--no-color |
Disable ANSI colors |
Requires Go 1.26+ to build. Builds bin/wikipedia and bin/wikipedia-mcp.
Configure in your AI client (Claude Code, Copilot, Continue, etc.):
{
"mcpServers": {
"wikipedia": { "command": "/path/to/bin/wikipedia-mcp" }
}
}Documentation is available at the project site. Includes CLI reference, MCP setup, architecture notes, and a developer guide for AI agents.
MIT