Wikimedia Commons MCP Server
Searches, inspects and downloads media from Wikimedia Commons: full-text/CirrusSearch file and category search (with fileType, category, hasStatement filters and pagination), file details (URLs, dimensions, MIME, SHA-1, license/attribution, EXIF), bounded image previews as ImageContent, category browsing, Picture of the Day retrieval, Wikibase MediaInfo structured data, coordinate/radius nearby search, cross-wiki file usage lookup, and sandboxed local downloads with path-traversal protection, size caps and SHA-1 verification.
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., "@Wikimedia Commons MCP Server Search Wikimedia Commons for photos of the Golden Gate Bridge"
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.
Wikimedia Commons MCP Server
Model Context Protocol (MCP) server for searching, inspecting, and safely downloading media from Wikimedia Commons.
Features
10 Read/Download Tools:
search_files: CirrusSearch with keyword,fileType,category,hasStatement(P180=...), sort order, and pagination.get_file_details: Original & thumbnail URLs, dimensions, MIME, SHA-1, license/attribution, author, description, categories, and EXIF metadata.preview_image: Size-bounded raster thumbnail returned as MCPImageContentfor visual inspection.search_categories: Full-text category search with subcategory/file counts.browse_category: List subcategories, files, or pages inside any Commons category.get_picture_of_the_day: Today's (or anyYYYY-MM-DD) Picture of the Day with localized caption and file details.get_structured_data: Wikibase MediaInfo (M<pageId>) multilingual captions and statements with resolved Wikidata labels.search_nearby: Coordinate + radius search for geotagged files.get_file_usage: Global usage across Wikipedia and sister Wikimedia projects.download_file: Sandboxed local download intoCOMMONS_DOWNLOAD_DIRwith path traversal protection, size caps, and SHA-1 verification for originals.
2 MCP Resources:
commons://potdcommons://file/{title}
Related MCP server: Wikipedia MCP Server
Configuration
Variable | Default | Description |
|
| Sandbox root directory for |
|
| Descriptive |
|
| HTTP request timeout ( |
|
| Max download size in bytes (default 50 MB) |
|
| Max inline preview size in bytes (default 2 MB) |
|
| In-memory read cache TTL ( |
|
| Maximum cached entries |
Development
npm install
npm run build
npm run verifyExample mcp_config.json
{
"mcpServers": {
"wikimedia-commons": {
"command": "node",
"args": ["/path/to/wikimedia-commons-mcp/dist/cli.js"],
"env": {
"WIKIMEDIA_USER_AGENT": "wikimedia-commons-mcp/0.1.0 (https://commons.wikimedia.org/wiki/Main_Page)"
}
}
}
}Available Tools
10 toolsbrowse_categoryBrowse Wikimedia Commons CategoryARead-onlyIdempotent
List subcategories, files, or pages inside a specific Wikimedia Commons category with continuation-token pagination.
Inputs: category (required), limit, types, continueToken.
download_fileDownload Wikimedia Commons FileA
Safely download an original Wikimedia Commons file or resized thumbnail into the configured sandbox download directory (COMMONS_DOWNLOAD_DIR). Enforces path traversal protection, size limits, and SHA-1 integrity verification for original files.
Inputs: title (required), width, filename, overwrite, +1 more.
get_file_detailsGet Wikimedia Commons File DetailsARead-onlyIdempotent
Retrieve full metadata for a Wikimedia Commons file: original and thumbnail URLs, dimensions, MIME type, SHA-1, license, attribution, author, description, categories, and EXIF technical metadata.
Inputs: title (required), thumbWidth, includeHiddenCategories.
get_file_usageGet Global File Usage Across WikisARead-onlyIdempotent
List Wikipedia and sister Wikimedia project pages that embed a given Wikimedia Commons file.
Inputs: title (required), limit, continueToken.
get_picture_of_the_dayGet Wikimedia Commons Picture of the DayARead-onlyIdempotent
Retrieve the Wikimedia Commons Picture of the Day for today (UTC) or a specific YYYY-MM-DD date, including localized caption and full file metadata.
Inputs: date, language, thumbWidth.
get_structured_dataGet Structured Data on CommonsARead-onlyIdempotent
Retrieve Wikibase MediaInfo (M-entity) multilingual captions and structured statements (such as P180 depicts, license, copyright status) with resolved Wikidata labels.
Inputs: title (required), language.
preview_imagePreview Wikimedia Commons ImageARead-onlyIdempotent
Fetch a size-bounded raster thumbnail of a Commons file and return it as MCP ImageContent for direct visual inspection, alongside attribution metadata.
Inputs: title (required), width.
search_categoriesSearch Wikimedia Commons CategoriesARead-onlyIdempotent
Search Wikimedia Commons categories (Namespace 14) by keyword and retrieve subcategory/file counts.
Inputs: query (required), limit, offset.
search_filesSearch Wikimedia Commons FilesARead-onlyIdempotent
Search media files on Wikimedia Commons using keywords, file type filters, category filters, or Structured Data statements (e.g. P180=Q146). Returns URLs, dimensions, MIME types, and license attribution.
Inputs: sort, limit, query, offset, +4 more.
search_nearbySearch Nearby Geotagged Commons FilesARead-onlyIdempotent
Find geotagged Wikimedia Commons media files within a given radius (in meters) around geographic coordinates.
Inputs: latitude (required), longitude (required), limit, thumbWidth, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct action-resource pair (keyword search, category search, category browsing, geo search, metadata, structured data, usage, preview, download, POTD), so an agent can generally pick correctly. The only mild overlaps are preview_image vs. download_file (both fetch file content) and search_files vs. browse_category (both enumerate files), but the descriptions clearly separate them by output form and entry point.
All names follow a consistent snake_case verb_noun pattern (get_file_details, search_files, browse_category, download_file, preview_image). The only stylistic outlier is the longer noun in get_picture_of_the_day, which is still the same convention.
Ten tools is a well-scoped surface for a media repository server, with each tool covering a genuinely different capability (discovery, metadata, structured data, geo, retrieval). There are no obvious filler or redundant entries.
The surface covers discovery (keyword, category, geo), metadata, structured MediaInfo, image preview, file download with integrity checks, usage tracking, and POTD—solid coverage for a read-only Commons client. Minor gaps exist around batch/multi-file operations and higher-level discovery (e.g., related/similar media or category tree traversal beyond one level), which agents can work around via pagination.
Maintenance
Related MCP Connectors
Wikimedia Commons MCP — Action API for files.
Unofficial Wikipedia MCP — wraps Wikipedia REST API (free, no auth)
Audio, music, video, image, PDF, speech, text and web-check tools callable from any MCP client.
Audio, music, video, image, PDF, speech, text and web-check tools callable from any MCP client.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables searching and retrieving images from Wikipedia Commons with detailed metadata including licenses and authors.211-
- AlicenseNot gradedqualityDmaintenanceProvides structured access to Wikipedia content including search, summaries, images, links, and more via MCP tools.6Apache 2.0
- AlicenseNot gradedqualityCmaintenanceA Wikimedia Commons MCP server enabling search, file metadata retrieval, category browsing, and random image selection through natural language.96 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables LLM clients to read, search, create, update, delete, move, protect, and upload content on any MediaWiki wiki through MCP tools and resources. It also supports wiki management, OAuth, and extension-specific queries for NeoWiki, Semantic MediaWiki, Bucket, Cargo, and Wikibase.8 npmMIT