nyt-mcp
Provides tools to search and retrieve articles from the New York Times API, including top stories, most popular, newswire, bestsellers, archive, and article text extraction.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nyt-mcpshow me the top stories in the science section"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nyt-mcp
MCP server for the New York Times APIs.
Tools
Tool | NYT API | Description |
| Article Search | Search by keyword with Lucene filters, date ranges, pagination |
| Top Stories | Current top stories by section (home, world, science, …) |
| Most Popular | Most emailed / shared / viewed articles (1, 7, or 30 days) |
| Times Newswire | Live stream of just-published articles |
| Books | NYT Best Sellers lists (hardcover-fiction, etc.) |
| Archive | Article metadata for any month back to 1851 |
| (scrape) | Fetch and extract the full text of an NYT article URL |
Related MCP server: Times Newswire API MCP Server
Setup
Get an API key at https://developer.nytimes.com/get-started.
Set the
API_KEYenvironment variable (or create a.envfile):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-mcpOr install permanently:
uv tool install nyt-mcp
# or from GitHub:
uv tool install git+https://github.com/joe5saia/nyt-mcpRunning as an MCP Server
Claude Code
claude mcp add nyt-mcp -- uvx nyt-mcpAmp
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-mcpDevelopment
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 # testAvailable Tools
6 toolsget_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.
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | Yes | ||
| year | Yes | ||
| month | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | Yes | ||
| date | No | current | |
| list_name | No | hardcover-fiction |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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_most_popularB
Get the most popular NYT articles (emailed, shared, or viewed).
Args: ctx: MCP context (injected automatically). popularity_type: One of 'emailed', 'shared', or 'viewed'. period: Time period in days - 1, 7, or 30.
Returns: Formatted list of popular articles.
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | Yes | ||
| period | No | ||
| popularity_type | No | viewed |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full behavioral burden. It implicitly signals a read-only fetch and ties each popularity_type to a real metric, but says nothing about rate limits, auth, or ordering behavior; the return format is delegated to the output schema.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Front-loaded purpose sentence followed by compact Args/Returns blocks. The scaffolding is mildly boilerplate but every line carries information an agent needs.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so the description need not explain the return payload. It covers parameters adequately but omits usage guidance relative to siblings and any behavioral caveats, leaving the definition merely workable for a tool with five overlapping siblings.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% and the schema declares no enums, so the description is the only source of parameter meaning. It fully compensates by spelling out the allowed values for popularity_type ('emailed', 'shared', 'viewed') and the valid period values (1, 7, 30), plus noting ctx is auto-injected.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource (get the most popular NYT articles) and enumerates the three popularity dimensions, so the agent knows exactly what data it returns. It does not, however, distinguish itself from siblings like get_top_stories, leaving that routing to inference.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description never says when to reach for this tool versus search_articles, get_top_stories, or get_newswire. The agent gets a purpose statement but no usage context or exclusions.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | Yes | ||
| source | No | all | |
| section | No | all |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | Yes | ||
| section | No | home |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| ctx | Yes | ||
| page | No | ||
| sort | No | newest | |
| query | Yes | ||
| end_date | No | ||
| begin_date | No | ||
| filter_query | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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.
6 tool updates
v0.1.0- First observed
get_archive - First observed
get_bestsellers - First observed
get_most_popular - First observed
get_newswire - First observed
get_top_stories - First observed
search_articles
TDQS
Scored across 6 tools
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.
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.
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.
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
Related MCP Connectors
NYT MCP — wraps The New York Times Developer APIs (developer.nytimes.com)
MCP server for searching Airweave collections with natural language queries.
Dive into the latest and greatest from the tech world with our Hacker News MCP server.
MCP server for generating rough-draft project plans from natural-language prompts.
Related MCP Servers
- AlicenseBqualityDmaintenanceThis is a TypeScript-based MCP server that allows searching for New York Times articles from the last 30 days based on a keyword.114 npm19MIT
- FlicenseNot gradedqualityDmaintenanceAn MCP server that provides access to the New York Times Newswire API, allowing agents to retrieve real-time news updates and content from the New York Times.-
- FlicenseNot gradedqualityDmaintenanceA Multi-Agent Conversation Protocol server that provides access to the New York Times Most Popular API, allowing agents to interact with NYT's most viewed, shared, and emailed content.-
- FlicenseNot gradedqualityFmaintenanceMCP server providing access to the GNews API for fetching news articles and headlines. Supports search and top headlines with advanced filtering by language, country, category, and date.1-