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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@missionsquad/mcp-nyt

v0.1.0

Published

MCP server interface for the New York Times API

Readme

@missionsquad/mcp-nyt

MCP server interface for the New York Times API (https://api.nytimes.com).

This server exposes NYT API operations for article search, top stories, real-time news, most popular articles, archives, and book best sellers via FastMCP tools.

Features

  • FastMCP stdio server (mcp-nyt)
  • NYT API key support via hidden tool arg (apiKey) or env fallback (NYT_API_KEY)
  • NYT base URL configurable via env (NYT_BASE_URL)
  • Strict TypeScript and Zod-validated tool inputs
  • Clean, formatted API responses
  • Build/test CI and npm publish workflow

Verified API Coverage

  • Article Search (search/v2/articlesearch.json)
  • Top Stories (topstories/v2/{section}.json)
  • Times Wire (news/v3/content/all/all.json)
  • Most Popular (mostpopular/v2/{type}/{period}.json)
  • Archive (archive/v1/{year}/{month}.json)
  • Books (books/v3/lists/current/{list}.json)

Requirements

Installation

yarn install
yarn build
yarn start

Run as CLI after install/publish:

mcp-nyt

Configuration

Copy .env.example to .env.

| Variable | Required | Default | Description | |---|---|---|---| | NYT_API_KEY | No | unset | NYT API key fallback when hidden apiKey is not passed | | NYT_BASE_URL | No | https://api.nytimes.com/svc | Base URL for NYT API endpoints | | NYT_HTTP_TIMEOUT_MS | No | 30000 | Request timeout in milliseconds |

Hidden Arguments

The following are intentionally not in tool schemas and should be passed as hidden extra args:

  • apiKey: NYT API key for request authentication

Resolution order per request:

  1. Hidden extra arg
  2. Environment fallback (NYT_API_KEY)

If no API key is available, the tool returns a user-facing error.

Tool Surface

Article Search

  • nyt_article_search — Search NYT articles by keyword with optional date filtering and sorting.

Top Stories

  • nyt_top_stories — Get the current top stories from the New York Times by section.

Times Wire

  • nyt_times_wire — Get real-time news feed from the NYT Times Wire service.

Most Popular

  • nyt_most_popular — Get the most popular NYT articles by views, shares, or emails over a time period.

Archive

  • nyt_archive — Get all NYT article metadata for a given month and year.

Books

  • nyt_books — Get the current NYT Best Sellers list by list name.

Response Format

All tool handlers return deterministic JSON text strings. Parse text content on the client side if structured access is needed.

Usage Examples

JSON-RPC tools/call with hidden API key

{
  "method": "tools/call",
  "params": {
    "name": "nyt_article_search",
    "arguments": {
      "query": "artificial intelligence",
      "apiKey": "your-nyt-api-key"
    }
  }
}

FastMCP-style client call

await client.callTool('nyt_top_stories', {
  section: 'technology',
  apiKey: 'your-nyt-api-key',
})

Article Search

await client.callTool('nyt_article_search', {
  query: 'climate change',
  sort: 'newest',
  begin_date: '20250101',
  end_date: '20250401',
  apiKey: 'your-nyt-api-key',
})

Most Popular

await client.callTool('nyt_most_popular', {
  type: 'viewed',
  time_period: '7',
  apiKey: 'your-nyt-api-key',
})

Times Wire

await client.callTool('nyt_times_wire', {
  limit: 10,
  source: 'nyt',
  apiKey: 'your-nyt-api-key',
})

Archive

await client.callTool('nyt_archive', {
  year: 2025,
  month: 3,
  apiKey: 'your-nyt-api-key',
})

Books

await client.callTool('nyt_books', {
  list: 'hardcover-fiction',
  apiKey: 'your-nyt-api-key',
})

Development

Scripts:

  • yarn build
  • yarn start
  • yarn dev
  • yarn inspect
  • yarn test
  • yarn test:coverage

CI/CD

  • .github/workflows/build.yaml: build + test on PR open/sync
  • .github/workflows/publish.yaml: build + test + publish on main push (markdown-only changes ignored)

License

MIT