Skip to main content
Glama
soothill

Jarvis News MCP

by soothill
README.md
# Jarvis News MCP

A local Model Context Protocol server that gives Jarvis current, attributed news briefings from the official BBC News and Sky News RSS feeds.

The server does not require an API key. It fetches publisher RSS data only when Jarvis calls a tool, removes duplicate feed entries, groups similar BBC/Sky reports, and ranks stories using recency, feed prominence, public-impact terms, and cross-publisher coverage.

## What Jarvis can call

| Tool | Purpose |
| --- | --- |
| `get_news_summary` | Return a ranked briefing across one or both publishers. |
| `search_news` | Find recent news about a person, place, organisation, or event. |
| `list_news_feeds` | Show every configured official feed and category. |

Results include structured JSON as well as readable Markdown. Each story retains its publisher, timestamp, and direct link. If one feed is down, the other feeds still return and the response includes a warning.

## Install

Requirements: Node.js 20 or newer.

```bash
git clone https://github.com/soothill/news-mcp.git
cd news-mcp
npm ci
npm run build
```

The built server entry point is `dist/index.js`. Keep the project folder in a permanent location so Jarvis can continue to launch it.

## Connect it to Jarvis

If Jarvis accepts the common `mcpServers` configuration format, add this entry to its MCP configuration:

```json
{
  "mcpServers": {
    "news": {
      "command": "node",
      "args": ["/absolute/path/to/News Feed/dist/index.js"]
    }
  }
}
```

Replace the path with the absolute path to this project's built `dist/index.js`. Run `pwd` in the project directory on macOS or Linux to find the project portion of that path. A ready-to-edit version is in [`jarvis.mcp.example.json`](./jarvis.mcp.example.json). Restart Jarvis after changing its configuration.

This server uses MCP over standard input/output, which is intended for a local assistant that launches the server as a child process. It deliberately writes no ordinary output to standard output because that channel is reserved for MCP messages.

Example requests for Jarvis:

- “Give me the five most important BBC and Sky stories from the last 12 hours.”
- “What has happened in UK politics today? Check both sources.”
- “Search the last three days of BBC and Sky technology news for quantum computing.”
- “Refresh the feeds and give me a concise morning briefing with source links.”

For the best general briefing, Jarvis should call `get_news_summary` with both sources and the `top` category. For broader research, it can request several categories in one call.

## Update an existing installation

From the project directory:

```bash
git pull --ff-only
npm ci
npm run build
```

Restart Jarvis afterward so it launches the new build.

## Tool inputs

`get_news_summary` accepts:

- `sources`: `bbc`, `sky`, or both; defaults to both.
- `categories`: one or more of `top`, `uk`, `world`, `us`, `business`, `politics`, `technology`, `science`, `health`, and `entertainment`; defaults to `top`.
- `lookbackHours`: 1–168; defaults to 24.
- `maxStories`: 1–30; defaults to 10.
- `refresh`: bypass the short in-memory cache; defaults to `false`.

`search_news` accepts the same inputs plus a required `query`.

Sky does not currently expose configured `science` or `health` RSS feeds. Requests for those combinations return the BBC result plus a clear warning.

## Runtime settings

Optional environment variables:

| Variable | Default | Allowed range | Meaning |
| --- | ---: | ---: | --- |
| `NEWS_CACHE_TTL_SECONDS` | `180` | 0–3600 | Per-feed in-memory cache lifetime. |
| `NEWS_HTTP_TIMEOUT_MS` | `10000` | 1000–30000 | Timeout for each publisher request. |
| `NEWS_USER_AGENT` | `JarvisNewsMCP/1.0...` | — | HTTP User-Agent sent to feeds. |

## Development and checks

```bash
npm run check
npm test
npm run test:live
```

`test:live` contacts the real BBC and Sky top-news feeds and prints five current stories. All other tests are deterministic and do not require the internet.

## Troubleshooting

- If Jarvis cannot start the server, confirm `node --version` reports 20 or newer and that the path in its MCP configuration is absolute.
- If `dist/index.js` is missing, run `npm ci` followed by `npm run build`.
- If a briefing contains feed warnings, retry with `refresh: true`. The server returns healthy feeds even when another feed is unavailable.
- Run `npm run test:live` to check whether this machine can reach both publishers.
- The MCP transport uses standard input/output. Launching `node dist/index.js` directly appears to do nothing because it is waiting for an MCP client; this is expected.

## How “important” is estimated

The server is transparent about its ranking. A story moves higher when it is newer, appears nearer the top of a publisher's feed, appears in a top-news feed, contains terms associated with major public impact, or is independently covered by both publishers. This is an automated relevance estimate, not an editorial or factual verdict.

The returned summary text is a short, cleaned version of publisher-supplied RSS metadata. Jarvis can turn those attributed results into a more conversational briefing, but it should not invent details that are absent from the returned stories. Feed text is treated as untrusted data and is never interpreted by the server as an instruction.

## Data and publisher terms

This project uses official publisher RSS endpoints and preserves attribution and links. Before redistributing or publishing the resulting briefing outside personal use, review the current BBC and Sky feed terms. No article pages, images, cookies, or user data are scraped or stored.

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: fetching top stories, searching by query, and listing available feeds/categories. There is no realistic confusion between broad summaries, targeted search, or feed metadata.

Naming Consistency5/5

All tool names follow a consistent lowercase snake_case verb_noun pattern: get_news_summary, search_news, and list_news_feeds. The naming is predictable and easy to pattern-match.

Tool Count5/5

Three tools is well-scoped for a focused news RSS server. Each tool covers a distinct user need without redundancy or wasted surface area.

Completeness4/5

The core news workflows—listing available sources, getting a ranked summary, and searching stories—are covered. The main minor gap is that list_news_feeds advertises categories/endpoints but there is no explicit tool to fetch news from a specific category directly.

Maintenance

ActivityMaintained
ResponsivenessNo issues