wikimedia-commons-mcp
Looks up Wikidata entities by name or Q-ID and returns linked Wikimedia Commons images, including chemical structure diagrams (P117) for drugs and main images (P18).
Searches and retrieves freely licensed Wikimedia Commons images and videos, with file details, thumbnails, video copies, frames, labeled SVG diagrams, and attribution lines.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
wikimedia-commons-mcp
A remote MCP server that lets Claude (or any MCP client) search, view and credit freely licensed images and videos on Wikimedia Commons, with Wikidata lookups for drug structures and concept images.
It runs as a single Cloudflare Worker with no runtime dependencies and no login. It only reads public data.
Unofficial project. Wikimedia Commons and Wikidata are trademarks of the Wikimedia Foundation. This project is not endorsed by or affiliated with the Wikimedia Foundation.
Tools
Tool | What it does |
| Search Commons. Filter by photo, diagram (SVG) or video, and optionally exclude share-alike licenses. Every result includes license, author and a ready attribution line. |
| Full details for one file from a title, file page URL or |
| Returns a thumbnail as an actual image so the model can check it shows what it should before using it. |
| Name or Q-ID in, linked Commons images out. |
| Search Commons videos. Returns duration, resolution, poster still, a phone-friendly playback URL, caption languages and credit. Can skip videos over a length limit. |
| Every playable copy of a video (MP4 for iPhone and Safari, WebM sizes, original), caption tracks, an embed iframe and a ready |
| Still frames from evenly spaced or chosen timestamps, returned as images so the model can see what the clip shows. |
| Finds SVG diagrams whose labels are real text, ranks them by label count and lists the labels. Good sources for image occlusion cards. |
| Credit lines for up to 50 files at once in TASL, AMA or HTML style. |
Related MCP server: wikipedia-mcp-image-crawler
Deploy to Cloudflare
You need a free Cloudflare account.
Option A: from the dashboard (no local tools)
In the Cloudflare dashboard go to Workers & Pages > Create > Import a repository.
Connect GitHub and pick this repository.
Leave the build command empty. The deploy command is
npx wrangler deploy.Deploy. Your server will be at
https://wikimedia-commons-mcp.<your-subdomain>.workers.dev/mcp.
Every push to main redeploys automatically.
Option B: from your computer
npm install
npx wrangler login
npm run deployContact info
Wikimedia's User-Agent policy asks tools to identify themselves with a way to reach the operator. Set CONTACT in wrangler.jsonc (or as a variable in the dashboard) to a URL or an email you check.
Add it to Claude
On claude.ai, open Settings > Connectors and choose Add custom connector.
Name it
Wikimedia Commonsand paste your Worker URL ending in/mcp.In a chat, turn the connector on from the tools menu.
Once added on claude.ai it is also available in the Claude mobile and desktop apps.
Try: "Find a Commons photo of a Kayser-Fleischer ring, check it with view_image, and give me the credit line."
Develop and test
Requires Node 22.18 or newer (tests run TypeScript directly).
npm test # unit and protocol tests with mocked Wikimedia responses
npm run typecheck
npm run dev # local server at http://localhost:8787/mcp
npm run smoke -- https://<your-worker>.workers.dev/mcp # live check after deployingHow it works
Transport: MCP Streamable HTTP, stateless.
POST /mcptakes JSON-RPC and answers with JSON.GET /mcpreturns 405 because the server never pushes messages.Commons: MediaWiki Action API (
generator=searchplusprop=imageinfowithextmetadatafor license and author).Videos:
prop=videoinfowithderivatives(transcoded copies) andtimedtext(captions); stills come from Commons thumbnails with aseek=timestamp; transcripts fromaction=timedtext.Wikidata:
wbsearchentitiesandwbgetentities, reading properties P117 and P18.Safety: media downloads are limited to
upload.wikimedia.org, URL inputs are limited to Wikimedia hosts, sizes and counts are capped, and Wikimedia responses are cached at Cloudflare's edge for an hour to keep load low.
Licensing
The code is MIT licensed. Media from Commons keeps its own license, which this server reports for every file. Most files require attribution, and share-alike licenses also require derivatives to use the same license.
Ideas for later
Label coordinates from SVGs, for automatic occlusion boxes
Export straight to Anki through AnkiConnect
Open-i and other open medical image sources alongside Commons
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Search over 1.85 million captioned images using text, a reference image, or both. Upload a JPEG, PNG, or WebP image as base64, or provide a public HTTPS image URL. Find similar images from a Lightdrift asset ID and retrieve hosted file URLs, source licenses, and attribution. Connect with OAuth or an API key. Searches cost $0.005 ($5 per 1,000); image details are free. Setup: https://docs.lightdrift.ai/guides/images-mcp
Search photos and video moments by visual meaning, people, dates, and folders across local libraries, Apple Photos, and OneDrive. Manage collections, groups, favorites, people, and duplicate review. Synced metadata remains searchable while the desktop is offline; local and Apple Photos media access needs the owning device online with remote access enabled. OneDrive media can be accessed directly from the cloud. OAuth or Bearer API keys. Paid Cloud Access required; hosted visual search uses prepaid credits. Text-in-image search is semantic matching, not guaranteed exact OCR. Setup: https://organizewith.ai/en/guides/connect-ai-assistants
Openverse MCP — Creative-Commons-licensed image + audio search.
Search, organize, and publish AI-generated images and video with provenance and lineage.
Related MCP Servers
- AlicenseAqualityCmaintenanceLicense-first federated image search for AI agents and humans. Exposes MCP tools for concise, attribution-aware image discovery, license probing, and guarded downloads across open, platform, and editorial sources.73MIT
- FlicenseBqualityDmaintenanceEnables searching and retrieving images from Wikipedia Commons with detailed metadata including licenses and authors.211-
- AlicenseNot gradedqualityCmaintenanceEnables Claude users to search royalty-free photos, illustrations, vectors, and videos, and to fetch individual images or videos by ID. It runs read-only and stateless, with each user supplying their own Pixabay API key via a remote URL or a Claude Desktop extension.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search seven open media collections for reusable images, artworks, HDRIs, textures and 3D models, keeping only items whose own licence record clearly permits reuse. Returns ready-to-use attribution credit lines and can download the selected files with a generated credits file.MIT