Skip to main content
Glama

numenews

coverage python license

MCP server and one-shot CLI that reads the news numerologically.

numenews fetches news from several public APIs, extracts numbers, dates and names, computes numerology (digit reduction, master numbers 11/22/33, gematria), finds patterns with hybrid vector search in Qdrant, and builds a daily forecast — while keeping every number activation as long-term memory.

Status: v0.1.0 — phases 0–10 complete. The tooling, configuration, logging, the domain models, the pure numerology layer, the five news sources behind one Protocol, the vector layer (the two local bge models, the six Qdrant collections, semantic and hybrid search), the four pydantic-ai agents (extract numbers, find patterns, build the forecast, summarise old news), the pipeline that composes them (ingest → analyze → forecast, with the sliding window and the digest), the MCP server with its nine tools, the one-shot CLI (today, forecast, history, search, patterns, mcp), the long-term memory of number activations (number_history, its per-day frequency and the forecast's thirty-day memory window), and the ragas evaluation in its isolated environment all exist. See ROADMAP.md for the phase-by-phase plan and what is done.

Quick start

uv sync --all-extras        # install the environment (Python 3.14+, uv)
make dev                    # start Qdrant (Docker Compose) and wait until healthy
cp .env.example .env        # optional: the default demo path needs no API keys
make lint && make test      # ruff + mypy --strict, pytest with coverage

Qdrant's dashboard is then at http://localhost:6333/dashboard.

Related MCP server: Google News MCP Agent

Quick start over the CLI

Every command answers with one JSON document on stdout and logs on stderr, so the output pipes straight into jq. today needs Qdrant and an LLM endpoint; history, search and patterns need Qdrant only. The full command surface is in docs/USER_FLOW.md.

uv run numenews today | jq .dominant_number   # ingest the window and read the day
uv run numenews forecast --date tomorrow      # a stored/derived reading, no fetch
uv run numenews history --number 11 --days 30 # when 11 was active
uv run numenews search -q "число 7 и деньги"  # hybrid search over stored news
uv run numenews patterns --min-strength 0.7   # the strong patterns, strongest first
uv run numenews --help

Quick start over MCP

The server starts without Qdrant or an API key and builds each dependency on the first tool call that needs it, so it can be attached to a host right away. Cursor's project config ships in .cursor/mcp.json; Claude Desktop takes the same command in its own claude_desktop_config.json. The nine tools, their examples and the failure semantics are in docs/MCP_TOOLS.md.

make mcp                                            # serve stdio (Ctrl-D to stop)
uv run pytest tests/integration/test_mcp_stdio.py   # the same handshake, as a test

Example output

This is the shape numenews today produces — the pipeline builds it, the CLI serializes it, and stdout is always JSON, so it pipes straight into jq:

{
  "date": "2026-09-21",
  "dominant_number": 11,
  "master_active": true,
  "patterns": [
    {
      "id": "8bb3a3e4-53cd-5333-92ab-5309c63d3b78",
      "type": "resonance",
      "numbers": [11, 22],
      "news_ids": ["b371bc46-7b4b-5b38-92db-cdf94a550f33"],
      "strength": 0.87,
      "interpretation": "Числа 11 и 22 резонируют в новостях о технологиях",
      "discovered_at": "2026-09-21T12:00:00Z"
    }
  ],
  "forecast": "День благоприятен для начинаний, связанных с коммуникацией",
  "advice": "Избегайте конфликтов — число 11 усиливает эмоции",
  "warnings": ["Возможны повторяющиеся события из прошлого"]
}

Stack

Layer

Choice

Package manager

uv, single package, src/ layout

Types

pydantic v2 + mypy --strict

Vector store

Qdrant (Docker Compose; :memory: in tests)

Embeddings

fastembed (bge-small-en-v1.5 384d, bge-base-en-v1.5 768d) — local, no API keys

LLM orchestration

pydantic-ai with structured output

MCP server

Python mcp SDK v2 (MCPServer), nine tools over stdio

HTTP

httpx + hishel (RFC 9111 cache) + tenacity

Config / logs

pydantic-settings / structlog (stderr, JSON in prod)

CLI

Typer + Rich, JSON-only stdout

Tests

pytest + pytest-asyncio + respx + hypothesis + ragas (eval)

Project layout

src/numenews/
├── config.py       # pydantic-settings
├── logging.py      # structlog + contextvars correlation
├── models/         # Pydantic v2 domain models
├── numerology/     # pure logic: reduction, master numbers, gematria (no I/O)
├── news/           # GDELT, NewsAPI, GNews, Mediastack, Currents behind one Protocol
├── embeddings/     # fastembed wrapper
├── vector/         # Qdrant client, collections, hybrid search
├── agents/         # pydantic-ai: extract, pattern, forecast, summarize
├── pipeline/       # the RAG chain, the sliding window, step timings
├── mcp/            # MCP server and 9 tools
└── cli/            # one-shot Typer commands

Commands

make help          # list every target
make install       # uv sync --all-extras
make lint          # ruff check + format check + mypy
make test          # unit + integration (with coverage)
make test-eval     # ragas evaluation in .venv-eval (needs an LLM endpoint; see docs/EVAL.md)
make eval-env      # build .venv-eval (ragas; ADR 0013)
make dev           # docker compose up -d --wait
make dev-down      # stop Qdrant, keep the volume
make clean         # stop Qdrant, delete volumes and caches
make run           # sample one-shot CLI run (needs Qdrant and an LLM endpoint)
make mcp           # start the MCP server (stdio)

make test runs the unit and integration suites with coverage and then checks the per-layer floors (numerology ≥ 95 %, pipeline/agents ≥ 80 %, vector/news ≥ 70 %); the levels, the doubles and the dated coverage snapshot are in docs/TESTING.md.

Documentation

License

MIT

Related MCP Connectors

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables fact-checking of news headlines using Google Gemini AI and web search verification, and retrieves trending news topics from RSS feeds with comprehensive multi-source analysis.
    1
    -
  • F
    license
    B
    quality
    D
    maintenance
    Fetches news articles from Google News, vectorizes them locally using ChromaDB, and enables semantic search through natural language queries.
    2
    -
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables LLM agents to discover news sources, list articles, parse and extract article text, search news, and perform NLP analysis such as keyword extraction and summarization.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables searching and fetching news articles with configurable date ranges, returning structured, sourced evidence for daily mineral-rights briefings.
    -