@cyanheads/guardian-mcp-server
Provides tools for searching, browsing, and retrieving full article text from The Guardian's journalism archive (1999–present), including full-text search with filters, single article retrieval, and content browsing by section or tag.
Click on "Install 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., "@@cyanheads/guardian-mcp-serversearch for articles about climate change from 2023"
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.
Prerequisites
A free Guardian Open Platform API key is required. Register at https://open-platform.theguardian.com/access — the non-commercial developer tier is free. Set it as
GUARDIAN_API_KEYin your MCP client config or.envfile. The server will not start without it.Rate limits (free tier): 5,000 requests/day, 12 calls/second. The server applies no additional throttling — stay within these bounds.
Related MCP server: Guardian News MCP Server
Tools
Three tools for working with The Guardian's journalism archive:
Tool | Description |
| Full-text search across The Guardian's archive (1999–present) with optional section, tag, contributor, and date filters. Returns articles with full body text (HTML stripped, truncated at 2,000 words). |
| Fetch a single Guardian article by its ID (path slug) with full body text and all metadata. Use after |
| Browse The Guardian's content by section or tag, or discover available sections and tags. Four modes: |
guardian_search
Full-text search with structured filters across the entire Guardian archive.
Supports AND, OR, NOT boolean operators and exact phrases in double quotes
Filters: section ID, tag ID, contributor profile ID, date range (
from_date,to_date)Returns body text (HTML stripped) truncated at 2,000 words with a truncation flag — use
guardian_get_articlefor complete textSort by
relevance(default),newest, oroldestPagination via
page+page_size(1–50 per page)
guardian_get_article
Fetch one article by its Guardian path-slug ID.
Input:
article_idfromguardian_searchresults — theidfield, e.g."world/2024/mar/01/ukraine-war-latest"Returns complete untruncated body text (HTML stripped), full metadata, contributor list, and pillar/section classification
truncated: truein the response means the body still exceeded 2,000 words after fetching
guardian_browse
Browse and discover Guardian content — four modes in one tool.
section_latest: newest articles from a section (requiressection_id)tag_latest: newest articles carrying a tag (requirestag_id)list_sections: returns all Guardian sections as a flat list — use to discover validsection_idvalueslist_tags: searches the tag taxonomy with optionalqueryandtag_typefilter — use to discover contributor IDs (tag_type=contributor), keyword tags, series, and morePagination applies to all modes
Features
Built on @cyanheads/mcp-ts-core:
Declarative tool definitions — single file per tool, framework handles registration and validation
Unified error handling — handlers throw, framework catches, classifies, and formats
Pluggable auth:
none,jwt,oauthSwappable storage backends:
in-memory,filesystem,Supabase,Cloudflare KV/R2/D1Structured logging with optional OpenTelemetry tracing
STDIO and Streamable HTTP transports
Guardian-specific:
Wraps the Guardian Open Platform API with a free developer key
Full body text extraction — HTML stripped, not just headlines or abstracts
Contributor ID discovery via
guardian_browsemodelist_tags+tag_type=contributorSection and tag taxonomy browsing for filter discovery before searching
Powered by The Guardian
Agent-friendly output:
Truncation flags on every article — agents know whether to call
guardian_get_articlefor the restTyped error reasons (
unauthorized,no_results,not_found,invalid_date,api_error) with recovery hints for each casetotal,page, andpageson all paginated responses so agents can communicate result scopeZero-result enrichment notice on
guardian_search— echoes the query and suggests how to broaden
Getting started
A
GUARDIAN_API_KEYis required. Register for the free non-commercial developer key at https://open-platform.theguardian.com/access.
Add the following to your MCP client configuration file:
{
"mcpServers": {
"guardian-mcp-server": {
"type": "stdio",
"command": "bunx",
"args": ["@cyanheads/guardian-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"GUARDIAN_API_KEY": "your-api-key"
}
}
}
}Or with npx (no Bun required):
{
"mcpServers": {
"guardian-mcp-server": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@cyanheads/guardian-mcp-server@latest"],
"env": {
"MCP_TRANSPORT_TYPE": "stdio",
"MCP_LOG_LEVEL": "info",
"GUARDIAN_API_KEY": "your-api-key"
}
}
}
}Or with Docker:
{
"mcpServers": {
"guardian-mcp-server": {
"type": "stdio",
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "MCP_TRANSPORT_TYPE=stdio",
"-e", "GUARDIAN_API_KEY=your-api-key",
"ghcr.io/cyanheads/guardian-mcp-server:latest"
]
}
}
}For Streamable HTTP, set the transport and start the server:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 GUARDIAN_API_KEY=your-api-key bun run start:http
# Server listens at http://localhost:3010/mcpPrerequisites
Bun v1.3.0 or higher (or Node.js v24+).
A free Guardian Open Platform API key — register at https://open-platform.theguardian.com/access. The non-commercial developer tier is free and instant.
Installation
Clone the repository:
git clone https://github.com/cyanheads/guardian-mcp-server.gitNavigate into the directory:
cd guardian-mcp-serverInstall dependencies:
bun installConfigure environment:
cp .env.example .env
# Edit .env and set GUARDIAN_API_KEYConfiguration
Variable | Description | Default |
| Required. Free developer key from open-platform.theguardian.com/access. | — |
| Transport: |
|
| Port for HTTP server. |
|
| Auth mode: |
|
| Log level (RFC 5424). |
|
| Directory for log files (Node.js only). |
|
| Storage backend. |
|
| Enable OpenTelemetry instrumentation (spans, metrics, completion logs). |
|
See .env.example for the full list of optional overrides.
Running the server
Local development
Build and run:
# One-time build bun run rebuild # Run the built server bun run start:stdio # or bun run start:httpRun checks and tests:
bun run devcheck # Lint, format, typecheck, security bun run test # Vitest test suite bun run lint:mcp # Validate MCP definitions against spec
Docker
docker build -t guardian-mcp-server .
docker run --rm -e GUARDIAN_API_KEY=your-api-key -p 3010:3010 guardian-mcp-serverThe Dockerfile defaults to HTTP transport, stateless session mode, and logs to /var/log/guardian-mcp-server. OpenTelemetry peer dependencies are installed by default — build with --build-arg OTEL_ENABLED=false to omit them.
Project structure
Directory | Purpose |
|
|
| Server-specific environment variable parsing ( |
| Tool definitions ( |
| Guardian Open Platform API client, normalization, and type definitions. |
| Unit and integration tests. |
| Design document and directory tree. |
Development guide
See CLAUDE.md / AGENTS.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor request-scoped logging,ctx.statefor tenant-scoped storageRegister new tools via the barrel in
src/mcp-server/tools/definitions/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Contributing
Issues and pull requests are welcome. Run checks and tests before submitting:
bun run devcheck
bun run testLicense
Apache-2.0 — see LICENSE for details.
Powered by The Guardian.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceProvides access to the complete archives of The Guardian newspaper since 1999, including the full text of 1.9 million articles.Last updated168820MIT
- Flicense-qualityDmaintenanceEnables users to search for the latest news articles from The Guardian using keywords and check service status. Provides access to Guardian's news content through their API with configurable result limits.Last updated
- Flicense-qualityDmaintenanceEnables searching and retrieving arXiv papers by topic, fetching abstracts by paper ID, and saving markdown content to files. Includes examples of integrating MCP tools with Google Gemini for AI-powered paper research.Last updated
- Alicense-qualityCmaintenanceEnables searching and retrieving articles, sections, and tags from The Guardian via the Guardian Open Platform API.Last updatedMIT
Related MCP Connectors
Jina AI Reader/Search MCP — turn any URL into clean LLM-ready markdown, plus web search.
Fast, intelligent web search and web crawling. New mcp tool: Exa-code is a context tool for coding
Hosted MCP with 91 agent tools: X, domains, SEO, Maps, Trends, Search, YouTube, TikTok, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/cyanheads/guardian-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server