{"id":"bc068b13-1123-4d59-b794-66928f472424","slug":"msuicaut-mesh-mcp","kind":"mcp","name":"mesh-mcp","summary":"An experimental MCP (Model Context Protocol) server connecting Claude to the U.S. National Library of Medicine (NLM) Medical Subject Headings (MeSH) linked data APIs, built to investigate the potentia","owner":"msuicaut","repoUrl":"https://github.com/msuicaut/mesh-mcp","license":"GPL-3.0","licenseTier":"strong-copyleft","trust":"community","stars":1,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-03-15T00:53:57.000Z","addedAt":"2026-10-21T20:47:08.753Z","logoUrl":"https://avatars.githubusercontent.com/u/212432723?v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["cloud-infra","data-analytics","memory-knowledge"],"tags":[],"runtime":"python","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-23T12:39:03.416Z","sample":false,"url":"https://conduits.dev/tools/msuicaut-mesh-mcp","language":"Python","transports":["stdio"],"install":{"pypi":"mesh-mcp"},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# MeSH MCP\n\nAn experimental MCP (Model Context Protocol) server connecting Claude to the U.S. National\nLibrary of Medicine (NLM) Medical Subject Headings (MeSH) linked data APIs, built to investigate the potential of large language models in subject analysis and authority control.\n\n-----\n\n## What This Server Does\n\nMeSH MCP connects Claude Desktop to the NLM MeSH APIs, allowing you to search and retrieve MeSH authority data directly within your AI-assisted cataloging workflow.\n\n\nOnce installed, you can ask Claude things like:\n\n- *\"Search MeSH for terms related to osmotic stress\"*\n- *\"Find the MeSH descriptor for CRISPR gene editing\"*\n- *\"What is the scope note for this MeSH descriptor?\"*\n- *\"Look up the full record for descriptor D011506\"*\n\nThe server handles all the API calls, parses the responses, and returns\nstructured data Claude can reason about.\n\n-----\n\n## Who This Is For\n\n- **Catalogers and metadata staff** using Claude Desktop who want\n  AI-assisted subject description grounded in real MeSH vocabulary data\n- **Library and repository staff** working with health sciences or\n  biomedical research outputs — theses, datasets, grey literature —\n  where MeSH is the preferred controlled vocabulary\n- **Developers** integrating MeSH lookups into MCP-based systems\n\n-----\n\n## Tools\n\n| Tool | Description |\n|------|-------------|\n| `search_mesh` | Search MeSH descriptors by label using the NLM lookup autocomplete endpoint. Supports `startsWith` (default), `contains`, and `exact` matching. Returns a list of `{label, ui, uri}` dicts. |\n| `get_mesh_record` | Retrieve the full record for a MeSH descriptor by UI code or URI. Returns label, annotation (scope note), tree numbers, tree categories, broader descriptors, see-also cross-references, and qualifier count. |\n| `get_mesh_qualifiers` | Retrieve the allowable subheading qualifiers for a descriptor (e.g. `Diabetes Mellitus/therapy`). Optionally includes per-qualifier indexing annotations. |\n| `get_mesh_tree` | Retrieve the MeSH tree hierarchy for a descriptor: tree numbers, top-level category names, and immediate broader (parent) descriptors. |\n\n-----\n\n## Notes on Search Behaviour\n\n**`search_mesh` uses left-anchored matching by default** (`startsWith`), which matches from the beginning of the heading label. Searching `diabetes` will find `Diabetes Mellitus` and related headings, but searching `mellitus` will not. When a `startsWith` search returns no results, use `match=\"contains\"` to search anywhere in the label.\n\n**For highly specialized or emerging concepts** without a direct MeSH\nequivalent — such as specific protein families or recently coined\nterminology — search with a broader parent term and review the returned\nhierarchy to identify the best available descriptor.\n\n**Use `get_mesh_record` to verify before assigning.** Retrieve the full\nrecord to confirm the scope note matches the intended concept,\nparticularly when multiple candidate terms are returned. Tree numbers\nindicate where the term sits in the MeSH hierarchy and can guide\nselection of broader or narrower terms.\n\n-----\n\n## Installation\n\n### Requirements\n\n- Python 3.11 or later\n- Claude Desktop (or another MCP-compatible host)\n\n### Install from GitHub\n\n```bash\npip install git+https://github.com/YOUR_USERNAME/mesh-mcp.git\n```\n\n### Install from a local clone\n\n```bash\ngit clone https://github.com/YOUR_USERNAME/mesh-mcp.git\ncd mesh-mcp\npip install -e .\n```\n\nOn Windows with Anaconda, use Anaconda Prompt and add\n`--break-system-packages` if prompted.\n\n-----\n\n## Claude Desktop Configuration\n\nAfter installation, add the server to your `claude_desktop_config.json`.\nClaude Desktop uses a restricted PATH that does not include the Python\nbin directory, so the full path to the command is required.\n\nTo find your exact path, run the following in Terminal (Mac) or\nAnaconda Prompt (Windows):\n\n- **Mac:** `which mesh-mcp`\n- **Windows:** `where mesh-mcp`\n\nThe examples below are illustrative only — your actual path will differ\ndepending on your Python version and installation method.\n\n**Mac (example):**\n\n```json\n{\n  \"mcpServers\": {\n    \"mesh\": {\n      \"command\": \"/Library/Frameworks/Python.framework/Versions/3.13/bin/mesh-mcp\"\n    }\n  }\n}\n```\n\n**Windows/Anaconda (example):**\n\n```json\n{\n  \"mcpServers\": {\n    \"mesh\": {\n      \"command\": \"C:\\\\Users\\\\username\\\\anaconda3\\\\Scripts\\\\mesh-mcp.exe\"\n    }\n  }\n}\n```\n\nAlways replace the path with the actual output of the `which` or `where`\ncommand on your machine.\n\n**Finding your config file:**\n\n- **Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\nAfter editing the config, quit Claude Desktop completely and reopen it.\nThe MeSH tools will be available in your next conversation.\n\n### Verifying the installation\n\nOnce Claude Desktop is open, ask: *\"What cataloger tools do you have\navailable?\"* — you should see all four MeSH tools listed.\n\n-----\n\n## Troubleshooting\n\n**Tools not appearing in Claude Desktop**\n\n- Confirm the package installed without errors: `pip show mesh-mcp`\n- Confirm the command is available: `mesh-mcp --help` (should start\n  the server, not throw an error)\n- Check that the config file path is correct for your OS\n- Quit Claude Desktop fully (not just close the window) before reopening\n\n**Changes to server.py not taking effect**\n\nPython caches compiled bytecode in `__pycache__` folders. After editing\n`server.py`, delete any `__pycache__` folders in the package directory\nand restart Claude Desktop fully.\n\n-----\n\n## Data Source\n\nMeSH is produced by the U.S. National Library of Medicine and is freely\navailable with no license required. Attribution is appreciated.\n\n- [MeSH home](https://www.nlm.nih.gov/mesh/)\n- [MeSH browser](https://meshb.nlm.nih.gov/)\n- [MeSH RDF / linked data](https://hhs.github.io/meshrdf/)\n\n-----\n\n## License\n\nGPLv3. See [LICENSE](LICENSE).\n\n-----\n\n## Development Note\n\nThe code in this project was developed in collaboration with Claude,\nAnthropic's AI assistant. The design decisions — including tool\nselection, search protocols, and the application of MeSH cataloging\npractice to the server's behaviour — reflect the author's professional\ncataloging expertise. Claude handled the implementation of those\ndecisions in Python.\n\n-----\n\n## Acknowledgement\n\nThis project was inspired by and adapted from KL Tang's\n[cataloger-mcp](https://github.com/kltng/cataloger-mcp), extended here\nto apply to MeSH vocabulary lookup.\n"}