npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

altmetric-mcp

v0.2.0

Published

MCP server for Altmetric APIs - track research attention across news, policy, social media, and more

Readme

Altmetric MCP Server

Model Context Protocol (MCP) server that enables AI agents to access Altmetric APIs for tracking the attention and reach of research outputs across news outlets, policy documents, social media, and other online platforms.

Altmetric monitors where research is being discussed beyond traditional academic citations - from mainstream media coverage to policy citations, patent references, and social media engagement - providing a comprehensive view of real-world research impact.

Installation

Prerequisites

Note: At least one API configuration (Details Page or Explorer) is required.

Getting Started

Configure your MCP client (check its own docs) to run the Altmetric MCP server using npx:

{
  "command": "npx",
  "args": ["-y", "altmetric-mcp"],
  "env": {
    "ALTMETRIC_DETAILS_API_KEY": "your_details_api_key_here",
    "ALTMETRIC_EXPLORER_API_KEY": "your_explorer_api_key_here",
    "ALTMETRIC_EXPLORER_API_SECRET": "your_explorer_api_secret_here"
  }
}

Tips:

  • Include only the API credentials you have access to

Below are specific instructions for popular AI tools and editors.

Add to your project .vscode/mcp.json:

{
  "servers": {
    "altmetric-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "altmetric-mcp"],
      "env": {
        "ALTMETRIC_DETAILS_API_KEY": "your_details_api_key_here",
        "ALTMETRIC_EXPLORER_API_KEY": "your_explorer_api_key_here",
        "ALTMETRIC_EXPLORER_API_SECRET": "your_explorer_api_secret_here"
      }
    }
  }
}

Reload VS Code to apply the changes. More information.

Write /mcp add:

name: altmetric-mcp Server type: local Command: npx -y altmetric-mcp Environment Variables:

{
  "ALTMETRIC_DETAILS_API_KEY": "your_details_api_key_here",
  "ALTMETRIC_EXPLORER_API_KEY": "your_explorer_api_key_here",
  "ALTMETRIC_EXPLORER_API_SECRET": "your_explorer_api_secret_here"
}

Install directly from the command line:

claude mcp add --transport stdio altmetric-mcp --env ALTMETRIC_DETAILS_API_KEY=your_details_api_key_here --env ALTMETRIC_EXPLORER_API_KEY=your_explorer_api_key_here --env ALTMETRIC_EXPLORER_API_SECRET=your_explorer_api_secret_here -- npx -y altmetric-mcp

Open your Claude Desktop configuration file:

  • macOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json

Add the Altmetric MCP server configuration:

{
  "mcpServers": {
    "altmetric-mcp": {
      "command": "npx",
      "args": ["-y", "altmetric-mcp"],
      "env": {
        "ALTMETRIC_DETAILS_API_KEY": "your_details_api_key_here",
        "ALTMETRIC_EXPLORER_API_KEY": "your_explorer_api_key_here",
        "ALTMETRIC_EXPLORER_API_SECRET": "your_explorer_api_secret_here"
      }
    }
  }
}

Restart Claude Desktop after saving the configuration.

Add to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "altmetric": {
      "command": "npx",
      "args": ["-y", "altmetric-mcp"],
      "env": {
        "ALTMETRIC_DETAILS_API_KEY": "your_details_api_key_here",
        "ALTMETRIC_EXPLORER_API_KEY": "your_explorer_api_key_here",
        "ALTMETRIC_EXPLORER_API_SECRET": "your_explorer_api_secret_here"
      }
    }
  }
}

API Tiers

Details Page API

  • Free Tier: Access to get_citation_counts and search_citations
  • Commercial Tier: Access to all Details Page tools including get_citation_details

If you attempt to use get_citation_details with a free API key, you'll receive a 403 error.

Explorer API

  • Institutional Access Only: All Explorer API tools require institutional credentials
  • Provides access to research outputs and attention data across the entire Altmetric database
  • Organizations with data integrations can also access their own institutional research outputs in isolation
  • Includes advanced filtering by author, department, journal, and custom organizational metadata

Features

