The Guardian MCP Server connects your language model to the complete archives of The Guardian newspaper, giving you access to the full text of more than 1.9 million articles dating back to 1999. This tool is valuable for real-time headlines, journalism analysis, and historical research.
Before installing, you need to obtain a Guardian Open Platform API key from their access page.
For non-commercial use, The Guardian offers generous API access with limits of 1 call/second and 500 calls/day. Commercial use requires a different license.
To install the server, run:
npx guardian-mcp-server
When setting up your MCP client, use the following configuration format:
{
"mcpServers": {
"guardian": {
"command": "npx",
"args": ["guardian-mcp-server"],
"env": {
"GUARDIAN_API_KEY": "your-key-here"
}
}
}
}
Search the archive for articles with various filtering options:
{
"query": "climate change",
"section": "environment",
"detail_level": "minimal",
"from_date": "2024-01-01",
"order_by": "newest"
}
The detail_level
parameter optimizes performance:
minimal
: headlines onlystandard
: headlines, summaries, and metadatafull
: all content, including full article textRetrieve individual articles:
{
"article_id": "https://www.theguardian.com/politics/2024/dec/01/example",
"truncate": false
}
Search through The Guardian's 50,000-plus hand-assigned tags.
Find articles similar to an article via shared tags.
Returns tags assigned to any article:
{
"article_id": "politics/2024/example"
}
Historical search by date.
Analyze Guardian content on a particular topic over a defined period:
{
"query": "artificial intelligence",
"from_date": "2024-01-01",
"to_date": "2024-06-30",
"interval": "month"
}
Estimates editorial importance of stories on a specific date:
{
"date": "2016-06-24",
"story_count": 5
}
Compare multiple topics over time with correlation analysis:
{
"topics": ["artificial intelligence", "climate change", "brexit"],
"from_date": "2023-01-01",
"to_date": "2024-12-31",
"interval": "quarter"
}
Generate profiles of Guardian journalists and their coverage areas:
{
"author": "George Monbiot",
"analysis_period": "2024"
}
Search The Long Read series for longform features.
Browse recent articles from specific sections.
Fetch all available Guardian sections.
Filter articles by word count.
Search articles by byline.
Get personalized Long Read recommendations:
{
"count": 3,
"context": "I'm researching technology, especially AI",
"topic_preference": "digital culture"
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "guardian" '{"command":"npx","args":["guardian-mcp-server"],"env":{"GUARDIAN_API_KEY":"your-key-here"}}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"guardian": {
"command": "npx",
"args": [
"guardian-mcp-server"
],
"env": {
"GUARDIAN_API_KEY": "your-key-here"
}
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"guardian": {
"command": "npx",
"args": [
"guardian-mcp-server"
],
"env": {
"GUARDIAN_API_KEY": "your-key-here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect