kbrimijoin/nyt_mcp
If you are the rightful owner of nyt_mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This is a proof of concept for a Model Context Protocol (MCP) server designed to handle NYT data, specifically for article searches.
NYT MCP Server
This is a proof of concept for a Model Context Protocol (MCP) server for NYT data. It currently only supports article search. The client for this is Claude Desktop. A link to the instructions for setting up the Google Sheets MCP server to save search results are below. The use case in mind is:
"NYTimes article search for 'street crimes' and write to spreadsheet named 'Crimes'"
Note: This project was scaffolded swiftly with Claude Code. MCP implementation was done by a human (me).
Demo
https://github.com/user-attachments/assets/3cc1b9e3-6c19-4b1c-abc1-2cbeb5780684
Setup
- Create a virtual environment:
uv venv --python 3.12
source .venv/bin/activate # On Windows: venv\Scripts\activate
uv pip install pip
- Install dependencies:
pip install -e .
Running the Server
python src/mcp_server/server.py
Or use the installed script:
nyt-mcp-server
Development
The server implements the Model Context Protocol and can be integrated with MCP clients like Claude Desktop.
Project Structure
nyt_mcp/
├── src/
│ └── mcp_server/
│ ├── __init__.py
│ └── server.py
├── pyproject.toml
└── README.md
Adding Tools
Edit src/mcp_server/server.py to add new tools:
- Add tool definition in
list_tools() - Add tool implementation in
call_tool()
Configuration
To use this server with Claude Desktop, add to your Claude Desktop config:
{
"mcpServers": {
"nyt": {
"command": "python",
"args": ["/path/to/nyt_mcp/src/mcp_server/server.py"]
}
}
}
Run with mcp-google-sheets
Follow the instructions here, specifically the Service Account authentication.
To use this server with Claude Desktop, add to your Claude Desktop config:
"google-sheets": {
"command": "/Users/xxxx/.local/bin/uvx",
"args": ["mcp-google-sheets@latest"],
"env": {
"SERVICE_ACCOUNT_PATH": "/Users/path-to-service-account-json/webrtcdemo-xxxxxx-xxxxxx.json",
"DRIVE_FOLDER_ID": "1xxxxxxxxxx"
}
}
Note that on a Mac, the full path to uvx should be used.