openalex-mcp
This server lets you search and analyze the OpenAlex scholarly database (250M+ works, authors, institutions, and sources) through any MCP-compatible AI agent or a standalone CLI.
Search scholarly works by keyword, filters, and sort options; returns titles, DOIs, authors, year, citation count, and open-access status.
Get full work metadata by OpenAlex ID, DOI, PubMed ID, or MAG ID — abstract, affiliations, topics, citations, referenced works, and more.
Find researchers by name, institution, ORCID, or citation metrics, then pull full author profiles with h-index, i10-index, citation history, topics, and affiliations.
Search and inspect institutions — country, type, ROR ID, output, citations, h-index, and top topics; use the returned ID in work filters.
Search journals/conferences/repositories and get source details like ISSN, publisher, open-access status, h-index, and output/citation counts.
Aggregate/count works by year, type, country, topic, etc., to compute trends and distributions (e.g., annual publication growth, top institutions by output).
Access a filter reference resource (
openalex://filter-reference) documenting 100+ field codes and operators.Use the bundled CLI (
openalex) for the same operations from the terminal, with JSON/CSV/Markdown output, disk caching, shell completion, and no MCP client required.
Allows retrieval of scholarly work metadata by DOI using the OpenAlex API.
Enables GitHub Copilot to search and retrieve scholarly metadata from OpenAlex.
Allows searching for authors by ORCID identifier using the OpenAlex API.
Allows retrieval of scholarly work metadata by PubMed ID using the OpenAlex API.
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., "@openalex-mcp find papers about CRISPR gene editing from 2024"
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.
OpenAlex MCP Server & CLI
Connects any MCP-compatible AI agent — or your terminal — to OpenAlex: the world's largest free and open scholarly database with 250+ million works, 300+ million authors, 100,000+ institutions, and billions of citation links.
Works with: Claude Desktop · Claude Code · Cursor · VS Code Copilot · Windsurf · Zed · any MCP client — or standalone via the openalex CLI
No paywall. No institutional access required. CC0 licensed data.
What you can ask it
Ask | Tool that answers it |
"Find recent papers on graph neural networks, most cited first" |
|
"What's Geoffrey Hinton's h-index and how many papers has he published?" |
|
"Which institutions publish the most on CRISPR?" |
|
"Give me everything about this DOI" |
|
"Is this journal open access, and how big is it?" |
|
"How has output on transformers grown per year since 2017?" |
|
No API key needed. Setting OPENALEX_EMAIL puts you in OpenAlex's polite pool,
which raises your rate limit — worth doing, takes ten seconds.
Related MCP server: OpenAlex MCP Server
Quickstart (2 minutes)
1. Get your free API key at openalex.org/settings/api — takes 30 seconds
2. Install the server
pip install openalex-mcp3. Add to your AI agent — copy your client's config from Configuration below.
Prerequisites
Python 3.11+
python --version # needs 3.11 or higher
# Install if missing: https://python.org/downloadsuv (recommended)
# Windows
winget install astral-sh.uv
# macOS / Linux
curl -LsSf https://astral.sh/uv/install.sh | shNo uv? Use
pip install openalex-mcpinstead, then replaceuvx openalex-mcpin configs with the path fromwhere openalex-mcp(Windows) orwhich openalex-mcp(macOS/Linux).
Installation Options
One package, two executables: openalex-mcp (the MCP server, for AI agents) and
openalex (the CLI, for your terminal). Every option below
installs both.
Option A — uvx (recommended for MCP clients)
uvx openalex-mcp # install and run — uv handles everything
uv tool upgrade openalex-mcp # upgrade laterOption B — pip
pip install openalex-mcp
which openalex-mcp # macOS/Linux → /usr/local/bin/openalex-mcp
where openalex-mcp # Windows → C:\Users\YOU\AppData\...Option C — One command, straight from GitHub (no PyPI release needed)
Puts both openalex and openalex-mcp permanently on your PATH — nothing to cd
into, nothing to activate:
uv tool install git+https://github.com/JOSETRA44/openalex-mcp
# or, if you use pipx instead of uv:
pipx install git+https://github.com/JOSETRA44/openalex-mcpThen verify: openalex --version. Upgrade later with uv tool upgrade openalex-mcp /
pipx upgrade openalex-mcp, or re-run the install command to pick up the latest commit.
Option D — From source (for contributing)
git clone https://github.com/JOSETRA44/openalex-mcp.git
cd openalex-mcp
uv sync # installs openalex + openalex-mcp into .venv/
cp .env.example .env # edit .env with your key
uv run openalex-mcp # run the MCP server directly
.venv/bin/openalex --help # or .venv\Scripts\openalex.exe --help on WindowsPrefer the CLI on your global PATH while developing? uv tool install --editable .
installs it globally and keeps tracking your source edits live — no reinstall needed
after each change.
Environment Variables
Variable | Required | Default | Description |
| Recommended | — | Free API key from openalex.org/settings/api |
| Alt to key | — | Your email — uses the "polite pool" (slower but free, no key) |
| No |
| Response cache duration in seconds (0 = disabled) |
| No |
| Retries on rate-limit errors |
| No |
|
|
Either
OPENALEX_API_KEYorOPENALEX_EMAILis required. The API key gives 10× more daily quota ($1/day free).
Configuration by Client
Replace YOUR_API_KEY_HERE with your actual key in all configs below.
Claude Desktop
Config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"openalex": {
"command": "uvx",
"args": ["openalex-mcp"],
"env": {
"OPENALEX_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Restart Claude Desktop after saving. You'll see a hammer icon (🔨) confirming tools are loaded.
Claude Code (CLI)
Add to your project's .mcp.json in the repo root:
{
"mcpServers": {
"openalex": {
"command": "uvx",
"args": ["openalex-mcp"],
"env": {
"OPENALEX_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Or from source (local development):
{
"mcpServers": {
"openalex": {
"command": "uv",
"args": [
"--directory", "/absolute/path/to/openalex-mcp",
"run", "openalex-mcp"
],
"env": {
"OPENALEX_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Verify with /mcp in the Claude Code prompt — you should see openalex with 9 tools.
Cursor
Config file: .cursor/mcp.json in project root, or globally:
Windows:
%APPDATA%\Cursor\User\globalStorage\cursor.mcp\mcp.jsonmacOS:
~/Library/Application Support/Cursor/User/globalStorage/cursor.mcp/mcp.json
{
"mcpServers": {
"openalex": {
"command": "uvx",
"args": ["openalex-mcp"],
"env": {
"OPENALEX_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Settings → Features → MCP → toggle on → reload window.
VS Code + GitHub Copilot
Create .vscode/mcp.json in your workspace:
{
"servers": {
"openalex": {
"type": "stdio",
"command": "uvx",
"args": ["openalex-mcp"],
"env": {
"OPENALEX_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Ctrl+Shift+P → GitHub Copilot: Configure MCP
Windsurf
Config file:
Windows:
%APPDATA%\Codeium\windsurf\mcp_config.jsonmacOS:
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"openalex": {
"command": "uvx",
"args": ["openalex-mcp"],
"env": {
"OPENALEX_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}Zed
Edit ~/.config/zed/settings.json:
{
"context_servers": {
"openalex": {
"command": {
"path": "uvx",
"args": ["openalex-mcp"],
"env": {
"OPENALEX_API_KEY": "YOUR_API_KEY_HERE"
}
}
}
}
}Continue.dev
Edit .continue/config.yaml:
mcpServers:
- name: openalex
command: uvx
args:
- openalex-mcp
env:
OPENALEX_API_KEY: "YOUR_API_KEY_HERE"Any other MCP client (generic stdio)
command: uvx
args: ["openalex-mcp"]
env: OPENALEX_API_KEY=YOUR_API_KEY_HEREAutomated Setup Script
Auto-detect your installed clients and configure them:
# Interactive
python setup_mcp.py
# Non-interactive — configure all detected clients
python setup_mcp.py --key YOUR_API_KEY_HERE --yes
# Preview without writing files
python setup_mcp.py --key YOUR_API_KEY_HERE --dry-run --yes
# Show detected clients only
python setup_mcp.py --list
# Also install the openalex-researcher agent skill (needs Node.js/npm)
python setup_mcp.py --key YOUR_API_KEY_HERE --yes --with-skillThe script backs up existing config files before modifying them. It also offers
(interactively, or via --with-skill/--no-skill) to install the
openalex-researcher agent skill via npx skills — a separate,
explicit step since it touches the network and your agent's skills directory.
Available Tools (9 total)
Tool | What it does |
| Keyword + filter search over 250M+ scholarly works |
| Full metadata for one work (by OpenAlex ID, DOI, or PubMed ID) |
| Find researchers by name, institution, ORCID, or metrics |
| Author profile: h-index, i10-index, citations by year, topics |
| Search universities and research organizations by name/country |
| Institution details: country, type, h-index, top topics |
| Search journals, conferences, and repositories |
| Source details: ISSN, publisher, OA status, h-index |
| Group/count works by year, type, country, topic, etc. |
MCP Resource
Resource | Contents |
| Complete filter syntax: 100+ field codes, operators, and examples |
CLI (Command Line)
This package also installs an openalex command — a standalone terminal client for OpenAlex, no MCP client required. Every subcommand calls the exact same tool functions the MCP server uses (src/openalex_mcp/tools/*.py), so results match 1:1.
Install
uv tool install git+https://github.com/JOSETRA44/openalex-mcp # one command, global PATH — see Installation Options
openalex --help # confirm it's on your PATHpip install openalex-mcp and uv sync (from a source checkout) also install it — see Installation Options for every method.
Commands
Command | Mirrors | What it does |
|
| Search works |
|
| Full work metadata |
|
| Search researchers |
|
| Full author profile |
|
| Search institutions |
|
| Full institution details |
|
| Search journals/venues |
|
| Full source details |
|
| Group/count works |
|
| Print the filter syntax reference |
| — | Show resolved settings; |
| — | Print a shell tab-completion script |
Run openalex <command> --help for that command's flags. Global flags on every command:
--json— raw machine-readable output instead of a table (pipe intojq, script it)-o, --output FILE— write output to a file instead of stdout--api-key/--email— override.envfor a single call
openalex search-works "federated learning privacy" -f "publication_year:>2021,type:article" -s "cited_by_count:desc"
openalex get-work 10.1038/s41586-021-03819-2
openalex search-authors "Geoffrey Hinton"
openalex aggregate-works publication_year -f "institutions.id:I865918315" --json | jq '.groups[0]'
openalex config --test # confirm your API key actually works
eval "$(openalex completion bash)" # tab-completion in your current shellAuth and settings come from the same environment variables as the MCP server — see Environment Variables.
Agent Skill
A ready-made Agent Skill lives at
skills/openalex-researcher/ — it teaches any
skill-aware agent (Claude Code, Claude.ai, etc.) the tool-selection logic, filter
patterns, and output shapes for OpenAlex, and works whether the agent has the MCP
server connected (uses the openalex_* tools) or not (falls back to the openalex CLI
via Bash — see skills/openalex-researcher/references/cli-usage.md).
# Install with the skills CLI (https://github.com/vercel-labs/skills)
npx skills add JOSETRA44/openalex-mcp --skill openalex-researcher
# Or let setup_mcp.py offer it alongside MCP client configuration
python setup_mcp.py --key YOUR_API_KEY_HERE --yes --with-skillExample Queries
# Find recent papers on a topic
openalex_search_works(
query="federated learning privacy",
filters="publication_year:>2021,type:article",
sort="cited_by_count:desc"
)
# Get full paper details by DOI
openalex_get_work("10.1038/s41586-021-03819-2")
# Find an author and get their profile
openalex_search_authors(query="Geoffrey Hinton")
openalex_get_author("A2208157607")
# Find an institution, then see its recent output
openalex_search_institutions(query="UNAM", country_code="MX")
openalex_search_works(
filters="institutions.id:I865918315,publication_year:>2020",
sort="cited_by_count:desc"
)
# Annual publication trend for a topic
openalex_aggregate_works(
group_by="publication_year",
filters="type:article",
query="machine learning"
)
# Find open-access journals in a field
openalex_search_sources(
query="bioinformatics",
is_oa=True,
source_type="journal"
)Filter Quick Reference
Pattern | Example |
Year range |
|
Newer than |
|
Work type |
|
Open access only |
|
Highly cited |
|
By institution |
|
By country |
|
In a journal |
|
By language |
|
Papers citing a work |
|
Has DOI |
|
Has abstract |
|
For the full filter reference, read the openalex://filter-reference resource or see developers.openalex.org.
Rate Limits & Quotas
Auth method | Daily budget | Calls/second |
API key (free) | $1.00/day | ~10 |
Email (polite pool) | $0.10/day | ~3 |
No auth | $0.10/day | ~1 |
The server tracks rate-limit headers and automatically sleeps when the quota is low.
Action costs (free tier):
Action | Daily allowance |
Get single entity (by ID/DOI) | Unlimited |
List + filter | 10,000 calls / 1M results |
Full-text search | 1,000 calls / 100K results |
Tip: Use
openalex_get_work(unlimited) for single-record lookups rather than search.
Verify It's Working
MCP Inspector (interactive UI)
npx @modelcontextprotocol/inspector uvx openalex-mcpOpen the URL, click Connect, List Tools — you should see all 9 tools.
Quick smoke test
echo "" | OPENALEX_API_KEY=your_key uvx openalex-mcp
# Should start without errors, then exit when stdin closesRun unit tests (source install)
uv sync --group dev
uv run pytest tests/ -v
# Expected: all passed (no network required)Troubleshooting
"Configuration error: Set OPENALEX_API_KEY..."
Add OPENALEX_API_KEY to your MCP client's env block. Get a free key at openalex.org/settings/api.
"command not found: uvx"
Install uv: docs.astral.sh/uv
401 error
API key is invalid. Regenerate at openalex.org/settings/api.
404 error on a work/author/institution
The identifier may be wrong. Try looking up the entity with a search tool first, then use the returned openalex_id.
"uvx openalex-mcp" slow on first run
uv is downloading and caching the package — subsequent starts are instant (~0.2s).
Tools appear but return empty results
Broaden your query: remove publication_year filters, or try query= instead of filters=.
vs. Scopus / Web of Science
OpenAlex | Scopus | Web of Science | |
Cost | Free | Subscription | Subscription |
Coverage | 250M+ works | 90M works | 170M works |
Open data | CC0 | Proprietary | Proprietary |
API quota | 10K calls/day | 20K/week | Limited |
Non-English | Excellent | Good | Fair |
Full-text links | Yes | Partial | Partial |
Project Structure
openalex-mcp/
├── src/openalex_mcp/
│ ├── server.py # FastMCP entry point (registers tools as MCP tools)
│ ├── cli.py # `openalex` CLI entry point (calls the same tool functions)
│ ├── cli_output.py # Human-readable table/detail rendering for the CLI
│ ├── completion.py # Shell completion script generators (bash/zsh/powershell)
│ ├── config.py # Env var configuration (pydantic-settings)
│ ├── client.py # Async HTTP client + TTL cache + rate limiting
│ ├── exceptions.py # Error hierarchy
│ ├── formatters.py # Raw OpenAlex JSON → clean AI-friendly dicts
│ ├── tools/ # Core tool functions, shared by server.py and cli.py
│ └── resources/ # openalex://filter-reference static resource
├── skills/openalex-researcher/ # Agent skill (npx skills add JOSETRA44/openalex-mcp --skill openalex-researcher)
│ ├── SKILL.md
│ └── references/ # Filter syntax, workflows, output reference, CLI usage
├── tests/ # Unit tests (no network required)
├── setup_mcp.py # Automated config installer (MCP clients + optional agent skill)
├── .env.example # Environment variable template
└── pyproject.toml # Package definition (openalex-mcp + openalex entry points)CLI for agents
250M+ scholarly works with no API key required — the widest free net to cast first.
This CLI follows ARSENAL-SPEC.md, the contract every research
tool in this workspace shares: an agent that can drive one can drive all of them.
Discover it without reading this file
openalex describe --json # every command, argument, row field and example
openalex describe <command> --jsonThe manifest is derived from the parser itself, so it cannot drift out of date.
Output
-f, --format accepts table, json, jsonl, csv, md; -o FILE writes to a file; -q silences notes.
Data goes to stdout, notes and progress to stderr — piping to jq always yields
parseable JSON.
--format json returns the standard envelope:
{
"ok": true,
"command": "search-works",
"source": "openalex",
"fetched_at": "2026-08-21T14:03:11Z",
"cached": false,
"count": 10,
"meta": {},
"data": {},
"rows": []
}count always equals len(rows). An empty result is exit 0, not an error. Failures
return an error envelope carrying error.code, error.message and an actionable
error.hint, printed to stdout in machine formats so a pipeline can inspect it.
Exit codes
Code | Meaning |
0 | ok |
1 | api |
2 | usage |
3 | not_found |
4 | auth |
5 | rate_limit |
6 | network |
Cache
Results are cached on disk and survive between invocations, so a repeated query is
instant. --refresh refetches and rewrites; --no-cache skips it entirely; the
envelope reports cached.
openalex cache stats -f json
openalex cache clearRecipes
openalex search-works 'graph neural networks' -f jsonl --all --max 500
openalex search-works --filters 'publication_year:2024,type:article' -n 200 -f csv -o works.csv
openalex get-work 10.1038/s41586-021-03819-2 -f json
openalex get-work W2741809807 -f md
openalex search-authors 'Geoffrey Hinton' -n 5 -f jsonOr through the workspace-wide entry point: arsenal run openalex <command> ...,
and arsenal doctor openalex --live to check this CLI still honours the contract.
Troubleshooting
openalex: command not found after installing
uv tool install puts binaries in ~/.local/bin. Add it to your PATH, or use
uvx openalex-mcp which needs no install at all.
The MCP server starts and then just sits there That is correct. An stdio MCP server waits on stdin for its client; it is not hung. Run it through your MCP client, not directly in a terminal.
429 Too Many Requests
You are in the anonymous pool. Set OPENALEX_EMAIL to your real address to join
the polite pool. The CLI reports this as exit code 5.
Results seem stale
Responses are cached on disk between runs. Use --refresh to refetch, or
openalex cache clear to wipe it.
Documentation
Document | What's in it |
What changed in each release | |
Dev setup, the CLI contract, how to run the tests | |
What this server sends and where; how to report a vulnerability | |
Registry metadata for the official MCP registry | |
The CLI contract shared by every research server here |
Licence
MIT — see LICENSE.
Available Tools
9 toolsopenalex_aggregate_worksA
Aggregate (count/group) works by a field to get distribution statistics. Useful for: annual publication trends, breakdown by type or language, top institutions by output, open-access percentage, topic distribution. Returns a list of {key, label, count} groups sorted by count descending. Combine with 'filters' to scope the analysis (same syntax as openalex_search_works).
Inputs: group_by (required), query, filters.
openalex_get_authorA
Retrieve the full profile for a researcher: name, ORCID, h-index, i10-index, works count, total citations, last known affiliation, top research topics, and year-by-year citation counts. Accepts an OpenAlex Author ID (A-number) or ORCID.
Inputs: author_id (required).
openalex_get_institutionA
Retrieve full details for a university or research institution: name, country, type, ROR ID, total works, total citations, h-index, homepage URL, and top research topics. Accepts an OpenAlex Institution ID (I-number) or ROR ID.
Inputs: institution_id (required).
openalex_get_sourceA
Get full details for a journal, conference, or repository: ISSN, publisher, open-access status, DOAJ listing, total works, citations, h-index, i10-index, and top research topics. Accepts OpenAlex Source ID (S-number) or ISSN.
Inputs: source_id (required).
openalex_get_workA
Retrieve full metadata for a single scholarly work. Accepts an OpenAlex ID (W-number), DOI (bare '10.x/y' or full URL), PubMed ID ('pmid:12345678'), or MAG ID. Returns title, abstract, all authors with affiliations, topics, citation count, open-access URL, referenced works count, and more.
Inputs: identifier (required).
openalex_search_authorsA
Search researchers/authors in OpenAlex by name or filter by institution, ORCID, citation count, etc. Returns OpenAlex ID, name, ORCID, h-index, works count, cited-by count, and current affiliation. Use openalex_get_author for full profile.
Inputs: sort, query, filters, per_page.
openalex_search_institutionsA
Search universities, research institutes, hospitals, and other organizations in OpenAlex. Returns the OpenAlex institution ID (needed for work filters), ROR ID, name, country, type, and publication/citation counts. Use the returned 'openalex_id' in openalex_search_works filter: 'institutions.id:{id}'
Inputs: query, per_page, country_code, institution_type.
openalex_search_sourcesA
Search journals, conference proceedings, repositories, and other publication venues in OpenAlex. Returns ISSN, publisher, open-access status, h-index, works count, and citation count. Use the returned 'openalex_id' in work filters: 'primary_location.source.id:{id}'
Inputs: is_oa, query, filters, per_page, +1 more.
openalex_search_worksA
Search scholarly works (articles, books, datasets, preprints, theses) in OpenAlex. Use 'query' for full-text keyword search. Use 'filters' to narrow by year, type, institution, open access, citation count, etc. Filter syntax: 'publication_year:2020-2024,type:article,open_access.is_oa:true'. Sort options: 'cited_by_count:desc', 'publication_date:desc', 'relevance_score:desc'. Returns title, DOI, authors, year, citation count, open-access status.
Inputs: page, sort, query, filters, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a unique purpose: search vs get vs aggregate for each entity type (works, authors, institutions, sources). There is no overlap or ambiguity.
All tools follow the exact pattern 'openalex_<verb>_<entity>' with verbs like get, search, aggregate. Consistent and predictable.
9 tools is well-scoped for a scholarly database API, covering search and retrieval for the main entities plus aggregation.
Covers all core entities with search and get operations. Minor gaps like no dedicated topic/concept search, but the main workflows are well-supported.
Maintenance
Related MCP Connectors
Search 250M+ academic works, citation graphs, DOIs, and institutional research via OpenAlex.
Academic literature search, retrieval, and private library management on top of OpenAlex.
OpenAlex academic papers, authors and citations search via the official API. Runs on Apify.
Access the OpenAlex academic research catalog — 270M+ publications.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables academic research through the OpenAlex API, allowing users to search for papers, authors, and institutions, retrieve citations, and fetch full-text content when available. Perfect for building intelligent research assistants that can explore academic literature and related works.87MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching and retrieving scholarly works, authors, institutions, and citation networks from the OpenAlex catalog via natural language.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search and analyze OpenAlex scholarly database for OSINT research, including works, authors, institutions, funding, citations, and collaboration networks.MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching scholarly literature via the OpenAlex database, with tools for full-text search, work details, citation lookup, and author queries.MIT