Skip to main content
Glama
joe5saia

nyt-mcp

by joe5saia

nyt-mcp

MCP server for the New York Times APIs.

Tools

Tool

NYT API

Description

search_articles

Article Search

Search by keyword with Lucene filters, date ranges, pagination

get_top_stories

Top Stories

Current top stories by section (home, world, science, …)

get_most_popular

Most Popular

Most emailed / shared / viewed articles (1, 7, or 30 days)

get_newswire

Times Newswire

Live stream of just-published articles

get_bestsellers

Books

NYT Best Sellers lists (hardcover-fiction, etc.)

get_archive

Archive

Article metadata for any month back to 1851

read_article

(scrape)

Fetch and extract the full text of an NYT article URL

Related MCP server: Times Newswire API MCP Server

Setup

  1. Get an API key at https://developer.nytimes.com/get-started.

  2. Set the API_KEY environment variable (or create a .env file):

    export API_KEY=your-nyt-api-key

Installation

No installation needed — just run with uvx:

# From PyPI (after publishing)
uvx nyt-mcp

# From GitHub
uvx --from git+https://github.com/joe5saia/nyt-mcp nyt-mcp

Or install permanently:

uv tool install nyt-mcp
# or from GitHub:
uv tool install git+https://github.com/joe5saia/nyt-mcp

Running as an MCP Server

Claude Code

claude mcp add nyt-mcp -- uvx nyt-mcp

Amp

Add to your MCP config (e.g. ~/.config/amp/settings.json):

{
  "mcpServers": {
    "nyt-mcp": {
      "command": "uvx",
      "args": ["nyt-mcp"],
      "env": {
        "API_KEY": "your-nyt-api-key"
      }
    }
  }
}

Standalone (stdio)

API_KEY=your-key uvx nyt-mcp

Development

uv run ruff check src/ tests/   # lint
uv run ruff format src/ tests/  # format
uv run ty check src/             # type check
uv run pytest tests/ -v          # test

Available Tools

6 tools
get_archiveB

Get article metadata from the NYT Archive for a given month.

Results are capped at 50 articles to keep context manageable.

Args: ctx: MCP context (injected automatically). year: Year (>= 1851). month: Month (1-12).

Returns: Formatted list of archived articles.

ParametersJSON Schema
NameRequiredDescriptionDefault
ctxYes
yearYes
monthYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose a genuine behavioral trait: results are capped at 50 articles. However, it omits the consequences of that cap (whether more can be retrieved, pagination, or truncation semantics) and says nothing about auth/API-key requirements for a mutation-free but credentialed external API.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The opening sentence and cap disclosure are front-loaded and efficient, but the 'Args' block largely restates parameter names that the schema already lists, and the 'Returns' block is redundant given an output schema exists. Some boilerplate fails to earn its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-format detail is unnecessary, and the 50-article cap plus year/month bounds cover the essentials for a simple two-real-parameter tool. It remains silent on truncation behavior beyond the cap and on what happens for months with no archived articles.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does add the meaningful constraints year >= 1851 and month 1-12 that the schema does not encode. It still leaves 'ctx' unexplained and offers no format or edge-case guidance for out-of-range values, so compensation is only partial.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get article metadata from the NYT Archive') scoped to a monthly window, which is enough to separate it from get_top_stories and get_most_popular. It does not explicitly contrast itself with search_articles, the closest sibling, so it earns a 4 rather than a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The month-scoped phrasing implies the use case (bulk retrieval of a historical month's articles), but it never says when to prefer this over search_articles or when the archive is inappropriate. Usage must be inferred from the resource name rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_bestsellersA

Get the NYT Best Sellers list.

Args: ctx: MCP context (injected automatically). list_name: List slug (e.g. 'hardcover-fiction', 'paperback-nonfiction'). date: Published date (YYYY-MM-DD) or 'current' for the latest.

Returns: Formatted best-seller list.

ParametersJSON Schema
NameRequiredDescriptionDefault
ctxYes
dateNocurrent
list_nameNohardcover-fiction

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does disclose that ctx is injected automatically and that the return is a 'Formatted best-seller list,' implying a read-only operation. However, it says nothing about auth requirements, rate limits, error behavior for invalid slugs/dates, or date-range boundaries.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The Args/Returns structure is front-loaded and easy to scan, with no wasted prose. The ctx line is boilerplate but brief, and the size is appropriate for a 3-parameter tool.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained further, and the parameters are documented. The remaining gap is the absence of guidance on discovering valid list_name slugs and on date semantics at range boundaries.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does so well: it explains list_name is a slug with two concrete examples and that date accepts YYYY-MM-DD or 'current' for the latest, plus the auto-injected ctx. It stops short of documenting the full set of valid slugs.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource: 'Get the NYT Best Sellers list.' This clearly distinguishes it from the article/story-oriented siblings (search_articles, get_top_stories, get_newswire), though it doesn't name or contrast with any alternative.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied by the purpose (retrieve a best-seller list), but there is no explicit when/when-not guidance, no prerequisites, and no mention of alternatives. The siblings are unrelated resources, so confusion is low, but the description adds nothing beyond the obvious.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_newswireB

Get the latest articles from the Times Newswire (live stream).

Args: ctx: MCP context (injected automatically). source: Content source - 'all', 'nyt', or 'inyt'. section: Section name, or 'all' for everything.

Returns: Formatted list of recent articles.

