Skip to main content
Glama
README.md
# Tempo Insights MCP

A dependency-free Model Context Protocol (MCP) server for public Tempo.co reporting. It supports fetching an article, Tempo search, article-level research briefs, and comparisons across a developing story.

## Tools

- `tempo_search` — finds public Tempo links for a query.
- `tempo_article` — returns normalized article metadata, clean text, and related video/embed metadata when present.
- `tempo_insights` — produces an extractive brief with claims, entities, dates, quantitative signals, uncertainties, and related video context.
- `tempo_compare` — contrasts two to five articles for repeated entities, claims, and timeline signals.
- `tempo_auth_status` — reports whether optional subscriber authentication is configured, without exposing secrets.

The analytical tools do **not** independently verify reporting. They clearly label the output as extractive signals from the fetched source.

## Related Video Context

If a Tempo article includes a related video, the server tries to extract usable context from what is available in the public article HTML:

- JSON-LD `VideoObject`, `Clip`, or `MediaObject` metadata.
- OpenGraph video URLs.
- Embedded video iframes such as YouTube, Vimeo, or other player embeds.
- Native HTML video sources and caption track links.
- Transcript text, when the page exposes it in structured metadata.

`tempo_insights` folds that video metadata or transcript text into the brief under `related_video_context`. It does not download videos, bypass players, or transcribe audio by itself; if Tempo only embeds a video without captions, transcript, title, or description, the insight will be limited to the embed metadata.

## Install in an MCP client

Add the following server definition, substituting the absolute path if your checkout lives elsewhere:

```json
{
  "mcpServers": {
    "tempo-insights": {
      "command": "node",
      "args": ["/Users/yudistryanizharkamil/Documents/ChatGPT/Personal/src/index.js"]
    }
  }
}
```

No `npm install` step is needed. Run it manually with `npm start`.

## Subscriber Access

Tempo.co does not appear to expose a public OAuth flow for third-party article access. Tempo uses REMP: the login user token lives in the `n_token` cookie and is also sent as `Authorization: Bearer <n_token>`. Analytics cookies such as Hotjar `_hjSession_*` or `_ga` are not login credentials.

For subscribed accounts, the MCP supports authenticated fetching through environment variables:

- `TEMPO_COOKIE` — a Cookie header, or a bare `n_token` value. Tracker cookies are stripped; a bare token is normalized to `n_token=...`.
- `TEMPO_COOKIE_FILE` — a path to a text file containing that cookie. The file is re-read on every request.
- `TEMPO_AUTHORIZATION` — optional override. If omitted, the MCP derives `Bearer <n_token>` from the cookie.

This does not bypass Tempo Plus. It only lets the MCP fetch content your account is already allowed to access. The MCP never prints the cookie value.

### Export the right cookie from Chrome

Sign in to Tempo in Chrome, then run:

```bash
npm run cookie:export
```

The helper reads Chrome's Tempo cookies from your local profile, keeps only `n_token`, `we_userid`, `status_user`, `remp_session_id`, `remp_session_referer`, and `browser_id`, and writes them to `~/.cursor/tempo.cookie`. It does not scrape cookies unless you run it.

Then point Cursor at that file and reload the MCP:

```json
{
  "mcpServers": {
    "tempo-insights": {
      "command": "node",
      "args": ["/Users/yudistryanizharkamil/Documents/ChatGPT/Personal/src/index.js"],
      "env": {
        "TEMPO_COOKIE_FILE": "/Users/yudistryanizharkamil/.cursor/tempo.cookie"
      }
    }
  }
}
```

Use `tempo_auth_status` to confirm `n_token_present` and `subscribed_cookie_present`. If Chrome uses v20 app-bound encryption, copy the Cookie header from DevTools on a Tempo Plus article you can already read, save it to the same file, and rerun.

## Data handling and limits

Only HTTPS links whose hostname is `tempo.co` or a Tempo subdomain are accepted. Responses are cached in memory for five minutes, keyed by a short hash of the active auth headers so anonymous, static-cookie, and cookie-file fetches do not collide. The server uses a browser-like User-Agent, times out source fetches after 15 seconds, and caps extracted article text at 35,000 characters.

Tempo's page markup can change. The article extractor uses JSON-LD first for metadata, `__NEXT_DATA__` and article-body fallbacks for text, and media fallbacks for related video context; if a page changes, update `extractBody` or `relatedMedia` in `src/index.js`.

TDQS

A3.8/5.0

Scored across 5 tools

Disambiguation5/5

Each tool has a clearly distinct purpose: search, fetch, generate insights, compare, and check auth status. No overlap or ambiguity exists between them, making tool selection straightforward for an agent.

Naming Consistency4/5

All tools share the 'tempo_' prefix and use snake_case, but there's a mix of verb-led names (tempo_search, tempo_compare) and noun-led names (tempo_article, tempo_insights, tempo_auth_status). Minor inconsistency, but the pattern is still predictable and readable.

Tool Count5/5

With exactly 5 tools, the set is well-scoped and each tool earns its place in the news analysis workflow. This falls comfortably within the ideal range for a specialized server.

Completeness4/5

The core workflow of searching, fetching, analyzing, and comparing articles is covered, plus a useful auth status check. Minor gaps like bulk fetching or topic discovery exist, but they are not critical to the server's purpose and can be worked around.

Maintenance

ActivityMaintained
ResponsivenessSyncing