Access the OpenAlex academic research catalog — 270M+ publications.
Access the OpenAlex academic research catalog - 270M+ publications through MCP. STDIO & Streamable HTTP.
Public Hosted Server: https://openalex.caseyjhand.com/mcp
Scholarly catalog data from OpenAlex — 270M+ works, 90M+ authors, 100K+ sources, plus institutions, topics, keywords, publishers, and funders. Search, filter, and aggregate across all eight entity types, resolve ambiguous names to canonical IDs, and walk the citation graph one hop at a time. Runs as a stdio process, a local Streamable HTTP server, or the public hosted endpoint above.
| Tool | Description |
|---|---|
openalex_search_entities | Search, filter, sort, or retrieve by ID across all 8 entity types |
openalex_analyze_trends | Group-by aggregation for trend and distribution analysis |
openalex_resolve_name | Resolve a name or an identifier (DOI, ORCID, ROR, PMID, ISSN, OpenAlex ID) to an OpenAlex ID |
openalex_get_citation_graph | Walk the citation graph one hop from a seed work: cites, cited_by, or related_to |
openalex_describe_fields | List valid filter, group_by, and select field names for an entity type |
| Prompt | Description |
|---|---|
openalex_literature_review | Guides a systematic literature search: formulate query, search, filter, analyze citation network, synthesize findings |
openalex_research_landscape | Analyzes the research landscape for a topic: volume trends, top authors/institutions, open access rates, funding sources |
openalex_search_entities toolid takes precedence: search parameters passed alongside it are dropped, and the response names which ones. A PMCID resolves nothing (OpenAlex indexes none) — use the work's PMID or DOI insteadexact and semantic search modes — semantic ranks at most 50 candidates at ~1 req/sec, and its meta.count reports that ceiling rather than a match total|), NOT (!), ranges, comparisons; a comma inside a filter value is rejected (use |, or a .search filter for free text)select returns a curated per-entity-type default unless overridden, or ["*"] for the full record; invalid field names error with the valid setpage (1-based) instead, and mixing either knob with the wrong search_mode is rejected before the upstream callsample (up to 100, single page only — neither cursor nor page applies) plus a deterministic seed for reproducible random samplingdisplay_name is nullable for untitled records; every call reports OpenAlex daily-budget cost and remaining balanceopenalex_analyze_trends toolfilters to scope the population before aggregationorder: "count" (default) returns the top-N by count with no further pages; order: "key" enumerates all distinct values key-ascending with cursor paginationinclude_unknown (default false) adds a group for entities with no value for the grouped field.search operators, and from_*/to_* range modifiers are rejected; check with openalex_describe_fields(entity_type, "group_by")openalex_resolve_name toolentity_type needed, since the identifier determines its own. A PMCID is recognized but resolves nothing — OpenAlex indexes nonefilters narrows autocomplete only; on an identifier lookup they're ignored and named in a noticeopenalex_get_citation_graph tooldirection sets the edge: cites (works citing the seed), cited_by (the seed's own reference list), related_to (OpenAlex's algorithmic related works, ~8-30 typical, may be empty)seed_id accepts an OpenAlex ID, DOI, or PMID (PMCID recognized but resolves nothing); validated against a live lookup first, so a non-existent seed fails as NotFound rather than returning an empty graphfilters/sort/select to narrow the graph; filters cannot set cites/cited_by/related_to, nor an alias of one such as cited_works — those keys are reserved for directionopenalex_describe_fields toolfilter, group_by, select) — the complete pool, never truncatedgroup_by is the filter set minus raw date fields, .search/.search.exact operators, and from_*/to_* range modifiers, which OpenAlex rejects as aggregation keysquery reorders results by name similarity without dropping any field — a nested value's parent object stays reachable further down the listopenalex_literature_review prompttopic required; scope (narrow / broad) optional, defaults to narrowscope changes the search step: narrow favors exact search with tight topic filters; broad adds semantic search across multiple related topic IDsopenalex_research_landscape prompttopic requiredawards.funder_id (resolve names via openalex_resolve_name) or awards.funder_display_name for readable labels in a single hopBuilt on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
OpenAlex-specific:
mailto identifies the caller to OpenAlex's polite poolAbortSignalAgent-friendly output:
budget.costUsd, remainingUsd, resetsInSeconds)entity_not_found, upstream_budget_exhausted, semantic_per_page_cap, reserved_filter_key, and more) each carrying an explicit recovery hintdisplay_name stays null for untitled or paratext records instead of being backfilledA public instance is available at https://openalex.caseyjhand.com/mcp — no installation required. Point any MCP client at it via Streamable HTTP:
{
"mcpServers": {
"openalex-mcp-server": {
"type": "streamable-http",
"url": "https://openalex.caseyjhand.com/mcp"
}
}
}
Add the following to your MCP client configuration file.
{
"mcpServers": {
"openalex-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/openalex-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"OPENALEX_API_KEY": "your-api-key"
}
}
}
}
Or with npx (no Bun required):
{
"mcpServers": {
"openalex-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/openalex-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"OPENALEX_API_KEY": "your-api-key"
}
}
}
}
Or with Docker:
{
"mcpServers": {
"openalex-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "OPENALEX_API_KEY=your-api-key",
"ghcr.io/cyanheads/openalex-mcp-server:latest"
]
}
}
}
For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 OPENALEX_API_KEY=... bun run start:http
# Server listens at http://localhost:3010/mcp
OPENALEX_API_KEY is optional — set it to a free OpenAlex account key for keyed rate limits and budget under OpenAlex's usage-based pricing, or omit it for anonymous access. Set OPENALEX_MAILTO to an email if you want to identify yourself to OpenAlex (the polite pool).
git clone https://github.com/cyanheads/openalex-mcp-server.git
cd openalex-mcp-server
bun install
cp .env.example .env
# edit .env and set required vars
| Variable | Description | Default |
|---|---|---|
MCP_TRANSPORT_TYPE | Transport: stdio or http. | stdio |
MCP_HTTP_PORT | Port for HTTP server. | 3010 |
MCP_SESSION_MODE | HTTP session mode: stateless, stateful, or auto (resolves to stateful). The server declares stateless in code; an explicit value overrides it. | stateless |
MCP_AUTH_MODE | Auth mode: none, jwt, or oauth. | none |
MCP_ALLOWED_ORIGINS | Comma-separated allow-list of browser Origin headers for HTTP transport. Unset = loopback-only; set to * to disable. | loopback only |
MCP_LOG_LEVEL | Log level (RFC 5424). | debug |
LOGS_DIR | Directory for log files (Node.js only). | <project-root>/logs |
STORAGE_PROVIDER_TYPE | Storage backend. | in-memory |
OPENALEX_API_KEY | OpenAlex account API key, sent upstream as api_key= (free from openalex.org/settings/api). Without it, anonymous rate limits apply. | — |
OPENALEX_MAILTO | Email sent upstream as mailto= to identify yourself to OpenAlex (the "polite pool"); a courtesy identifier, separate from the API key. | — |
OPENALEX_BASE_URL | OpenAlex API base URL. | https://api.openalex.org |
OTEL_ENABLED | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | false |
See .env.example for the full list of optional overrides.
Build and run:
# One-time build
bun run rebuild
# Run the built server
bun run start:stdio
# or
bun run start:http
Run checks and tests:
bun run devcheck # Lints, formats, type-checks
bun run test # Runs the test suite
docker build -t openalex-mcp-server .
docker run --rm -e OPENALEX_API_KEY=your-key -p 3010:3010 openalex-mcp-server
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/openalex-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
| Directory | Purpose |
|---|---|
src/index.ts | createApp() entry point — registers tools and prompts. |
src/config/ | Server-specific environment variable parsing and validation with Zod. |
src/mcp-server/tools/definitions/ | Tool definitions (*.tool.ts). |
src/mcp-server/prompts/definitions/ | Prompt definitions (*.prompt.ts). |
src/services/openalex/ | OpenAlex API client, field catalog, and domain types. |
tests/ | Unit and integration tests, mirroring the src/ structure. |
See CLAUDE.md for development guidelines and architectural rules. The short version:
try/catch in tool logicctx.log for logging, ctx.state for storageopenalex_resolve_name before filtering by entityIssues are welcome. Run checks before submitting:
bun run devcheck
bun run test
Apache-2.0 — see LICENSE for details.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y @cyanheads/openalex-mcp-serverMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-cyanheads-openalex-mcp-server": {
"command": "npx",
"args": [
"-y",
"@cyanheads/openalex-mcp-server"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referenceio.github.cyanheads/openalex-mcp-server works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.