zbmath-mcp
# zbmath-mcp
MCP server for [zbMath Open](https://zbmath.org) — the world's most comprehensive reviewed database of mathematical literature.
This server exposes the [zbMath Open REST API](https://api.zbmath.org/v1/) as [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) tools, enabling AI assistants such as Claude to search and retrieve mathematical publications, author profiles, and software entries directly.
## Tools
| Tool | Description |
|------|-------------|
| `search_documents` | Free-text search across 4.5 M+ zbMath documents |
| `get_document` | Fetch full metadata for a document by its zbMath ID |
| `structured_search` | Field-filtered search (author, title, MSC code, year range, journal) |
| `get_author` | Fetch an author profile by zbMath author ID |
| `get_software` | Fetch a software / swMath entry by its numeric ID |
## Requirements
- Python 3.11+
- [`uv`](https://docs.astral.sh/uv/) (recommended) or `pip`
## Installation
### Using uv (recommended)
Installs a global `zbmath-mcp` command:
```bash
uv tool install git+https://github.com/iwaokimura/zbmath-mcp.git
```
### Using pip
```bash
pip install git+https://github.com/iwaokimura/zbmath-mcp.git
```
### From source
```bash
git clone https://github.com/iwaokimura/zbmath-mcp.git
cd zbmath-mcp
uv sync
```
(With plain `pip` instead of `uv`, run `pip install -e .` in place of `uv sync`.)
## Usage
### Running the server
If you installed it as a tool (uv) or with pip:
```bash
zbmath-mcp
```
From a source checkout:
```bash
uv run zbmath-mcp
```
The server communicates over **stdio** using the MCP protocol, so running it
in a plain terminal just waits for a client to connect — that is expected.
Normally an MCP client (see below) launches it for you.
### Connecting with Claude Desktop
Add the following to your `claude_desktop_config.json`:
```json
{
"mcpServers": {
"zbmath": {
"command": "zbmath-mcp"
}
}
}
```
Or, to run from a source checkout without installing (replace the path with
your clone location):
```json
{
"mcpServers": {
"zbmath": {
"command": "uv",
"args": ["--directory", "/path/to/zbmath-mcp", "run", "zbmath-mcp"]
}
}
}
```
### Connecting with Claude Code (CLI)
If installed as a command:
```bash
claude mcp add zbmath -- zbmath-mcp
```
Or from a source checkout (replace the path with your clone location):
```bash
claude mcp add zbmath -- uv --directory /path/to/zbmath-mcp run zbmath-mcp
```
## Example interactions
Once connected, you can ask an AI assistant:
- *"Search zbMath for papers on the Langlands program from the last 5 years."*
- *"Get the zbMath document with ID 7192477."*
- *"Find all papers by Euler in zbMath."*
- *"Search for papers in MSC class 11 (Number Theory) published between 2000 and 2010."*
- *"Look up the software entry for Macaulay2 on swMath."*
## Development
```bash
git clone https://github.com/iwaokimura/zbmath-mcp.git
cd zbmath-mcp
uv sync # installs runtime + dev dependencies
uv run pytest # run the test suite
```
## License
MIT — see [LICENSE](LICENSE).
TDQS
Scored across 5 tools
Each tool targets a distinct purpose: author profile, document metadata, software metadata, free-text document search, and structured document search. Even the two search tools are clearly differentiated by their query style (free-text vs. field-specific filters).
All tools follow a consistent verb_noun pattern in lowercase snake_case (get_author, get_document, get_software, search_documents, structured_search). The convention is uniform and predictable.
With 5 tools, the server is well-scoped for a mathematical reference database. It covers retrieval of three core entity types (author, document, software) and two complementary search modalities (free-text and structured).
The tool surface covers essential retrieval and search operations, but lacks dedicated search endpoints for authors or software. While structured_search can filter documents by author, it cannot return author profiles or software entries directly, which is a minor gap.