Access the OpenAlex academic research catalog — 270M+ publications.
One address for any MCP client. No sign-in needed on this server.
5 read
Grouped by tool name. At most: only reads or looks up information.
Odel charges nothing per call. The publisher may charge for its own service.
Access the OpenAlex academic research catalog — 270M+ publications — via MCP. STDIO or 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.
| 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 toolhttps://openalex.org/works/W2741809807), or a keyword by its slug or keyword URL. Under entity_type: "funders", a funder's Crossref Funder Registry DOI (10.13039/…) resolves through a one-result list request. OpenAlex does not bill a lookup by ID, with three exceptions it bills like one list call: a keyword looked up by its slug or URL, an id carrying characters past the identifier itself (W2741809807#x still returns W2741809807), and that funder-DOI request. id takes precedence: search parameters passed alongside it are dropped, and the response names which ones. An OpenAlex ID whose letter names another entity type than entity_type fails as id_type_mismatch before any upstream call, and an id holding a . or .. path segment, plain or percent-encoded, fails as id_dot_segment; a ?, #, \, tab, or line break inside an identifier (SICI DOIs end in #) is sent percent-encoded as part of it. A PMCID resolves nothing (OpenAlex indexes none) — use the work's PMID or DOI insteadexact and semantic search modes — semantic ranks a query-dependent candidate set at ~1 req/sec (up to 50 per page), and its meta.count reports the candidate count rather than a match totalfilters accepts a record object or an unambiguous native string ("issn:0920-8542"), including through the filter alias. Conversion is disclosed in notice; commas outside paired double quotes separate clauses, and the first colon separates a key from its value, preserving DOI/URL colons and quoted comma phrases. Exact duplicate keys, bare fragments, and unmatched quotes are rejected with record-form recovery guidance. A record holds one value per key; distinct aliases of the same upstream field still AND together. Set OPENALEX_FILTER_STRING_INPUT=false to require record objects. Native strings apply only to this tool's filters, with the record form remaining the advertised schemaunmatched_quote_in_filter_value); citation filters are checked before the seed lookup. Balanced search phrases such as "graph neural" networks remain valid, including .search.exact. A value sent double-quoted still cannot contain its own interior double quote (quote_in_filter_value)|), AND within a field (+), NOT (!), ranges, comparisons. One value cannot hold | beside an AND operator — a +, or a space between values on an ID, code, or language key (a space inside a language name is part of the name, and on a country field a space is always part of a country name, never AND: DE US|FR fails as invalid_country_code): OpenAlex splits a value on | first and drops every alternative that ANDs more than one value, so DE|FR+US and authorships.author.id: A1 A2|A3 both fail as mixed_and_or_in_filter_value before any request — put the AND in a second key instead (institutions.country_code: US beside authorships.institutions.country_code: DE|FR on works). A comma inside a free-text search filter (any .search key — title.search, abstract.search.exact, title_abstract_keywords.search) or a field OpenAlex matches as whole text (listed below) is sent double-quoted as part of the phrase, while a comma in any other filter value fails as comma_in_filter_value (use | for OR); inside a .search value, a DOI, a date (a timestamp's +00:00 offset), a URL (landing_page_url; not the boolean has_pdf_url), an exactly matched name (display_name, awards.funder_display_name — C++, Erasmus+), a biblio field (issue 1+2), or awards.funder_award_id, a + is a literal character; a value with spaces on a field OpenAlex matches as whole text (display_name, awards.funder_display_name, awards.funder_award_id, geo.city, geo.region, raw_affiliation_strings, block_key, a biblio field) is sent double-quoted, so it matches as one phrase (awards.funder_display_name: National Science Foundation) — ! and | work with it (geo.city: New York|Boston), but + cannot AND it with another value in the same field. A comma is part of such a value too (raw_affiliation_strings: Associazione Meteonetwork OdV, Milano, Italy): a value holding one goes out quoted with its + as a literal character. A double quote inside the outer pair of any value sent quoted this way, or of a value you wrap in double quotes on any filter but a free-text search, fails as quote_in_filter_valuefilters: on a country field (a key ending in country_code, country_codes, or countries), an ISO 3166-1 alpha-3 code, numeric code, or English name — ISO's, or the one OpenAlex's own country facets display (Russia, Ivory Coast, Trinidad & Tobago) — becomes its alpha-2 code (DEU, 276, Germany → DE) and UK becomes GB, while a value that cannot be a country code (Germanyy, 999, unknown, or two codes joined by a space, DE US) fails as invalid_country_code without the filter being sent; on language, an ISO 639-2 code becomes its ISO 639-1 code and an English name becomes its code (eng, English → en; Cebuano → ceb). Each |/+ segment is trimmed and converted on its own, so a multi-word name is one value (South Korea|Japan → KR|JP, Scottish Gaelic|English → gd|en), and anything else — null, XK, ceb, zh-cn, the countries/DEU path form — is sent as givenselect returns a curated per-entity-type default unless overridden, or ["*"] for the full record; invalid field names error with the valid set. On works, author_list returns each author in authorship order as {id, display_name, orcid} — about a tenth the size of authorships, which adds institutions and affiliations — and is never part of the default or ["*"]page (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 sampling; keyword and exact modes only, and never alongside sort — OpenAlex does not sample a semantic search and refuses a sorted sample, so both combinations are rejected before the upstream callstructuredContent, and content[] with its trailer) unless the least it can return is larger, which it flags as over_budget: a page that would run over keeps its leading records whole and names the rest in omitted with the one call that returns them (as a set, in OpenAlex's order), without disturbing next_cursor; a record too large on its own comes back with its largest arrays windowed, filled in turn so each shows what fits and labeled with how much of the array it holds, and slice: {field, offset} on an id lookup pages any array to the endauthorships or author_list entries is flagged as possibly capped, with an id + slice call to retrieve more stored authors. Singleton lookups and snapshots retain at most 5,000 authorships per work; at that ceiling both author fields remain possibly capped on every slice. total counts stored entries rather than a complete byline, and next becomes null when those entries are exhausted. Another OpenAlex fetch or snapshot cannot recover authors beyond the storage ceilingper_page values above 100 for search/citation or 200 for analysis clamp to the maximum, with requested/applied sizes in notice, a log, and a counter. Set OPENALEX_CLAMP_PER_PAGE=false to restore rejecting advertised maxima. Zero, negatives, fractions, semantic search above 50, and oversized samples still reject. An id ignores page size and sample overrides itdisplay_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 distinct values key-ascending with cursor pagination. Boolean fields keep count order even with "key" and do not support cursor pagination. A supplied cursor selects key order even when order is omitted or "count". OpenAlex can wrap a key-ordered walk to earlier groups: stop when a page's first key repeats an earlier key, or when a page is short or empty, even if next_cursor is still presentinclude_unknown (default false) adds a group for entities with no value for the grouped field, flagged is_unknown: true and labeled as unknown in the text output. The native :include_unknown suffix on group_by also enables it, even with an explicit false; passing both adds the suffix once. OpenAlex keys it -111/-111.0 (numeric fields), unknown (text fields and order: "key"), or an ID ending in /unknown; the key is a sentinel, not a filter value. Boolean fields have no such group — a missing value counts as falsekey_display_name remains present but can be null when OpenAlex supplies no label; text output renders the group key in that case, including unknown buckets.search operators, from_*/to_* range modifiers, decimal scores such as fwci, display_name, external-ID fields such as doi, and fields OpenAlex looks up from a related entity such as primary_location.source.country_code are rejected; openalex_describe_fields(entity_type, "group_by") lists the fields that groupauthorships.countries says in its notice that OpenAlex counts only each work's first 100 authorships for that field, and names authorships.institutions.country_code as the field that counts all of themopenalex_resolve_name toolentity_type (or any other type) all three are looked up in parallel as unbilled singleton fetches and every record found is returned, institution first; entity_type institutions, funders, or publishers narrows it to that one. A Crossref Funder Registry DOI (10.13039/…) resolves to the funder unless entity_type is works. A PMCID is recognized but resolves nothing — OpenAlex indexes nonep53 reads as publisher P53), so a bare OpenAlex ID that resolves nothing is searched as a name next, under entity_type when given, and the notice names both outcomes; a real ID still resolves with its one request. Under entity_type: "keywords" the shape is searched as a keyword name from the startfilters narrows autocomplete only and requires entity_type — a name query passing filters without it is rejected before any request (filters_without_entity_type). On an identifier lookup they're ignored and named in a notice; a name search that matches nothing under filters echoes them and suggests loosening them firstentity_type set, OpenAlex autocomplete fails on a name over 1,000 characters; that failure is reported once as query_too_long with advice to shorten the name, not retried as an outageopenalex_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 work ID (bare, or its OpenAlex record-page or API URL), 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 graph, and the ID of another entity type fails as id_type_mismatch before any upstream callfilters/sort/select (author_list included) 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_search_entities; works cut from a page are named in omitted with the openalex_search_entities call that returns them, in OpenAlex's orderopenalex_describe_fields toolfilter, group_by, select) — the complete pool, never truncatedgroup_by is the filter set minus what OpenAlex rejects as an aggregation key: raw date fields, .search/.search.exact operators, from_*/to_* range modifiers, and a per-entity-type set found by grouping every listed field against the live API — decimal scores such as fwci, several source year fields, display_name, and external-ID fields among themcreated_date, updated_date, and their from_/to_ forms are listed filters that OpenAlex serves only on a paid plan; without one, a filter on them fails on its first request as upstream_plan_required, with no retryquery 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 requiredfunders.id, which counts every work that lists a funder and labels each group with the funder's name; awards.* fields stay the route for grant-level questions such as award numbersBuilt 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:
http, https, or no scheme, PubMed/PubMed Central URLs); a PMCID normalizes but resolves nothing since OpenAlex indexes nonemailto 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 backfilled<?CDATA …?> math markers are unwrapped with their TeX kept, MathType equation blobs (% MathType!MTEF!…!44A1!) are removed while the TeX that restates them stays, and a double-escaped line break (a literal \n) becomes a space; literal text such as A < B, 95% CI, and TeX such as \nu is kept. Identifier and URL fields (id, doi, ids, orcid, ror, issn, *_url, lineages) are returned exactly as OpenAlex stores them, so each one resolves when passed back. The text output escapes that text for Markdown, so a stray *, <tag>, or [x](https://github.com/cyanheads/openalex-mcp-server/blob/main/y) renders as written; IDs, and URLs that render as links, stay byte-identicalConnect to the hosted instance, no install:
claude mcp add --transport http openalex-mcp-server https://openalex.caseyjhand.com/mcp
Or run it locally:
claude mcp add openalex-mcp-server -- npx -y @cyanheads/openalex-mcp-server
For other clients, add this to the MCP config file:
{
"mcpServers": {
"openalex-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/openalex-mcp-server"]
}
}
}
An optional OPENALEX_API_KEY — a free OpenAlex account key — raises the rate limits and daily budget over anonymous access; OPENALEX_MAILTO identifies you to OpenAlex's polite pool. For Docker or a source build, see Running the server.
| 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 |
OPENALEX_FILTER_STRING_INPUT | Accept unambiguous native filter strings on openalex_search_entities. Set false to require record objects; invalid boolean values fail startup. | true |
OPENALEX_CLAMP_PER_PAGE | Clamp oversized positive integer per_page with a requested/applied notice (100 search/citation, 200 analysis). Set false to restore rejecting advertised maxima; invalid boolean values fail startup. Semantic and sample caps still reject. | true |
OTEL_ENABLED | Enable OpenTelemetry instrumentation (spans, metrics, completion logs). | false |
See .env.example for the full list of optional overrides.
Requires Bun v1.4.0 or higher (or Node.js v24+).
Clone and install:
git clone https://github.com/cyanheads/openalex-mcp-server.git
cd openalex-mcp-server && bun install
cp .env.example .env # optionally set OPENALEX_API_KEY
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 run --rm -e OPENALEX_API_KEY=your-key -p 3010:3010 ghcr.io/cyanheads/openalex-mcp-server:latest
The image defaults to HTTP transport, stateless session mode, and logs to /var/log/openalex-mcp-server. To run it over stdio from an MCP client, use "command": "docker" with "args": ["run", "-i", "--rm", "-e", "MCP_TRANSPORT_TYPE=stdio", "ghcr.io/cyanheads/openalex-mcp-server:latest"]. To build locally, docker build -t 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.