How to Use the New York Times MCP in LangChain
Build LangChain agents that pull real-time New York Times data directly into your reasoning chains using this MCP Server.
Works with every AI agent you already use
…and any MCP-compatible client
Connect New York Times MCP to LangChain
Create your Vinkius account to connect New York Times to LangChain and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.
Chain live New York Times feeds into LangChain
The `get_top_stories` tool connects your LangChain agent to the current editorial feed of the New York Times. We feed these structured news headlines straight into your LangChain steps via our MCP Server, letting your agent decide which news section to pull next. This setup avoids stale context because the LangChain adapter pipes the live New York Times JSON output directly into your prompt templates. You can monitor the token cost of fetching these New York Times feeds inside LangSmith, keeping your LangChain LLM runs lean.
Run deep New York Times archive searches in LangChain
The `search_articles` tool allows your LangChain agent to run deep historical queries over decades of New York Times coverage. By feeding the output of this New York Times search endpoint into a multi-step LangChain agent, you let the model refine its queries based on initial results. This recursive search loop lets the LangChain agent build a timeline of past New York Times events without human intervention. Your LangSmith traces will show the exact queries the LangChain agent used to comb through these historical New York Times news records.
Track New York Times cultural trends with LangChain
The `get_book_lists` tool exposes the official New York Times best-seller rankings directly to your LangChain sequential chains. Your LangChain agent can pull the latest hardcover fiction list from the New York Times and immediately pass those titles to subsequent prompt steps. Combining this New York Times list tool with your custom database integrations lets you track publishing trends inside LangChain. The LangChain framework handles the data flow from the New York Times API response to your local storage without manual parsing.
Set up New York Times MCP in LangChain
Prerequisites
- Python 3.10+ installed
-
langchain-mcp-adapters+langgraphpackages - Active Vinkius subscription with a valid endpoint token
- 1
Install dependencies
Run
pip install langchain-mcp-adapters langgraph langchain-openai. The MCP adapters package converts MCP tools into native LangChainBaseToolobjects. - 2
Connect via HTTP transport
Use
MultiServerMCPClientwith"transport": "http"pointing to your Vinkius endpoint. Replace[YOUR_TOKEN_HERE]with your token from cloud.vinkius.com. - 3
Create a ReAct agent
Pass the discovered tools to
create_react_agent()from LangGraph. The agent automatically routes New York Times tool calls through the MCP protocol. - 4
Run with any LLM
Swap
ChatOpenAIforChatAnthropic,ChatGoogleGenerativeAI, or any LangChain-compatible model. The MCP tools work identically across all providers.
from langchain_mcp_adapters.client import MultiServerMCPClient
from langgraph.prebuilt import create_react_agent
from langchain_openai import ChatOpenAI
async with MultiServerMCPClient({
"new-york-times-mcp": {
"transport": "http",
"url": "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
}
}) as client:
tools = client.get_tools()
agent = create_react_agent(
ChatOpenAI(model="gpt-4o"),
tools,
)
result = await agent.ainvoke({
"messages": "List recent New York Times transactions"
})
print(result["messages"][-1].content) Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by New York Times. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.
Why Choose Vinkius
Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.
Real-time monitoring
Live
visibility into every interaction
Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.
Built-in savings
60%
lower AI costs
Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.
Single dashboard
One
place for every integration
Every tool your AI connects to, managed from a single screen. One account, complete control.
Common questions about New York Times MCP in LangChain
Use it with your favorite AI tools
Connect this server to Cursor, Claude, VS Code, and more.
Start using the New York Times MCP today
We host it, we monitor it, we maintain it. You just paste one token.