|
|
1 сар өмнө | |
|---|---|---|
| trends_mcp | 1 сар өмнө | |
| .gitignore | 1 сар өмнө | |
| OUTLOOK.md | 1 сар өмнө | |
| PROJECT.md | 1 сар өмнө | |
| README.md | 1 сар өмнө | |
| killserver.sh | 1 сар өмнө | |
| live_tests.sh | 1 сар өмнө | |
| pyproject.toml | 1 сар өмнө | |
| requirements.txt | 1 сар өмнө | |
| restart.sh | 1 сар өмнө | |
| run.sh | 1 сар өмнө | |
| test_trends_mcp.py | 1 сар өмнө | |
| tests.sh | 1 сар өмнө |
A FastMCP-based server for free entity normalization and attention context.
This project is intentionally opinionated:
Current tools:
resolve_entity — return candidate entity matches and the best Knowledge Graph MIDget_related_queries — show the search terms surrounding an entityget_related_topics — show the topic neighborhood around an entityget_ledger_recent — inspect the newest history entriesget_ledger_summary — summarize what the ledger is sayingget_entity_history — inspect history for one entity or MIDprune_history — delete stored snapshots older than the retention windowget_interest_over_time — show attention over time for a keyword or entitycompare_interest — compare attention between multiple keywords or entitiesget_attention_score — compact attention score for a known entityuv sync
./run.sh
pip install -r requirements.txt
./run.sh
If you use mcporter, point it at:
--conf ~/.openclaw/workspace/conf/mcporter.json
Example smoke test:
$ mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.get_interest_over_time keyword=bitcoin timeframe=7d
Entity resolution example:
$ mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.resolve_entity keyword=bitcoin
Related queries example:
mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.get_related_queries keyword=bitcoin
Related topics example:
mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.get_related_topics keyword=bitcoin
History example:
mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.get_entity_history entity=BTC
Suggested smoke tests:
python -m pytest
mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.resolve_entity keyword=bitcoin
mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.get_related_queries keyword=bitcoin
mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.get_related_topics keyword=bitcoin
Ledger note:
sqlite3 data/trends_history.db 'select id, ts, tool, keyword, normalized_keyword, mid from snapshots order by id desc limit 20;'
Prune history example:
mcporter --config ~/.openclaw/workspace/config/mcporter.json call trends.prune_history retention_days=30
History pruning runs automatically once per day when snapshots are being written.
The server listens on:
http://0.0.0.0:8507http://127.0.0.1:8507/healthhttp://127.0.0.1:8507/mcprun.sh — start the server in the backgroundkillserver.sh — stop a PID recorded in logs/server.pidrestart.sh — kill, then run againLogs are written to logs/server.log.
The long-term shape of this MCP should be:
providers/detect_trending_entitiesget_related_queries