DA

DataCite MCP Server: REST and GraphQL Access

Explore the MCP server for DataCite to access research data and publication metadata via REST API and GraphQL for faster scholarly discovery.

Quick Install
npx -y @QuentinCody/datacite-mcp-server

Overview

The DataCite MCP Server provides a lightweight API layer for accessing research data and publication metadata harvested from DataCite. It exposes the same metadata through both a RESTful interface and a GraphQL endpoint, allowing developers to choose the integration style that best fits their application: simple HTTP GET requests for search and indexing, or flexible GraphQL queries for client-driven data selection.

This server is useful when you want a consistent, self-hosted facade over DataCite metadata for faster scholarly discovery, local caching, or to add custom business logic (rate-limiting, authentication, enrichment) in front of DataCite without changing client code. It is designed to be deployed alongside other services (search UI, analytics, ingestion pipelines) and to support rapid development with introspectable GraphQL schemas and a REST compatibility layer.

Features

  • Dual API surface: REST endpoints for simple requests and a GraphQL endpoint for flexible, aggregated queries
  • Proxying and aggregation of DataCite metadata (DOIs, titles, creators, subjects, publication year, related identifiers)
  • Schema introspection and GraphiQL/Playground support for interactive queries
  • Configurable via environment variables for base URLs, ports, and credentials
  • Docker-friendly deployment for local development and production
  • Designed for low-latency retrievals; can be combined with caching or indexing layers

Installation / Configuration

Clone the repository and run using Docker (recommended) or run directly if you prefer to build inside your runtime environment.

Docker (build and run)

# Clone repository
git clone https://github.com/QuentinCody/datacite-mcp-server.git
cd datacite-mcp-server

# Build image
docker build -t datacite-mcp-server .

# Run container (example env vars)
docker run -p 4000:4000 \
  -e DATACITE_BASE_URL=https://api.datacite.org \
  -e PORT=4000 \
  -e LOG_LEVEL=info \
  datacite-mcp-server

Docker Compose (example)

version: "3.8"
services:
  mcp:
    build: .
    ports:
      - "4000:4000"
    environment:
      DATACITE_BASE_URL: "https://api.datacite.org"
      PORT: "4000"
      LOG_LEVEL: "info"

Environment variables (typical)

  • DATACITE_BASE_URL — Base URL of the upstream DataCite API (default: https://api.datacite.org)
  • PORT — Port to listen on (default: 4000)
  • LOG_LEVEL — Logging verbosity (e.g., debug, info, warn, error)
  • CACHE_TTL — Optional cache time-to-live for proxied responses (seconds)
  • AUTH_TOKEN / API_KEY — Optional token if you proxy requests that require authentication

If the project includes database-backed features (historic indexing, user data), provide DATABASE_URL and run migrations per repository docs.

Available Resources

  • GitHub repository: https://github.com/QuentinCody/datacite-mcp-server
  • GraphQL playground: typically available at /graphql (GET opens interactive explorer)
  • REST root: typically available at /api or /v1 (check server logs or configuration)

Common endpoints (example)

EndpointMethodDescription
/graphqlPOST/GETGraphQL endpoint with schema introspection and Playground
/api/searchGETREST search facade (query parameter based)
/healthGETHealth check for uptime/readiness

Note: exact paths may vary; inspect repository configuration or server logs for precise routes.

Examples / Quick Start

REST search example (curl)

curl "http://localhost:4000/api/search?q=climate+change&size=10"

GraphQL example (query to list DOIs and titles)

curl -X POST http://localhost:4000/graphql \
  -H "Content-Type: application/json" \
  -d '{"query":"query($q:String,$size:Int){ search(query:$q, size:$size){ items{ doi title publicationYear creators{name} } } }","variables":{"q":"machine learning","size":5}}'

Sample GraphQL query (formatted)

query SearchDOIs($q: String!, $size: Int = 10) {
  search(query: $q, size: $size) {
    total
    items {
      doi
      title
      publicationYear
      creators {
        name
      }
      subjects
    }
  }
}

Use Cases

  • Search UIs: Use the GraphQL endpoint to power a frontend that only requests fields needed per view (reduces bandwidth and simplifies client code). Or use the REST endpoint for quick index refreshes.
  • Discovery & aggregation: Combine DataCite metadata with internal datasets (institutional records, author profiles) by routing requests through this server and augmenting results.
  • Batch harvesting: Use REST endpoints for bulk synchronization to a local search index (e.g., Elasticsearch) while leveraging server-side caching.
  • Analytics dashboards: Query publication counts, subjects, or year distributions via GraphQL aggregation fields or REST facets exposed by the server.
  • Rate limiting / access control: Insert authentication, per-user quotas, or logging centrally without modifying existing clients that consume DataCite.

Notes and Next Steps

  • Inspect the GraphQL schema with the Playground to learn available types and fields.
  • For production, enable an external cache (Redis) and configure TLS and authentication as needed.
  • Check the repository for any migration, seed, or admin scripts if the server includes persistence layers.

For full source, issues and contribution details, visit the GitHub repository: https://github.com/QuentinCody/datacite-mcp-server