This MCP server provides nine tools for accessing Altmetric data across two APIs:

Details Page API Tools

1. get_citation_counts (Free Tier)

Retrieve attention metrics and mention counts across various platforms for research outputs using DOI, PubMed ID, arXiv ID, or other identifiers.

Parameters:

  • identifier (required): The research output identifier (e.g., "10.1038/nature12373")
  • identifier_type (optional): Type of identifier - "doi", "pmid", "arxiv", "id", "ads", "urn", "uri", or "isbn" (default: "doi")

Example:

{
  "identifier": "10.1038/nature12373",
  "identifier_type": "doi"
}

2. get_citation_details (Commercial Tier)

Retrieve detailed mention information including full text of posts, author details, and complete metadata for how research is being discussed online.

Parameters:

  • identifier (required): The research output identifier
  • identifier_type (optional): "doi" or "id" (default: "doi")
  • citation_type (optional): Filter by type - "twitter", "news", "blog", "policy", "patent", etc.
  • page (optional): Page number for pagination (default: 1)

Example:

{
  "identifier": "10.1038/nature12373",
  "identifier_type": "doi",
  "citation_type": "news"
}

3. search_citations (Free Tier)

Search aggregated attention data across all tracked research outputs for a specific timeframe.

Parameters:

  • timeframe (required): "1d", "2d", "3d", "4d", "5d", "6d", "1w", "1m", "3m", "6m", "1y", or "at" (all-time)
  • citation_type (optional): Filter by citation source type
  • nlmid (optional): Filter by journal NLM ID
  • issns (optional): Filter by journal ISSN(s), comma-separated
  • subject (optional): Filter by Scopus subject area
  • num_results (optional): Number of results to return
  • page (optional): Page number for pagination

Example:

{
  "timeframe": "1w",
  "citation_type": "news",
  "num_results": 50
}

Explorer API Tools (Institutional)

4. explore_research_outputs

Search and filter research outputs within your institutional Altmetric Explorer instance. Supports filtering by author, department, journal, publication date, research type, and more.

Key Parameters:

  • q: Search query for title, author, or journal
  • scope: "all" or "institution"
  • type: Filter by research output type (e.g., ["article", "dataset"])
  • timeframe: Filter by attention timeframe
  • page_number, page_size: Pagination controls

5. explore_attention_summary

Get aggregated attention metrics for research outputs matching your query, broken down by source (news, Twitter, policy documents, etc.) and date.

Key Parameters:

  • q: Search query
  • timeframe: Attention timeframe
  • type: Filter by research output type

6. explore_mentions

Retrieve individual mentions of research outputs with detailed information about each mention including author, URL, timestamp, and platform.

Key Parameters:

  • q: Search query
  • mentioned_after/mentioned_before: Date range filters
  • countries: Filter by country codes
  • page_number, page_size: Pagination controls

7. explore_demographics

Get demographic information about the audiences engaging with research outputs. Analyze geographic distribution, demographic patterns, and audience characteristics.

Key Parameters:

  • q: Search query
  • scope: "all" or "institution"
  • timeframe: Attention timeframe
  • type, journal_id, author_id: Filter by research attributes

8. explore_mention_sources

Get information about the sources of mentions for research outputs. Analyze which platforms, channels, and outlets are mentioning research with source credibility and reach data.

Key Parameters:

  • q: Search query
  • mentioned_after/mentioned_before: Date range filters
  • source_type: Filter by source type (news, twitter, policy, etc.)
  • countries: Filter by country codes
  • page_number, page_size: Pagination controls

9. explore_journals

Get journal-related data and metrics. Search and filter by publication venue, analyze journal impact, and retrieve journal rankings.

Key Parameters:

  • q: Search query for journal name or ISSN
  • journal_id, issn: Filter by journal identifiers
  • subject: Filter by subject area
  • publisher: Filter by publisher name
  • page_number, page_size: Pagination controls

API Documentation

  • Details Page API: https://details-page-api-docs.altmetric.com/
  • Explorer API: https://explorer-api-docs.altmetric.com/

License

MIT