{"_id":"@cyanheads/guardian-mcp-server","_rev":"4-bbf6893b549762f4e413410f9a39927d","name":"@cyanheads/guardian-mcp-server","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.1":{"name":"@cyanheads/guardian-mcp-server","version":"0.1.1","keywords":["guardian","news","journalism","articles","mcp","mcp-server","model-context-protocol","typescript","bun","stdio","streamable-http","ai-agent"],"author":"cyanheads <casey@caseyjhand.com> (https://github.com/cyanheads/guardian-mcp-server#readme)","license":"Apache-2.0","_id":"@cyanheads/guardian-mcp-server@0.1.1","maintainers":[{"name":"cyanheads","email":"casey@caseyjhand.com"}],"homepage":"https://github.com/cyanheads/guardian-mcp-server#readme","bugs":{"url":"https://github.com/cyanheads/guardian-mcp-server/issues"},"bin":{"guardian-mcp-server":"dist/index.js"},"dist":{"shasum":"98127f10dbff4fe8dbd09863be78de0c383a2ce7","tarball":"https://registry.npmjs.org/@cyanheads/guardian-mcp-server/-/guardian-mcp-server-0.1.1.tgz","fileCount":38,"integrity":"sha512-94ADckhd1WeQzTBql+y0kcYbqgf75+yIJPAfPgUImWZusMOegiaTBy2N2oznkBsSnt8P7Sv4Xx7vMuqnJ4Icew==","signatures":[{"sig":"MEQCIDgdLpcZjTpHH18WpeBqPvdnlyXY0RT01Z7JVdvZmdrMAiAtHXDIo115MAuxyCamejUZP98JBAdLh6UtA+cv2QW9Mg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":183779},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","shasum":"98127f10dbff4fe8dbd09863be78de0c383a2ce7","engines":{"bun":">=1.3.0","node":">=24.0.0"},"funding":[{"url":"https://github.com/sponsors/cyanheads","type":"github"},{"url":"https://www.buymeacoffee.com/cyanheads","type":"buy_me_a_coffee"}],"mcpName":"io.github.cyanheads/guardian-mcp-server","scripts":{"test":"bunx vitest run","tree":"bun run scripts/tree.ts","build":"bun run scripts/build.ts","clean":"bun run scripts/clean.ts","start":"bun ./dist/index.js","bundle":"bun run build && npx -y @anthropic-ai/mcpb pack . dist/guardian-mcp-server.mcpb","format":"biome check --write .","rebuild":"bun run scripts/clean.ts && bun run scripts/build.ts","devcheck":"bun run scripts/devcheck.ts","lint:mcp":"bun run scripts/lint-mcp.ts","start:http":"MCP_TRANSPORT_TYPE=http bun ./dist/index.js","list-skills":"bun run scripts/list-skills.ts","publish-mcp":"mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish","start:stdio":"MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js","audit:refresh":"rm -f bun.lock && bun install && bun audit","format:unsafe":"biome check --write --unsafe .","lint:packaging":"bun run scripts/lint-packaging.ts","release:github":"bun run scripts/release-github.ts","changelog:build":"bun run scripts/build-changelog.ts","changelog:check":"bun run scripts/build-changelog.ts --check"},"_npmUser":{"name":"cyanheads","email":"casey@caseyjhand.com"},"_integrity":"sha512-94ADckhd1WeQzTBql+y0kcYbqgf75+yIJPAfPgUImWZusMOegiaTBy2N2oznkBsSnt8P7Sv4Xx7vMuqnJ4Icew==","repository":{"url":"git+https://github.com/cyanheads/guardian-mcp-server.git","type":"git"},"_npmVersion":"10.8.3","description":"Search, browse, and retrieve full article text from The Guardian's journalism archive (1999–present) via MCP.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"zod":"^4.4.3","pino-pretty":"^13.1.3","@cyanheads/mcp-ts-core":"^0.9.19"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"tsx":"^4.19.0","ignore":"^7.0.5","vitest":"^4.1.8","depcheck":"^1.4.7","tsc-alias":"^1.8.16","typescript":"^5.9.3","@types/node":"^25.6.0","@biomejs/biome":"^2.4.7"},"_npmOperationalInternal":{"tmp":"tmp/guardian-mcp-server_0.1.1_1780309839685_0.42808710631114644","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@cyanheads/guardian-mcp-server","version":"0.1.2","keywords":["guardian","news","journalism","articles","mcp","mcp-server","model-context-protocol","typescript","bun","stdio","streamable-http","ai-agent"],"author":"cyanheads <casey@caseyjhand.com> (https://github.com/cyanheads/guardian-mcp-server#readme)","license":"Apache-2.0","_id":"@cyanheads/guardian-mcp-server@0.1.2","maintainers":[{"name":"cyanheads","email":"casey@caseyjhand.com"}],"homepage":"https://github.com/cyanheads/guardian-mcp-server#readme","bugs":{"url":"https://github.com/cyanheads/guardian-mcp-server/issues"},"bin":{"guardian-mcp-server":"dist/index.js"},"dist":{"shasum":"fe41b9b8d539093bfa081cae9501838d397490f1","tarball":"https://registry.npmjs.org/@cyanheads/guardian-mcp-server/-/guardian-mcp-server-0.1.2.tgz","fileCount":39,"integrity":"sha512-7VYrlBZrlXNmDx8HqHAvCZh7CcPhFJBNbgd01hxSvjCSzt2PvSkh4nFybR+PveA9OMc1r5n5Ew45rUF9ELEmxg==","signatures":[{"sig":"MEUCIQDXv/dljzyvrnu7eSVG7JrQgz4r0EInFZf5NV7NOQHdEwIgb5F+gj77CnE1DDPGW2pqx2QmfZxTYSnlIqQPXxSjEd0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":187767},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","shasum":"fe41b9b8d539093bfa081cae9501838d397490f1","engines":{"bun":">=1.3.0","node":">=24.0.0"},"funding":[{"url":"https://github.com/sponsors/cyanheads","type":"github"},{"url":"https://www.buymeacoffee.com/cyanheads","type":"buy_me_a_coffee"}],"mcpName":"io.github.cyanheads/guardian-mcp-server","scripts":{"test":"bunx vitest run","tree":"bun run scripts/tree.ts","build":"bun run scripts/build.ts","clean":"bun run scripts/clean.ts","start":"bun ./dist/index.js","bundle":"bun run build && npx -y @anthropic-ai/mcpb pack . dist/guardian-mcp-server.mcpb && bun run scripts/clean-mcpb.ts dist/guardian-mcp-server.mcpb","format":"biome check --write .","rebuild":"bun run scripts/clean.ts && bun run scripts/build.ts","devcheck":"bun run scripts/devcheck.ts","lint:mcp":"bun run scripts/lint-mcp.ts","start:http":"MCP_TRANSPORT_TYPE=http bun ./dist/index.js","list-skills":"bun run scripts/list-skills.ts","publish-mcp":"mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish","start:stdio":"MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js","audit:refresh":"rm -f bun.lock && bun install && bun audit","format:unsafe":"biome check --write --unsafe .","lint:packaging":"bun run scripts/lint-packaging.ts","release:github":"bun run scripts/release-github.ts","changelog:build":"bun run scripts/build-changelog.ts","changelog:check":"bun run scripts/build-changelog.ts --check"},"_npmUser":{"name":"cyanheads","email":"casey@caseyjhand.com"},"_integrity":"sha512-7VYrlBZrlXNmDx8HqHAvCZh7CcPhFJBNbgd01hxSvjCSzt2PvSkh4nFybR+PveA9OMc1r5n5Ew45rUF9ELEmxg==","repository":{"url":"git+https://github.com/cyanheads/guardian-mcp-server.git","type":"git"},"_npmVersion":"10.8.3","description":"Search, browse, and retrieve full article text from The Guardian's journalism archive (1999–present) via MCP.","directories":{},"_nodeVersion":"24.3.0","dependencies":{"zod":"^4.4.3","pino-pretty":"^13.1.3","@cyanheads/mcp-ts-core":"^0.10.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.3.11","devDependencies":{"tsx":"^4.19.0","ignore":"^7.0.5","vitest":"^4.1.8","depcheck":"^1.4.7","tsc-alias":"^1.8.16","typescript":"^5.9.3","@types/node":"^25.9.3","@biomejs/biome":"^2.4.7"},"_npmOperationalInternal":{"tmp":"tmp/guardian-mcp-server_0.1.2_1781251053738_0.10673262880180778","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@cyanheads/guardian-mcp-server","version":"0.1.3","keywords":["guardian","news","journalism","articles","mcp","mcp-server","model-context-protocol","typescript","bun","stdio","streamable-http","ai-agent"],"author":"Casey Hand <casey@caseyjhand.com> (https://caseyjhand.com)","license":"Apache-2.0","_id":"@cyanheads/guardian-mcp-server@0.1.3","maintainers":[{"name":"cyanheads","email":"casey@caseyjhand.com"}],"homepage":"https://github.com/cyanheads/guardian-mcp-server#readme","bugs":{"url":"https://github.com/cyanheads/guardian-mcp-server/issues"},"bin":{"guardian-mcp-server":"dist/index.js"},"dist":{"shasum":"ffd8ab93becf5a167c3ecd918151823f5b8b2f17","tarball":"https://registry.npmjs.org/@cyanheads/guardian-mcp-server/-/guardian-mcp-server-0.1.3.tgz","fileCount":40,"integrity":"sha512-IYsy8M/gNdYbpCz2grQ7aJefJmiqoWxu6kdPKiDJEF7CQzMprKoiYOHfAx8ITKYi3sWOue9TmxqvtdYBTzmQ2g==","signatures":[{"sig":"MEUCIG+Io1356nKZOHD5IW4nmV58YXHo+NqJi7p/qwqru9r5AiEA7yPDk0i4psyBkrthe8la7O765raIWK94eex6kHLpwlw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":208108},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","shasum":"ffd8ab93becf5a167c3ecd918151823f5b8b2f17","engines":{"bun":">=1.3.0","node":">=24.0.0"},"funding":[{"url":"https://github.com/sponsors/cyanheads","type":"github"},{"url":"https://www.buymeacoffee.com/cyanheads","type":"buy_me_a_coffee"}],"mcpName":"io.github.cyanheads/guardian-mcp-server","scripts":{"test":"bunx vitest run","tree":"bun run scripts/tree.ts","build":"bun run scripts/build.ts","clean":"bun run scripts/clean.ts","start":"bun ./dist/index.js","bundle":"bun run build && npx -y @anthropic-ai/mcpb pack . dist/guardian-mcp-server.mcpb && bun run scripts/clean-mcpb.ts dist/guardian-mcp-server.mcpb","format":"biome check --write .","rebuild":"bun run scripts/clean.ts && bun run scripts/build.ts","devcheck":"bun run scripts/devcheck.ts","lint:mcp":"bun run scripts/lint-mcp.ts","start:http":"MCP_TRANSPORT_TYPE=http bun ./dist/index.js","list-skills":"bun run scripts/list-skills.ts","publish-mcp":"mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish","start:stdio":"MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js","audit:refresh":"rm -f bun.lock && bun install && bun audit","format:unsafe":"biome check --write --unsafe .","lint:packaging":"bun run scripts/lint-packaging.ts","release:github":"bun run scripts/release-github.ts","changelog:build":"bun run scripts/build-changelog.ts","changelog:check":"bun run scripts/build-changelog.ts --check"},"_npmUser":{"name":"cyanheads","email":"casey@caseyjhand.com"},"_integrity":"sha512-IYsy8M/gNdYbpCz2grQ7aJefJmiqoWxu6kdPKiDJEF7CQzMprKoiYOHfAx8ITKYi3sWOue9TmxqvtdYBTzmQ2g==","repository":{"url":"git+https://github.com/cyanheads/guardian-mcp-server.git","type":"git"},"_npmVersion":"10.8.3","description":"Search, browse, and retrieve full article text from The Guardian's journalism archive (1999–present) via MCP. STDIO or Streamable HTTP.","directories":{},"_nodeVersion":"26.3.0","dependencies":{"zod":"^4.4.3","pino-pretty":"^13.1.3","@cyanheads/mcp-ts-core":"^0.12.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.4.0","devDependencies":{"ignore":"^7.0.6","vitest":"^4.1.11","depcheck":"^1.4.7","tsc-alias":"^1.9.2","typescript":"^7.0.2","@types/node":"^26.2.0","@biomejs/biome":"^2.5.9","@socketsecurity/bun-security-scanner":"^1.1.2"},"_npmOperationalInternal":{"tmp":"tmp/guardian-mcp-server_0.1.3_1787328301294_0.12744728414968942","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"_id":"@cyanheads/guardian-mcp-server@0.1.4","bin":{"guardian-mcp-server":"dist/index.js"},"bugs":{"url":"https://github.com/cyanheads/guardian-mcp-server/issues"},"dist":{"shasum":"6d8922f53a9d7b6c37c378685fe0611fa444f0d9","tarball":"https://registry.npmjs.org/@cyanheads/guardian-mcp-server/-/guardian-mcp-server-0.1.4.tgz","fileCount":41,"integrity":"sha512-7jB532WWhgtbeqmDp7jzbgEXElkbOVZ46aD0/Rh7F+8N2EPQk+Dmv/QSDuWdc5RSNmWTWZS2nuQeVh4LUxvS3Q==","signatures":[{"sig":"MEUCIB2lrbHgIorDIxB6vZbeEsTLNFHGOtiwAkvvkoA53nIJAiEAguHErKwbkc9a6jBhYnoqmIB/ADOPKHRGz6eAVqbrcZs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHfRbVrsBh6xG5PgYHCBCH/L9U51bM2EyAWnww1MaC6aAiEAkVMqKfZeNkbLiOQddCHLtdmt0vk/nPOhdfUBiWz6Tgk="}],"unpackedSize":224486},"main":"dist/index.js","name":"@cyanheads/guardian-mcp-server","type":"module","types":"dist/index.d.ts","author":"Casey Hand <casey@caseyjhand.com> (https://caseyjhand.com)","shasum":"6d8922f53a9d7b6c37c378685fe0611fa444f0d9","engines":{"bun":">=1.4.0","node":">=24.0.0"},"funding":[{"url":"https://github.com/sponsors/cyanheads","type":"github"},{"url":"https://www.buymeacoffee.com/cyanheads","type":"buy_me_a_coffee"}],"license":"Apache-2.0","mcpName":"io.github.cyanheads/guardian-mcp-server","scripts":{"test":"vitest run","tree":"bun run scripts/tree.ts","build":"bun run scripts/build.ts","clean":"bun run scripts/clean.ts","start":"bun ./dist/index.js","bundle":"bun run build && npx -y @anthropic-ai/mcpb pack . dist/guardian-mcp-server.mcpb && bun run scripts/clean-mcpb.ts dist/guardian-mcp-server.mcpb","format":"biome check --write .","rebuild":"bun run scripts/clean.ts && bun run scripts/build.ts","devcheck":"bun run scripts/devcheck.ts","lint:mcp":"bun run scripts/lint-mcp.ts","audit:fix":"bun audit fix","start:http":"MCP_TRANSPORT_TYPE=http bun ./dist/index.js","list-skills":"bun run scripts/list-skills.ts","publish-mcp":"mcp-publisher login github -token \"$(security find-generic-password -a \"$USER\" -s mcp-publisher-github-pat -w)\" && mcp-publisher publish","start:stdio":"MCP_TRANSPORT_TYPE=stdio bun ./dist/index.js","audit:refresh":"rm -f bun.lock && bun install && bun audit","format:unsafe":"biome check --write --unsafe .","lint:packaging":"bun run scripts/lint-packaging.ts","release:github":"bun run scripts/release-github.ts","changelog:build":"bun run scripts/build-changelog.ts","changelog:check":"bun run scripts/build-changelog.ts --check"},"version":"0.1.4","_npmUser":{"name":"cyanheads","email":"casey@caseyjhand.com"},"homepage":"https://github.com/cyanheads/guardian-mcp-server#readme","keywords":["guardian","news","journalism","articles","mcp","mcp-server","model-context-protocol","typescript","bun","stdio","streamable-http","ai-agent"],"_integrity":"sha512-7jB532WWhgtbeqmDp7jzbgEXElkbOVZ46aD0/Rh7F+8N2EPQk+Dmv/QSDuWdc5RSNmWTWZS2nuQeVh4LUxvS3Q==","repository":{"url":"git+https://github.com/cyanheads/guardian-mcp-server.git","type":"git"},"_npmVersion":"10.8.3","description":"Search, browse, and retrieve full article text from The Guardian's journalism archive (1999–present) via MCP. STDIO or Streamable HTTP.","directories":{},"maintainers":[{"name":"cyanheads","email":"casey@caseyjhand.com"}],"_nodeVersion":"26.3.0","dependencies":{"zod":"^4.6.5","pino-pretty":"^13.1.3","@cyanheads/mcp-ts-core":"^0.13.6"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"packageManager":"bun@1.4.0","devDependencies":{"ignore":"^7.0.9","vitest":"^5.0.1","depcheck":"^1.4.7","tsc-alias":"^1.9.5","typescript":"^7.0.2","@types/node":"^26.6.2","@biomejs/biome":"^2.5.14","@socketsecurity/bun-security-scanner":"^1.1.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/guardian-mcp-server_0.1.4_1790051090901_0.8045682524329341"}}},"time":{"created":"2026-06-01T10:30:39.536Z","modified":"2026-09-22T04:24:51.189Z","0.1.1":"2026-06-01T10:30:39.804Z","0.1.2":"2026-06-12T07:57:33.897Z","0.1.3":"2026-08-21T16:05:01.478Z","0.1.4":"2026-09-22T04:24:50.982Z"},"bugs":{"url":"https://github.com/cyanheads/guardian-mcp-server/issues"},"author":"Casey Hand <casey@caseyjhand.com> (https://caseyjhand.com)","license":"Apache-2.0","homepage":"https://github.com/cyanheads/guardian-mcp-server#readme","keywords":["guardian","news","journalism","articles","mcp","mcp-server","model-context-protocol","typescript","bun","stdio","streamable-http","ai-agent"],"repository":{"url":"git+https://github.com/cyanheads/guardian-mcp-server.git","type":"git"},"description":"Search, browse, and retrieve full article text from The Guardian's journalism archive (1999–present) via MCP. STDIO or Streamable HTTP.","maintainers":[{"name":"cyanheads","email":"casey@caseyjhand.com"}],"readme":"<div align=\"center\">\n  <h1>@cyanheads/guardian-mcp-server</h1>\n  <p><b>Search, browse, and retrieve full article text from The Guardian's journalism archive (1999–present) via MCP. STDIO or Streamable HTTP.</b>\n  <div>3 Tools</div>\n  </p>\n</div>\n\n<div align=\"center\">\n\n[![Version](https://img.shields.io/badge/Version-0.1.4-blue.svg?style=flat-square)](./CHANGELOG.md) [![License](https://img.shields.io/badge/License-Apache%202.0-orange.svg?style=flat-square)](./LICENSE) [![Docker](https://img.shields.io/badge/Docker-ghcr.io-2496ED?style=flat-square&logo=docker&logoColor=white)](https://github.com/users/cyanheads/packages/container/package/guardian-mcp-server) [![MCP SDK](https://img.shields.io/badge/MCP%20SDK-%5E2.0.0-green.svg?style=flat-square)](https://modelcontextprotocol.io/) [![npm](https://img.shields.io/npm/v/@cyanheads/guardian-mcp-server?style=flat-square&logo=npm&logoColor=white)](https://www.npmjs.com/package/@cyanheads/guardian-mcp-server) [![TypeScript](https://img.shields.io/badge/TypeScript-%5E7.0.2-3178C6.svg?style=flat-square)](https://www.typescriptlang.org/) [![Bun](https://img.shields.io/badge/Bun-v1.4.0-blueviolet.svg?style=flat-square)](https://bun.sh/)\n\n</div>\n\n<div align=\"center\">\n\n[![Install in Claude Desktop](https://img.shields.io/badge/Install_in-Claude_Desktop-D97757?style=for-the-badge&logo=anthropic&logoColor=white)](https://github.com/cyanheads/guardian-mcp-server/releases/latest/download/guardian-mcp-server.mcpb) [![Install in Cursor](https://cursor.com/deeplink/mcp-install-dark.svg)](https://cursor.com/en/install-mcp?name=guardian-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvZ3VhcmRpYW4tbWNwLXNlcnZlciJdLCJlbnYiOnsiTUNQX1RSQU5TUE9SVF9UWVBFIjoic3RkaW8iLCJHVUFSRElBTl9BUElfS0VZIjoieW91ci1hcGkta2V5In19) [![Install in VS Code](https://img.shields.io/badge/VS_Code-Install_Server-0098FF?style=for-the-badge&logo=visualstudiocode&logoColor=white)](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22guardian-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Fguardian-mcp-server%22%5D%2C%22env%22%3A%7B%22MCP_TRANSPORT_TYPE%22%3A%22stdio%22%2C%22GUARDIAN_API_KEY%22%3A%22your-api-key%22%7D%7D)\n\n[![Framework](https://img.shields.io/badge/Built%20on-@cyanheads/mcp--ts--core-67E8F9?style=flat-square)](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)\n\n</div>\n\n---\n\n## Overview\n\nThe Guardian's journalism archive (1999–present), via the Guardian Open Platform API. Search full text, browse by section or tag, and fetch complete untruncated articles from any MCP client. Runs as a stdio process or a local Streamable HTTP server.\n\n### Tools\n\n| Tool | Description |\n|:-----|:------------|\n| `guardian_search` | Full-text search across The Guardian's archive with optional section, tag, contributor, and date filters |\n| `guardian_get_article` | Fetch a single Guardian article by ID with full untruncated body text and metadata |\n| `guardian_browse` | Browse by section or tag, or discover available sections and tags, across four modes |\n\n---\n\n## Capability reference\n\n### `guardian_search` <sub>tool</sub>\n\n- Boolean query syntax (`AND`/`OR`/`NOT`, quoted phrases) plus optional `section`, `tag`, `contributor`, and `from_date`/`to_date` (`YYYY-MM-DD`) filters\n- Sort via `order_by`: `relevance` (default), `newest`, or `oldest`; paginated with `page` + `page_size` (1–50, default 10)\n- Body text is HTML-stripped and truncated at 2,000 words with a `truncated` flag — fetch the complete text via `guardian_get_article`\n- Typed error reasons: `unauthorized`, `no_results`, `invalid_date`, `api_error` (retryable)\n- Zero-result responses carry an enrichment notice echoing the query\n\n---\n\n### `guardian_get_article` <sub>tool</sub>\n\n- Input: `article_id` — the path-slug `id` field returned by `guardian_search` or `guardian_browse`\n- Returns complete untruncated body text (HTML stripped), full metadata, contributor list, and pillar/section classification\n- `truncated: true` means the body still exceeded 2,000 words after the full fetch\n- Typed error reasons: `unauthorized`, `not_found`, `api_error` (retryable)\n\n---\n\n### `guardian_browse` <sub>tool</sub>\n\n- Four modes via `mode`: `section_latest` (requires `section_id`), `tag_latest` (requires `tag_id`), `list_sections`, `list_tags`\n- `list_tags` takes optional `query` and `tag_type` (`keyword`, `contributor`, `blog`, `series`, `tone`, `type`, `publication`, `newspaper-book`, `newspaper-book-section`) — use `tag_type=contributor` to discover contributor IDs\n- Pagination via `page` + `page_size` (1–50, default 10) applies to every mode\n- Typed error reasons: `unauthorized`, `missing_section_id`, `missing_tag_id`, `section_not_found`, `tag_not_found`, `api_error` (retryable)\n\n---\n\n## Features\n\nBuilt on [`@cyanheads/mcp-ts-core`](https://github.com/cyanheads/mcp-ts-core): stdio and Streamable HTTP transports, pluggable auth (`none` / `jwt` / `oauth`), swappable storage (`in-memory`, `filesystem`, `Supabase`, `Cloudflare KV/R2/D1`), structured logging with optional OpenTelemetry tracing.\n\nGuardian-specific:\n\n- Wraps the Guardian Open Platform API with a free non-commercial developer key\n- Full body text extraction — HTML stripped, not just headlines or abstracts\n- Contributor ID discovery via `guardian_browse` mode `list_tags` with `tag_type=contributor`\n- Section and tag taxonomy browsing (`list_sections`, `list_tags`) for filter discovery before searching\n- Free tier: 5,000 requests/day, 12 calls/second — the server applies no additional throttling\n\nAgent-friendly output:\n\n- Truncation flags on every article response — signal to call `guardian_get_article` for the rest\n- Typed error reasons across all three tools, each paired with a recovery hint\n- `total` / `page` / `pages` on every paginated response so callers can track result scope\n- Zero-result enrichment notice on `guardian_search` echoing the query and suggesting how to broaden\n\n---\n\n## Getting started\n\nAdd the following to your MCP client configuration file. Register for a free Guardian Open Platform API key at [open-platform.theguardian.com/access](https://open-platform.theguardian.com/access).\n\n```json\n{\n  \"mcpServers\": {\n    \"guardian-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"bunx\",\n      \"args\": [\"@cyanheads/guardian-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\",\n        \"GUARDIAN_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nOr with npx (no Bun required):\n\n```json\n{\n  \"mcpServers\": {\n    \"guardian-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@cyanheads/guardian-mcp-server@latest\"],\n      \"env\": {\n        \"MCP_TRANSPORT_TYPE\": \"stdio\",\n        \"MCP_LOG_LEVEL\": \"info\",\n        \"GUARDIAN_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nOr with Docker:\n\n```json\n{\n  \"mcpServers\": {\n    \"guardian-mcp-server\": {\n      \"type\": \"stdio\",\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"-i\", \"--rm\",\n        \"-e\", \"MCP_TRANSPORT_TYPE=stdio\",\n        \"-e\", \"GUARDIAN_API_KEY=your-api-key\",\n        \"ghcr.io/cyanheads/guardian-mcp-server:latest\"\n      ]\n    }\n  }\n}\n```\n\nFor Streamable HTTP, set the transport and start the server:\n\n```sh\nMCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 GUARDIAN_API_KEY=your-api-key bun run start:http\n# Server listens at http://localhost:3010/mcp\n```\n\n### Prerequisites\n\n- [Bun v1.4.0](https://bun.sh/) or higher (or Node.js v24+).\n- A free Guardian Open Platform API key — register at [open-platform.theguardian.com/access](https://open-platform.theguardian.com/access). The non-commercial developer tier is free and instant.\n\n### Installation\n\n1. **Clone the repository:**\n\n```sh\ngit clone https://github.com/cyanheads/guardian-mcp-server.git\n```\n\n2. **Navigate into the directory:**\n\n```sh\ncd guardian-mcp-server\n```\n\n3. **Install dependencies:**\n\n```sh\nbun install\n```\n\n4. **Configure environment:**\n\n```sh\ncp .env.example .env\n# Edit .env and set GUARDIAN_API_KEY\n```\n\n---\n\n## Configuration\n\n| Variable | Description | Default |\n|:---------|:------------|:--------|\n| `GUARDIAN_API_KEY` | **Required.** Free developer key from [open-platform.theguardian.com/access](https://open-platform.theguardian.com/access). | — |\n| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |\n| `MCP_HTTP_PORT` | Port for HTTP server. | `3010` |\n| `MCP_SESSION_MODE` | HTTP session mode: `stateless`, `stateful`, or `auto` (resolves to `stateful`). The server declares `stateless`; an exported value overrides it. | `stateless` |\n| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |\n| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |\n| `LOGS_DIR` | Directory for log files (Node.js only). | `<project-root>/logs` |\n| `STORAGE_PROVIDER_TYPE` | Storage backend. | `in-memory` |\n| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry) (spans, metrics, completion logs). | `false` |\n\nSee [`.env.example`](./.env.example) for the full list of optional overrides.\n\n---\n\n## Running the server\n\n### Local development\n\n- **Build and run:**\n\n  ```sh\n  # One-time build\n  bun run rebuild\n\n  # Run the built server\n  bun run start:stdio\n  # or\n  bun run start:http\n  ```\n\n- **Run checks and tests:**\n\n  ```sh\n  bun run devcheck   # Lint, format, typecheck, security\n  bun run test       # Vitest test suite\n  bun run lint:mcp   # Validate MCP definitions against spec\n  ```\n\n### Docker\n\n```sh\ndocker build -t guardian-mcp-server .\ndocker run --rm -e GUARDIAN_API_KEY=your-api-key -p 3010:3010 guardian-mcp-server\n```\n\nThe 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.\n\n---\n\n## Project structure\n\n| Directory | Purpose |\n|:----------|:--------|\n| `src/index.ts` | `createApp()` entry point — registers tools and initializes the Guardian service. |\n| `src/config` | Server-specific environment variable parsing (`GUARDIAN_API_KEY`). |\n| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`): `guardian_search`, `guardian_get_article`, `guardian_browse`. |\n| `src/services/guardian` | Guardian Open Platform API client, normalization, and type definitions. |\n| `tests/` | Unit and integration tests. |\n| `docs/` | Design document and directory tree. |\n\n---\n\n## Development guide\n\nSee [`CLAUDE.md`](./CLAUDE.md) / [`AGENTS.md`](./AGENTS.md) for development guidelines and architectural rules. The short version:\n\n- Handlers throw, framework catches — no `try/catch` in tool logic\n- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage\n- Register new tools in the `createApp()` `tools` array in `src/index.ts`\n- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields\n\n---\n\n## Contributing\n\nIssues are welcome. Run checks and tests before submitting:\n\n```sh\nbun run devcheck\nbun run test\n```\n\n---\n\n## License\n\nApache-2.0 — see [LICENSE](LICENSE) for details.\n\n---\n\n*Powered by [The Guardian](https://open-platform.theguardian.com/).*\n","readmeFilename":"README.md"}