ParametersJSON Schema
NameRequiredDescriptionDefault
ctxYes
sourceNoall
sectionNoall

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full disclosure burden, and it delivers little: it does not state authentication needs, rate limits, freshness/update cadence beyond the word 'live stream', or whether the stream is paginated or bounded. It only notes the return is a formatted list, which the output schema already covers.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Short, front-loaded, and organized into Args/Returns sections. The 'ctx: MCP context (injected automatically)' line is arguably noise for an agent, and the Returns block is redundant given the output schema, but overall the entry is tight.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 3-parameter read tool with an output schema, the essentials are present and return format is documented elsewhere. Gaps remain around the unenumerated 'section' values and any behavioral constraints (auth, cadence, result limits) that an agent would need to call it reliably.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0%, the description compensates well: it enumerates the valid 'source' values ('all', 'nyt', 'inyt') that the schema does not, and explains 'section' with the 'all' default. The section parameter is still under-specified (no list of valid section names), preventing a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get the latest articles from the Times Newswire') plus the live-stream scope, which distinguishes it from get_top_stories and get_archive. It does not, however, explicitly name or contrast itself with any sibling tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The '(live stream)' qualifier and 'latest articles' imply this is for continuously updated content rather than popularity or search, but no explicit when-to-use or when-not-to-use guidance is given, and no sibling is named as an alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_top_storiesC

Get the current top stories for a given NYT section.

Args: ctx: MCP context (injected automatically). section: Section name (e.g. 'home', 'world', 'science', 'politics').

Returns: Formatted list of top stories.

ParametersJSON Schema
NameRequiredDescriptionDefault
ctxYes
sectionNohome

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It notes the return is a 'formatted list of top stories' but says nothing about API key/auth requirements, rate limits, caching, or freshness of 'current' stories — meaningful gaps for a live news-fetch tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core purpose is front-loaded in one sentence, followed by compact Args/Returns sections. The docstring formatting is slightly verbose for two parameters but nothing is padded or redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need not be described, and the description correctly keeps that brief. However, for a tool with siblings that fetch similar news content and zero annotations, the absence of any selection criteria or auth/freshness context leaves the definition only minimally viable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does explain both parameters: section with concrete examples ('home', 'world', 'science', 'politics') and ctx as an auto-injected MCP context. That is genuinely helpful, but it doesn't state the default behavior of section or the accepted value space exhaustively.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: retrieves current top stories, scoped to a NYT section. It is clear what the tool does, but it never distinguishes itself from siblings like get_most_popular or get_newswire, which an agent could easily confuse with 'top stories'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to choose this over search_articles, get_most_popular, or get_newswire. The only hint of context is the section examples, which is usage of a parameter, not of the tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_articlesA

Search NYT articles by keyword and optional filters.

Args: ctx: MCP context (injected automatically). query: Search query string. filter_query: Lucene-syntax filter (e.g. 'section.name:"Books"'). begin_date: Start date in YYYYMMDD format. end_date: End date in YYYYMMDD format. sort: Sort order - 'newest', 'oldest', or 'relevance'. page: Page number (0-indexed, max 100).

Returns: Formatted search results.

ParametersJSON Schema
NameRequiredDescriptionDefault
ctxYes
pageNo
sortNonewest
queryYes
end_dateNo
begin_dateNo
filter_queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden. It adds useful details such as page being 0-indexed with a max of 100 and allowed sort values, but it omits auth requirements, rate limits, pagination result behavior, and what 'Formatted search results' actually contains.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The Args/Returns structure is front-loaded and compact for a 7-parameter tool. Most lines earn their place, though 'Returns: Formatted search results' is vague and the ctx line is mostly boilerplate required by the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be detailed. However, the description still lacks usage guidance against sibling tools and behavioral context such as auth or rate limits, leaving gaps for correct tool selection and safe invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does: it documents query, Lucene-syntax filter_query with an example, YYYYMMDD date formats, sort enum values, page indexing/max, and notes that ctx is injected automatically. This adds substantial meaning beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: 'Search NYT articles by keyword and optional filters.' This is clear enough for an agent to understand the operation, but it does not distinguish the tool from siblings like get_archive, get_top_stories, or get_newswire.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies keyword search as the use case but provides no explicit when-to-use guidance, no exclusions, and no reference to sibling alternatives. An agent must infer that this is the general article-search tool rather than one of the other retrieval tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedget_archive
    • First observedget_bestsellers
    • First observedget_most_popular
    • First observedget_newswire
    • First observedget_top_stories
    • First observedsearch_articles

TDQS

A3.5/5.0

Scored across 6 tools

Disambiguation4/5

Each tool maps to a distinct NYT data source (search, top stories, most popular, newswire, bestsellers, archive), so boundaries are largely clear. The only mild overlap is among search_articles, get_top_stories, and get_newswire, which all return article lists but are distinguished by source semantics.

Naming Consistency5/5

Five tools use a clean get_<noun> pattern (get_top_stories, get_most_popular, get_newswire, get_bestsellers, get_archive), and search_articles is a sensible, readable variation on the verb for a query operation. The convention is predictable throughout.

Tool Count5/5

Six tools is well-scoped for the NYT API surface, with each tool earning its place by covering a distinct endpoint-like capability. No redundant or filler tools.

Completeness4/5

The set covers the major NYT read paths: keyword search, curated stories, popularity, newswire, bestsellers, and historical archive. Minor gaps exist (e.g., no single-article fetch by URL/ID, no byline/review endpoints), but core discovery workflows are fully served.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers