Wikimedia Commons MCP Server
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| COMMONS_CACHE_TTL_MS | No | In-memory read cache TTL (`0` disables caching). | 300000 |
| COMMONS_DOWNLOAD_DIR | No | Sandbox root directory for `download_file`. | ~/Downloads/wikimedia-commons |
| WIKIMEDIA_USER_AGENT | No | Descriptive `User-Agent` header per Wikimedia API policy. | wikimedia-commons-mcp/0.1.0 (...) |
| COMMONS_CACHE_MAX_ENTRIES | No | Maximum cached entries. | 250 |
| COMMONS_MAX_PREVIEW_BYTES | No | Max inline preview size in bytes (default 2 MB). | 2097152 |
| COMMONS_MAX_DOWNLOAD_BYTES | No | Max download size in bytes (default 50 MB). | 52428800 |
| COMMONS_REQUEST_TIMEOUT_MS | No | HTTP request timeout (`1000..120000` ms). | 15000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| search_filesA | 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. |
| search_categoriesA | Search Wikimedia Commons categories (Namespace 14) by keyword and retrieve subcategory/file counts. |
| browse_categoryA | List subcategories, files, or pages inside a specific Wikimedia Commons category with continuation-token pagination. |
| search_nearbyA | Find geotagged Wikimedia Commons media files within a given radius (in meters) around geographic coordinates. |
| get_file_detailsA | 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. |
| preview_imageA | Fetch a size-bounded raster thumbnail of a Commons file and return it as MCP ImageContent for direct visual inspection, alongside attribution metadata. |
| get_picture_of_the_dayA | 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. |
| get_structured_dataA | Retrieve Wikibase MediaInfo (M-entity) multilingual captions and structured statements (such as P180 depicts, license, copyright status) with resolved Wikidata labels. |
| get_file_usageA | List Wikipedia and sister Wikimedia project pages that embed a given Wikimedia Commons file. |
| download_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. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| picture-of-the-day | Current UTC Wikimedia Commons Picture of the Day metadata and attribution. |
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.