DEV Community

Agentica
Agentica

Posted on

OpenAlex MCP in 5 minutes: give Claude or Cursor a scholarly search tool

OpenAlex is a free, open index of scholarly works, authors, institutions and citations. Its data is released under CC0, so it's public domain and reusable without asking. In this post we'll connect it to an AI assistant over MCP (Model Context Protocol) so the assistant can search papers, follow citations and look up authors.

You'll need:

  • an MCP client: Cursor, Claude Desktop, or anything that speaks Streamable HTTP;
  • an Apify API token. The server is hosted on Apify (more on that at the end), and each call is billed to that token.

1. The endpoint and how auth works

https://agentic-solutions--openalex-mcp.apify.actor/mcp
Enter fullscreen mode Exit fullscreen mode

It speaks Streamable HTTP. Every request must carry your Apify token. Apify's Standby docs recommend the header form: "Include the token in the Authorization header of your request as Bearer" (https://docs.apify.com/platform/actors/running/standby).

Quick sanity check without a token. This is free, because nothing runs:

curl -s -X POST https://agentic-solutions--openalex-mcp.apify.actor/mcp
Enter fullscreen mode Exit fullscreen mode

You should get HTTP 401 with "type": "api-token-missing". That tells you the URL is right and auth is the only missing piece.

2. Cursor

Cursor's docs show remote servers configured with url and headers, plus ${env:…} interpolation (https://cursor.com/docs/context/mcp). Put this in ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
  "mcpServers": {
    "openalex": {
      "url": "https://agentic-solutions--openalex-mcp.apify.actor/mcp",
      "headers": { "Authorization": "Bearer ${env:APIFY_TOKEN}" }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Set APIFY_TOKEN in your shell profile and restart Cursor. If it fails, check Output → MCP Logs.

3. Claude Desktop

There are two routes.

a) mcp-remote (works with a static Bearer header). Edit claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "openalex": {
      "command": "npx",
      "args": ["-y", "mcp-remote",
               "https://agentic-solutions--openalex-mcp.apify.actor/mcp",
               "--header", "Authorization:${AUTH_HEADER}"],
      "env": { "AUTH_HEADER": "Bearer YOUR_APIFY_TOKEN" }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

The odd Authorization:${AUTH_HEADER} with no space is deliberate. mcp-remote's README warns that "Cursor, Codex-Cli and Claude Desktop (Windows) have a bug where spaces inside args aren't escaped", so the header value goes in an env var. You need Node 18+. Restart Claude Desktop afterwards.

b) Custom Connectors (Settings → Connectors → Add custom connector). This flow takes a URL and then follows "the authentication prompts provided by the server" (https://modelcontextprotocol.io/docs/develop/connect-remote-servers). This server uses a static Apify token, not OAuth. ⚠️ Unverified: I haven't confirmed that the connector dialog accepts a custom Bearer header, so use route (a) unless you've tested (b).

4. The tools you get

Tool What it does
search_works Full-text search with year_from/year_to, open_access, type, topic, sort (relevance, cited, newest, oldest), per_page ≤ 50, page, include_abstract
get_work One work by OpenAlex ID (W…) or DOI, with abstract
get_citations Works that cite a work
get_references Works a work references
search_authors / get_author Authors by name, or by OpenAlex ID / ORCID: works and citation counts, h-index, institutions, top topics
search_institutions Universities, companies, hospitals, optionally filtered by country (ISO-2)

Abstracts are rebuilt from OpenAlex's inverted index and trimmed to about 1,200 characters, so results fit in context.

5. Try it

Prompts that map well to the tools:

  • "Find the 5 most-cited open-access reviews on CRISPR delivery since 2022."
  • "Get W2741809807, then list papers that cite it."
  • "Who are the most-cited authors at institution X on topic Y?"

Your client will normally ask you to approve each tool call. Cursor does this by default.

6. Optional: your own OpenAlex key

Without a key, the server uses OpenAlex's keyless budget, which is capped at 10 requests/second and shared, so you may see 429s under load. OpenAlex gives every account a free API key. Send it per request in the x-openalex-api-key header (add it to headers in Cursor, or as a second --header for mcp-remote).

7. Cost, data and credit

  • Cost: the hosted server charges $0.015 per successful tool call. Failed calls, handshakes and tool listings aren't charged. Apify also bills its normal platform usage for Standby runs (https://docs.apify.com/platform/actors/running/standby: "you pay the platform usage costs of the Standby runs in addition to the event charges").
  • Data: OpenAlex data is CC0. Please cite OpenAlex: Priem, J., Piwowar, H., & Orr, R. (2022). OpenAlex: A fully-open index of scholarly works, authors, venues, institutions, and concepts. arXiv:2205.01833.
  • Self-hosting: if you'd rather not pay per call, the OpenAlex REST API is free to call directly (https://api.openalex.org), and writing a small MCP wrapper is a weekend project.

Disclosure: I built and maintain the hosted server used here (Apify Store: https://apify.com/agentic_solutions/openalex-mcp). It is independent and **not affiliated with, endorsed by or sponsored by OpenAlex or OurResearch.

Top comments (0)