@cyanheads/openalex-mcp-server
Click on "Install 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., "@@cyanheads/openalex-mcp-serverSearch for papers about climate change from 2020 to 2023"
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.
Public Hosted Server: https://openalex.caseyjhand.com/mcp
Tools
Five tools for querying the OpenAlex academic research catalog:
Tool Name | Description |
| Search, filter, sort, or retrieve by ID across all 8 entity types. |
| Group-by aggregation for trend and distribution analysis. |
| Resolve a name or an identifier (DOI, ORCID, ROR, PMID, PMCID, ISSN, OpenAlex ID) to an OpenAlex ID. |
| Walk the citation graph one hop from a seed work: cites, cited_by, or related_to. |
| List valid filter, group_by, and select field names for an entity type — call before building a query to avoid invalid-field errors. |
openalex_search_entities
Primary discovery and lookup tool. Covers all OpenAlex entity types (works, authors, sources, institutions, topics, keywords, publishers, funders).
Retrieve a single entity by ID (OpenAlex ID, DOI, ORCID, ROR, PMID, PMCID, ISSN).
idtakes precedence: search criteria passed alongside it are not applied, and the response says which ones were dropped rather than echoing them back as though they ran. The search-only validations (semantic page cap,samplewithcursor,seedwithoutsample) are skipped too — a lookup is never rejected over parameters it ignoresKeyword search with boolean operators, quoted phrases, wildcards, and fuzzy matching
Exact and AI semantic search modes
Rich filter syntax: AND across fields, OR within fields (
us|gb), NOT (!us), ranges (2020-2024), comparisons (>100)Sensible default field selection per entity type, applied to both searches and ID lookups — prevents oversized responses; pass
selectto choose fields, or["*"]for the full recordInvalid
selectfield names produce an error listing the valid fields for that entity typeFormatted MCP output is a generic markdown renderer — every returned field is surfaced without per-entity-type hard-coding
Cursor pagination and up to 100 results per page;
sorttakes a single key or a comma-separated list, with the-descending prefix applied per keydisplay_nameis nullable — OpenAlex holds no title for paratext and other untitled records, which pass through instead of failing the whole page
openalex_analyze_trends
Aggregate entities into groups and count them for trend, distribution, and comparative analysis.
Group by any supported field (publication year, OA status, institution, country, topic, etc.)
Combine with filters to scope the population before aggregation
Up to 200 groups per page with cursor pagination
Supports
include_unknownto show entities with no value for the grouped field
openalex_resolve_name
The front door for turning anything you have into an OpenAlex ID. Always use this before filtering by entity — names are ambiguous, IDs are not.
A name or partial name runs an autocomplete search: up to 10 matches with disambiguation hints, ~200ms
An identifier resolves deterministically to the single record it addresses — OpenAlex ID, DOI, ORCID, ROR, PMID, PMCID, or ISSN, bare or in URL form. No
entity_typeneeded: the identifier determines its ownAn identifier that matches nothing returns an empty result naming the scheme, not name-search advice
Optional entity type filter and field-level filters, applied to name queries
openalex_get_citation_graph
One-hop citation graph traversal from a seed work. Wraps the OpenAlex cites/cited_by/related_to filters behind an explicit direction argument so callers do not have to know the filter names.
cites: works that cite the seed (incoming citations)cited_by: works the seed cites (its reference list)related_to: OpenAlex algorithmic "related works" (~8-30 typical, may be empty for less-cited seeds)Accepts OpenAlex IDs, DOIs, PMIDs, PMCIDs as
seed_id; validates the seed via a singleton/works/{id}lookup before walking, so non-existent seeds surface asNotFoundStacks with
filters/sort/selectto narrow the graph (e.g.,publication_year=">2020",is_oa="true")
openalex_describe_fields
Discover valid field names before constructing a query — avoids invalid-field 400 errors. Backed by a catalog generated from OpenAlex's own field validation.
List valid fields for any entity type and context (
filter,group_by, orselect)group_byreturns the subset of thefilterset OpenAlex can aggregate — raw date fields,*.searchoperators, andfrom_*/to_*range modifiers are excludedPass
query(a partial or guessed name) to rank results by name similarity — surfaces the right field when you only know roughly what you wantComplements the ranked "did you mean" suggestions now appended to invalid-field errors on the search, trends, and citation-graph tools
Related MCP server: mcp-openalex
Prompts
Prompt | Description |
| Guides a systematic literature search: formulate query, search, filter, analyze citation network, synthesize findings. |
| Analyzes the research landscape for a topic: volume trends, top authors/institutions, open access rates, funding sources. |
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool definitions — single file per tool, framework handles registration and validation
Unified error handling across all tools
Pluggable auth (
none,jwt,oauth)Swappable storage backends via the framework (not currently used by this server)
Structured logging with optional OpenTelemetry tracing
Runs locally (stdio/HTTP) or in Docker from the same codebase
OpenAlex-specific:
Typed API client with automatic ID normalization (DOI, ORCID, ROR, PMID, PMCID, ISSN, OpenAlex URLs)
Abstract reconstruction from inverted indices — plaintext instead of OpenAlex's position-keyed encoding
HTTP status codes mapped to specific MCP error classes (400 → InvalidParams, 422 → ValidationError, 429 → RateLimited, etc.) with upstream messages surfaced
Every API-calling tool reports what the call spent against the OpenAlex daily budget and what is left of it, so a paginated sweep can be priced before it runs instead of ending in a 429. An account holding prepaid balance sees that too, since it keeps serving once the day's allowance is gone
Timeout-aware request retries and cancellation support via
AbortSignal
Getting Started
Public Hosted Instance
A 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"
}
}
}Self-Hosted / Local
Add to your MCP client config (e.g., claude_desktop_config.json):
{
"mcpServers": {
"openalex-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/openalex-mcp-server"],
"env": {
"OPENALEX_API_KEY": "your-openalex-api-key"
}
}
}
}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).
Prerequisites
Bun v1.3.0 or higher (for development)
Installation
Clone the repository:
git clone https://github.com/cyanheads/openalex-mcp-server.gitNavigate into the directory:
cd openalex-mcp-serverInstall dependencies:
bun installConfiguration
Variable | Description | Default |
| Optional. OpenAlex account API key, sent upstream as | — |
| Optional. Email sent upstream as | — |
| OpenAlex API base URL. |
|
| Transport: |
|
| Port for HTTP server. |
|
| Auth mode: |
|
| Comma-separated allow-list of browser | loopback only |
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Enable OpenTelemetry instrumentation (spans, metrics, completion logs). |
|
Running the Server
Local Development
Build and run the production version:
bun run build bun run start:http # or start:stdioRun checks and tests:
bun run devcheck # Lints, formats, type-checks bun run test # Runs test suite
Docker
docker build -t openalex-mcp-server .
docker run -e OPENALEX_API_KEY=your-key -p 3010:3010 openalex-mcp-serverProject Structure
Directory | Purpose |
| Tool definitions ( |
| Prompt definitions ( |
| OpenAlex API client service and domain types. |
| Environment variable parsing and validation with Zod. |
| Unit and integration tests, mirroring the |
Development Guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor logging,ctx.statefor storageAlways resolve names to IDs via
openalex_resolve_namebefore using them in filters
Contributing
Issues and pull requests are welcome. Run checks before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityFmaintenanceProvides access to OpenAlex's catalog of 240M+ scholarly works, enabling search and retrieval of research papers, authors, institutions, journals, concepts, and funders with advanced filtering and classification capabilities.Last updated11635MIT
- AlicenseAqualityDmaintenanceMCP server for the OpenAlex scholarly database, providing AI agents with tools to search and retrieve academic works, authors, and institutions via natural language queries.Last updated8MIT
- Flicense-qualityCmaintenanceMCP server for academic research using the OpenAlex API, enabling article search, details retrieval, and author profile lookup.Last updated
- Flicense-qualityCmaintenanceA unified MCP server providing programmatic access to three major academic research APIs: Semantic Scholar, OpenAlex, and PubMed.Last updated2
Related MCP Connectors
Query SEC EDGAR filings, XBRL financials, and company data through MCP. STDIO & Streamable HTTP.
MCP server for Altmetric APIs - track research attention across news, policy, social media, and more
IEEE Xplore MCP — BYOK wrapper over the IEEE Xplore Metadata Search API
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/openalex-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server