Skip to main content
Glama
Stellar Product Hub MCP

Stellar Product Hub MCP

by jaypif
README.md
# Stellar Product Hub MCP

An **unofficial, live, read-only MCP server** for Stellar's public content hub:
<https://www.wearestellar.io/content-hub>.

It lets an MCP client's agent browse and read what is published on the hub — articles, case studies,
videos and the *Clef de voûte* podcast, in English and French — **without copying the site into a
database**. Pages are fetched on demand and cached in memory for five minutes. The website remains
the single source of truth.

> **Not affiliated with Stellar.** This is a community reader. All content read through the server
> is © Stellar and is **not** covered by the MIT licence, which applies to this software only. See
> [LICENSE-NOTICE.md](LICENSE-NOTICE.md).

## Tools (5, all read-only)

| Tool | Input | What it does |
|---|---|---|
| `hub_overview` | `{}` | The three hub sections with URLs, plus Stellar's in-house tool pages |
| `list_content` | `type` (article, case_study, video, podcast, tool), `locale` (en/fr), `theme?`, `limit` 1–100, `offset` | One section's cards with title, date, themes, URL and attribution |
| `search_content` | `query`, `type?` (default article, or `all`), `locale?`, `limit` 1–50 | Searches **listing metadata only** — titles, themes, card summaries. It never downloads article bodies |
| `get_content` | `url_or_id` (URL, path, slug or `type:locale:slug`), `locale?`, `offset`, `max_chars` | Fetches an article, case study or tool page and returns clean Markdown, paged. Videos/podcasts return metadata plus their official outbound link |
| `list_themes` | `locale?` | The six themes with their theme-page URLs |

No resources, no prompts, no write tools. Every item carries its canonical `url` and a Stellar
`attribution` string.

## Requirements

- Docker 24+ with Compose v2 (recommended), or Python 3.12
- Outbound HTTPS to `www.wearestellar.io`
- No API key, no account, no database, no volume

## Quick start — HTTP with Docker Compose

```bash
git clone https://github.com/jaypif/stellar-product-hub-mcp.git
cd stellar-product-hub-mcp
docker compose up -d --build
curl -fsS http://127.0.0.1:8000/healthz
```

The MCP endpoint is **http://127.0.0.1:8000/mcp** (streamable HTTP). The container listens on
localhost only. Stop it with `docker compose down`.

## Quick start — stdio (Claude Desktop, Claude Code, Tidet)

```bash
docker build -t stellar-product-hub-mcp:0.2.0 .
docker run -i --rm stellar-product-hub-mcp:0.2.0
```

The last command speaks MCP on stdin/stdout; your MCP client normally spawns it for you.

## Connect a client

### Claude Code

```bash
claude mcp add stellar-hub -- docker run -i --rm stellar-product-hub-mcp:0.2.0
```

Then run `/mcp` to confirm the connection.

### Claude Desktop / Tidet (stdio)

Add this to the client's MCP configuration:

```json
{
  "mcpServers": {
    "stellar-hub": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "stellar-product-hub-mcp:0.2.0"]
    }
  }
}
```

On macOS, if the client cannot find `docker`, use its absolute path (for example
`/usr/local/bin/docker`).

### Any MCP client with streamable HTTP

Start the Compose stack and point the client at `http://127.0.0.1:8000/mcp`.

### Try it

- “Using stellar-hub, list the 3 newest articles and read the first one.”
- “What does Stellar say about product-market fit? Cite the URLs.”
- “Show me the French podcast episodes about AI.”
- “Summarise the Dayuse case study.”

## Configuration

| Variable | Default | Meaning |
|---|---|---|
| `STELLAR_BASE_URL` | `https://www.wearestellar.io` | Site to read |
| `STELLAR_RATE` | `1` | Requests per second (hard cap 2) |
| `STELLAR_CACHE_TTL` | `300` | Seconds a fetched page stays in memory |
| `STELLAR_CACHE_MAX` | `64` | Maximum cached pages (LRU) |
| `STELLAR_TIMEOUT` | `20` | Per-request timeout, seconds |
| `STELLAR_CONTACT` | `local-reader` | Contact shown in the `User-Agent` |
| `LOG_LEVEL` | `INFO` | stderr logging level |

Pass them with `-e` for `docker run` or under `environment:` in Compose.

## How it works

1. `hub_overview` and `list_content` fetch and parse the hub's server-rendered listing pages.
2. `get_content` fetches one detail page and converts its main rich-text block to Markdown:
   headings, lists, quotes, images (absolute URLs, never downloaded) and embeds. Soft 404s become
   `not_found`.
3. Dates are parsed **day-first** (`30/7/2026` → `2026-07-30`). Summaries come from the first body
   paragraph, not the site's generic tagline.
4. The fetcher is polite: one request per second by default, an honest `User-Agent`, retries with
   backoff, redirects limited to the site host, and a hard stop on any Cloudflare challenge (no
   bypass).
5. The cache is in-process memory only. The server writes **no file, no database, no volume** and
   has no offline mode: if the site is unreachable, tools return a structured
   `upstream_unavailable` error.

## Testing (fixtures are not in this repo)

The test suite uses a small set of saved pages. They are **not committed** because they are copies
of Stellar's copyrighted content. Capture them locally at 1 request/second:

```bash
make fixtures   # writes tests/fixtures/html/ (git-ignored)
make test       # unit + contract + integration, coverage gate
make live       # opt-in smoke test against the live site (≤ 8 requests)
```

Without fixtures, `pytest` skips the fixture-dependent tests and runs the contract checks.

## Troubleshooting

| Symptom | Cause / fix |
|---|---|
| `upstream_unavailable` | The site is unreachable or returned a Cloudflare challenge. Wait and retry; this server never bypasses a challenge |
| Counts differ from an older version | The site changed; counts are read live and are not hard-coded |
| FR podcasts stop at 100 | Webflow caps a collection list at 100 cards; the server reports what the hub shows |
| Port 8000 already in use | Change the host port in `docker-compose.yml` |
| Client cannot start the container | Check that Docker is running and use an absolute `docker` path in the client config |

## Layout

```
src/stellar_hub/   server, live fetcher, cache, extractors
tests/             unit, contract, integration, opt-in live smoke
tools/             fixture capture and dev image
Dockerfile         live reader image (non-root, no volume)
docker-compose.yml HTTP deployment on 127.0.0.1:8000
```

## Licence

Software: [MIT](LICENSE). Content: © Stellar, not licensed under MIT — see
[LICENSE-NOTICE.md](LICENSE-NOTICE.md). This project is unofficial and not endorsed by Stellar.