demandscope
# DemandScope
Public-API demand-signal scanner for validating digital-product and dev-tool
ideas, plus a dependency-free MCP (Model Context Protocol) stdio server that
exposes the signals as tools any MCP-compatible agent can call.
> **Transparency notice:** this project is built, tested, and maintained by an
> autonomous AI agent (Hermes, by Nous Research) operating in the Autonomous
> Income Research Lab. A human owner reviews and authorizes external actions.
## Why
Built by the Autonomous Income Research Lab (2026-08-17) as its first product
prototype: demand validation for niche dev tools is itself a recurring need for
indie builders, and MCP integrations are a fast-growing ecosystem
(evidence: `research/2026-08-17-opportunity-scan.md`).
## Signals (all free, no-auth, ToS-friendly APIs)
| Tool | Source | Proxy for |
|----------------------|------------------------------|--------------------------------------|
| `github_repo_signal` | api.github.com/search | developer interest / competition |
| `github_trend` | api.github.com (created:) | supply/interest acceleration (delta) |
| `hn_signal` | hn.algolia.com (Hacker News) | tech-audience attention |
| `hn_trend` | hn.algolia.com | attention acceleration (delta) |
| `npm_downloads` | api.npmjs.org | comparable-product demand |
| `pypi_downloads` | pypistats.org | comparable-product demand |
Absolute download counts include CI/mirror traffic — use directionally, not as
exact market sizes. Trend tools return `growth_ratio` (current window ÷ prior
window); >1 means accelerating.
## Reliability (v0.2)
- **Cache:** file-based TTL cache (`DEMANDSCOPE_CACHE_DIR`, default
`.cache/demandscope`). TTLs: GitHub/HN 1h, npm/PyPI 24h. Repeat calls are
free and instant.
- **Backoff:** exponential retry (max 4) on HTTP 429/5xx, honoring
`Retry-After`. pypistats is treated as best-effort.
## Usage
CLI-style (batch scan):
```bash
python3 ../demand-scanner/demand_scanner.py candidates.json out/
```
As an MCP server (newline-delimited JSON-RPC 2.0 over stdio):
```bash
python3 mcp_server.py
```
MCP client config example:
```json
{"mcpServers": {"demandscope": {"command": "python3", "args": ["/path/to/mcp_server.py"]}}}
```
## MCP Registry / MCPB bundle
DemandScope is published to the official MCP Registry as
`io.github.baobabcat/demandscope`. Each release attaches a deterministic,
one-click-installable MCP Bundle (`demandscope.mcpb`, spec 0.3) built by
`scripts/build_mcpb.py`; publishing runs from CI via GitHub OIDC
(`.github/workflows/publish-mcp.yml`, no stored secrets). The registry
manifest (`server.json`) is validated with
[`mcp-registry-lint`](https://github.com/baobabcat/mcp-registry-lint) and
`mcp-publisher validate` before every publish.
## Tests
```bash
python3 test_mcp_server.py
```
10 end-to-end protocol tests (handshake, notifications, ping, tools/list,
tools/call incl. trend + cache-hit assertion, error paths). Network needed for
the `npm_downloads` and `hn_trend` call tests.
## Status / roadmap
- **v0.3 (2026-08-20):** MCPB bundle + official MCP Registry publishing via
GitHub OIDC (`server.json`, deterministic `scripts/build_mcpb.py`,
tag-triggered publish workflow with rollback). 10/10 tests pass.
- v0.2 (2026-08-17): trend-delta tools (`github_trend`, `hn_trend`), TTL
cache + rate-limit backoff, `pyproject.toml` packaging, MIT license.
10/10 tests pass.
- v0.1 (2026-08-17): protocol subset `initialize`, `ping`, `tools/list`,
`tools/call`; 4 signal tools.
- Next: `resources` support, hosted HTTP transport, second asset
(`mcp-registry-lint`) in the lab pipeline.
TDQS
Scored across 6 tools
Each tool targets a distinct source (GitHub, Hacker News, npm, PyPI) and a distinct metric (absolute signal vs trend vs downloads). Even the GitHub and HN pairs are clearly separated by the signal/trend distinction, leaving no meaningful overlap.
Most tools follow a source_metric pattern: github_repo_signal, github_trend, hn_signal, hn_trend, npm_downloads, pypi_downloads. The only minor inconsistency is that npm and PyPI use 'downloads' while GitHub and HN use 'signal'/'trend', but the pattern remains predictable and readable.
Six tools is well-scoped for a demand-signal aggregator covering multiple external data sources. Each tool earns its place by representing a distinct signal-source combination, and the count feels neither too thin nor bloated.
The toolset covers both absolute and trend signals for GitHub and Hacker News, plus package downloads for npm and PyPI. A minor gap is the lack of trend/growth comparison for npm and PyPI downloads, but the core demand-signal surface is otherwise well covered.