freshcontext-mcp 0.3.14 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.actor/Dockerfile +4 -1
- package/.actor/actor.json +1 -1
- package/CONTEXT_SKILL.md +84 -0
- package/FRESHCONTEXT_SPEC.md +80 -6
- package/HANDOFF.md +220 -91
- package/METHODOLOGY.md +277 -0
- package/README.md +126 -37
- package/SESSION_SAVE_V6.md +194 -0
- package/SESSION_SAVE_V9.md +170 -0
- package/dist/server.js +48 -63
- package/freshcontext-validate.js +196 -0
- package/freshcontext.schema.json +103 -0
- package/package.json +2 -2
- package/server.json +3 -3
package/.actor/Dockerfile
CHANGED
|
@@ -3,9 +3,12 @@ FROM apify/actor-node-playwright-chrome:20
|
|
|
3
3
|
# Copy package files first for better Docker layer caching
|
|
4
4
|
COPY package*.json ./
|
|
5
5
|
|
|
6
|
-
# Install dependencies
|
|
6
|
+
# Install dependencies
|
|
7
7
|
RUN npm install --include=dev
|
|
8
8
|
|
|
9
|
+
# Install Chromium matching the npm-installed Playwright version
|
|
10
|
+
RUN npx playwright install chromium
|
|
11
|
+
|
|
9
12
|
# Copy source and pre-built dist
|
|
10
13
|
COPY . ./
|
|
11
14
|
|
package/.actor/actor.json
CHANGED
package/CONTEXT_SKILL.md
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# FreshContext Project Context Skill
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Generate a compressed, structured context map of the FreshContext project state. Used at the start of new sessions to restore working context without re-reading full session saves. Reduces token usage by ~70% compared to full session save parsing.
|
|
5
|
+
|
|
6
|
+
## When to use
|
|
7
|
+
- Start of any new chat session on the FreshContext project
|
|
8
|
+
- When context window is filling up and compression is needed
|
|
9
|
+
- When asked to "load context", "restore state", or "what are we working on"
|
|
10
|
+
|
|
11
|
+
## Output format
|
|
12
|
+
|
|
13
|
+
Generate a context map in this structure:
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
PROJECT: FreshContext MCP
|
|
17
|
+
STATE: [one line — what's live vs pending]
|
|
18
|
+
|
|
19
|
+
CORE FILES:
|
|
20
|
+
- worker/src/intelligence.ts [DAR engine — exponential decay scoring]
|
|
21
|
+
- worker/src/worker.ts [Cloudflare Worker — all endpoints + cron]
|
|
22
|
+
- worker/src/synthesize.ts [Claude briefing synthesis — paused, needs key]
|
|
23
|
+
- METHODOLOGY.md [formal IP documentation]
|
|
24
|
+
- FRESHCONTEXT_SPEC.md [open standard v1.1]
|
|
25
|
+
|
|
26
|
+
INFRASTRUCTURE:
|
|
27
|
+
- Worker: https://freshcontext-mcp.gimmanuel73.workers.dev [LIVE]
|
|
28
|
+
- D1: freshcontext-db (d9898d65-f67e-4dcb-abdc-7f7b53f2d444) [LIVE]
|
|
29
|
+
- KV: RATE_LIMITER + CACHE [LIVE]
|
|
30
|
+
- Cron: 0 */6 * * * [RUNNING]
|
|
31
|
+
- npm: freshcontext-mcp@0.3.15 [LIVE]
|
|
32
|
+
|
|
33
|
+
ENDPOINTS:
|
|
34
|
+
/mcp — MCP transport (all tools)
|
|
35
|
+
/briefing — GET latest stored briefing
|
|
36
|
+
/briefing/now — POST force scrape + synthesize
|
|
37
|
+
/watched-queries — GET list all watched queries
|
|
38
|
+
/v1/intel/feed/:id — GET DAR-scored intelligence feed
|
|
39
|
+
/debug/db — GET D1 counts + recent scores
|
|
40
|
+
/debug/scrape — GET run one adapter raw
|
|
41
|
+
|
|
42
|
+
DAR ENGINE (intelligence.ts):
|
|
43
|
+
R_t = R_0 · e^(-λt)
|
|
44
|
+
λ: HN=0.050 Reddit=0.010 Jobs=0.005 Finance=0.001 GitHub=0.0002 Scholar=0.00005
|
|
45
|
+
Outputs: base_score, rt_score, entropy(low/stable/high), ha_pri_sig, published_at, semantic_fingerprint
|
|
46
|
+
|
|
47
|
+
D1 SCHEMA additions (idempotent on every cron):
|
|
48
|
+
base_score, rt_score, ha_pri_sig, entropy_level, published_at, semantic_fingerprint
|
|
49
|
+
|
|
50
|
+
KNOWN ISSUES:
|
|
51
|
+
- 12 TS type errors in worker.ts (type:"string" not literal "text") — wrangler deploys fine
|
|
52
|
+
- 130 node_modules conflicts (workers-types vs @types/node) — cosmetic
|
|
53
|
+
- Fix: add "skipLibCheck": true to tsconfig.json
|
|
54
|
+
|
|
55
|
+
BLOCKED ON:
|
|
56
|
+
- ANTHROPIC_KEY: not set — formatBriefing() fallback active
|
|
57
|
+
- Paddle verification: pending
|
|
58
|
+
|
|
59
|
+
NEXT BUILD PRIORITIES:
|
|
60
|
+
1. Webhook/trigger system — push signals when rt_score > threshold
|
|
61
|
+
2. Mining/industrial domain watched queries
|
|
62
|
+
3. Profile population (user_profiles table exists, nothing writes to it)
|
|
63
|
+
4. skipLibCheck tsconfig fix
|
|
64
|
+
|
|
65
|
+
COMMITS (current):
|
|
66
|
+
- d330dc3: DAR engine + intel feed endpoint
|
|
67
|
+
- a965554: ToolResult type fix + SESSION_SAVE_V9
|
|
68
|
+
- b9df76b: semantic deduplication + METHODOLOGY.md
|
|
69
|
+
|
|
70
|
+
AUTHOR: Immanuel Gabriel · Grootfontein, Namibia · gimmanuel73@gmail.com
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Instructions for Claude
|
|
74
|
+
|
|
75
|
+
At session start:
|
|
76
|
+
1. Read SESSION_SAVE_V9.md for detailed state
|
|
77
|
+
2. Output the context map above — compressed, no prose
|
|
78
|
+
3. Ask: "What are we working on today?"
|
|
79
|
+
|
|
80
|
+
Mid-session update: revise only changed fields. Don't regenerate the full map.
|
|
81
|
+
|
|
82
|
+
## Token budget
|
|
83
|
+
Full session save: ~2,500 tokens. This map: ~400 tokens.
|
|
84
|
+
Use this for orientation. Use session saves only for deep debugging.
|
package/FRESHCONTEXT_SPEC.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# The FreshContext Specification
|
|
2
|
-
**Version 1.
|
|
2
|
+
**Version 1.1 — April 2026**
|
|
3
3
|
*Authored by Immanuel Gabriel (Prince Gabriel) — Grootfontein, Namibia*
|
|
4
4
|
|
|
5
5
|
---
|
|
@@ -51,7 +51,7 @@ Confidence: <high|medium|low>
|
|
|
51
51
|
### `high`
|
|
52
52
|
The publication date was sourced from a structured, machine-readable field — an API response, HTML metadata tag, RSS feed, or official timestamp. The date is reliable.
|
|
53
53
|
|
|
54
|
-
*Examples: GitHub API `pushed_at`, arXiv submission date, Hacker News `created_at
|
|
54
|
+
*Examples: GitHub API `pushed_at`, arXiv submission date, Hacker News `created_at`, SEC EDGAR filing date, USASpending.gov award date*
|
|
55
55
|
|
|
56
56
|
### `medium`
|
|
57
57
|
The publication date was inferred from page signals — visible date strings, URL patterns, or content heuristics. Likely correct but not guaranteed.
|
|
@@ -91,7 +91,22 @@ A numeric representation of data freshness from 0–100, calculated as:
|
|
|
91
91
|
freshness_score = max(0, 100 - (days_since_retrieved × decay_rate))
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
-
Where `decay_rate` defaults to `1.5` for general web content. Implementations MAY use domain-specific decay rates
|
|
94
|
+
Where `decay_rate` defaults to `1.5` for general web content. Implementations MAY use domain-specific decay rates to reflect how quickly different categories of data become unreliable.
|
|
95
|
+
|
|
96
|
+
#### Recommended Decay Rates by Domain
|
|
97
|
+
|
|
98
|
+
| Category | Decay Rate | Approximate Half-life | Examples |
|
|
99
|
+
|---|---|---|---|
|
|
100
|
+
| Financial data | 5.0 | ~10 days | Stock prices, market cap, P/E ratios |
|
|
101
|
+
| Job listings | 3.0 | ~17 days | Remote job boards, HN Who is Hiring |
|
|
102
|
+
| News / HN / Reddit | 2.0 | ~25 days | Top stories, community discussion |
|
|
103
|
+
| Government procurement | 1.5 | ~33 days | USASpending.gov, GeBIZ tenders |
|
|
104
|
+
| GitHub repositories | 1.0 | ~50 days | Stars, forks, last commit, README |
|
|
105
|
+
| Product releases | 1.0 | ~50 days | Changelog entries, npm versions |
|
|
106
|
+
| Academic papers | 0.3 | ~167 days | arXiv submissions, Google Scholar |
|
|
107
|
+
| General web content | 1.5 | ~33 days | Default for unclassified sources |
|
|
108
|
+
|
|
109
|
+
#### Score Interpretation
|
|
95
110
|
|
|
96
111
|
| Score | Interpretation |
|
|
97
112
|
|---|---|
|
|
@@ -116,6 +131,22 @@ Adapters SHOULD:
|
|
|
116
131
|
- Prefer structured API sources over scraped content when both are available
|
|
117
132
|
- Log retrieval errors without silently returning cached or stale data
|
|
118
133
|
- Surface rate-limit or access-denied errors explicitly rather than returning empty content
|
|
134
|
+
- Use domain-specific decay rates from the recommended table above
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Composite Adapters
|
|
139
|
+
|
|
140
|
+
A **composite adapter** is a FreshContext-compatible adapter that calls multiple upstream adapters in parallel and combines their results into a single unified response. Each upstream result MUST retain its own FreshContext envelope — the composite wrapper MUST NOT collapse individual timestamps into a single envelope.
|
|
141
|
+
|
|
142
|
+
Composite adapters SHOULD:
|
|
143
|
+
|
|
144
|
+
- Fire all upstream calls in parallel (e.g. `Promise.allSettled`)
|
|
145
|
+
- Handle partial failures gracefully — if one upstream fails, return the rest
|
|
146
|
+
- Label each section clearly with its source adapter name
|
|
147
|
+
- Include a composite `retrieved_at` timestamp representing the time the composite call was initiated
|
|
148
|
+
|
|
149
|
+
*Examples in the reference implementation: `extract_landscape`, `extract_company_landscape`, `extract_idea_landscape`*
|
|
119
150
|
|
|
120
151
|
---
|
|
121
152
|
|
|
@@ -127,11 +158,13 @@ Without FreshContext (or equivalent):
|
|
|
127
158
|
- An agent recommending job listings may recommend roles that no longer exist
|
|
128
159
|
- An agent summarising market trends may cite conditions from a previous cycle
|
|
129
160
|
- An agent checking a competitor's pricing may act on outdated information
|
|
161
|
+
- An agent synthesising news may present last year's controversy as current
|
|
130
162
|
|
|
131
163
|
With FreshContext:
|
|
132
164
|
- Every piece of retrieved data carries its own timestamp
|
|
133
165
|
- The agent can reason about data age before acting
|
|
134
166
|
- Users can see exactly how fresh their AI's information is
|
|
167
|
+
- Composite intelligence reports carry per-source freshness signals
|
|
135
168
|
|
|
136
169
|
---
|
|
137
170
|
|
|
@@ -144,25 +177,66 @@ A tool, server, or API is **FreshContext-compatible** if:
|
|
|
144
177
|
|
|
145
178
|
Partial implementations that include only `retrieved_at` without `freshness_confidence` are considered **FreshContext-aware** but not fully compatible.
|
|
146
179
|
|
|
180
|
+
### Compatibility Levels
|
|
181
|
+
|
|
182
|
+
| Level | Requirements |
|
|
183
|
+
|---|---|
|
|
184
|
+
| **FreshContext-compatible** | Full envelope OR full JSON form with `retrieved_at` + `freshness_confidence` |
|
|
185
|
+
| **FreshContext-aware** | Includes `retrieved_at` but not `freshness_confidence` |
|
|
186
|
+
| **FreshContext-scored** | Full compatible + numeric `freshness_score` with domain-specific decay |
|
|
187
|
+
|
|
147
188
|
---
|
|
148
189
|
|
|
149
190
|
## Reference Implementation
|
|
150
191
|
|
|
151
192
|
The canonical reference implementation of this specification is:
|
|
152
193
|
|
|
153
|
-
**freshcontext-mcp** — an MCP server with
|
|
194
|
+
**freshcontext-mcp** — an MCP server with 20 adapters covering:
|
|
195
|
+
|
|
196
|
+
**Intelligence:** GitHub, Hacker News, Google Scholar, arXiv, Reddit
|
|
197
|
+
|
|
198
|
+
**Competitive research:** YC Companies, Product Hunt, GitHub repo search, npm/PyPI package trends
|
|
199
|
+
|
|
200
|
+
**Market data:** Yahoo Finance (up to 5 tickers), job listings (Remotive, RemoteOK, HN Hiring)
|
|
201
|
+
|
|
202
|
+
**Unique — not available in any other MCP server:**
|
|
203
|
+
- `extract_changelog` — release history from any repo, npm package, or website
|
|
204
|
+
- `extract_govcontracts` — US federal contract awards (USASpending.gov)
|
|
205
|
+
- `extract_sec_filings` — SEC 8-K material event disclosures (EDGAR)
|
|
206
|
+
- `extract_gdelt` — global news intelligence, 100+ languages, updated every 15 minutes
|
|
207
|
+
- `extract_gebiz` — Singapore Government procurement (data.gov.sg)
|
|
154
208
|
|
|
209
|
+
**Composite landscapes:** `extract_landscape`, `extract_idea_landscape`, `extract_gov_landscape`, `extract_finance_landscape`, `extract_company_landscape`
|
|
210
|
+
|
|
211
|
+
**Deployment:**
|
|
155
212
|
- npm: `freshcontext-mcp`
|
|
156
213
|
- GitHub: https://github.com/PrinceGabriel-lgtm/freshcontext-mcp
|
|
157
214
|
- Cloud endpoint: `https://freshcontext-mcp.gimmanuel73.workers.dev/mcp`
|
|
215
|
+
- Apify Store: `https://apify.com/prince_gabriel/freshcontext-mcp`
|
|
216
|
+
- MCP Registry: `io.github.PrinceGabriel-lgtm/freshcontext`
|
|
217
|
+
|
|
218
|
+
---
|
|
219
|
+
|
|
220
|
+
## Changelog
|
|
221
|
+
|
|
222
|
+
### Version 1.1 — April 2026
|
|
223
|
+
- Added Composite Adapters section
|
|
224
|
+
- Added domain-specific decay rate table with recommended values
|
|
225
|
+
- Added Compatibility Levels table (compatible / aware / scored)
|
|
226
|
+
- Updated reference implementation to 20 adapters
|
|
227
|
+
- Added `extract_gdelt`, `extract_gebiz`, `extract_sec_filings` to high-confidence examples
|
|
228
|
+
- Added Apify Store and MCP Registry to reference implementation listings
|
|
229
|
+
|
|
230
|
+
### Version 1.0 — March 2026
|
|
231
|
+
- Initial specification published
|
|
158
232
|
|
|
159
233
|
---
|
|
160
234
|
|
|
161
235
|
## Versioning
|
|
162
236
|
|
|
163
|
-
This document is version 1.
|
|
237
|
+
This document is version 1.1 of the FreshContext Specification.
|
|
164
238
|
|
|
165
|
-
Future versions will be tagged in this repository. Breaking changes to the envelope format will increment the major version. Additive changes (new optional fields, new confidence levels) will increment the minor version.
|
|
239
|
+
Future versions will be tagged in this repository. Breaking changes to the envelope format will increment the major version. Additive changes (new optional fields, new confidence levels, new recommended values) will increment the minor version.
|
|
166
240
|
|
|
167
241
|
---
|
|
168
242
|
|
package/HANDOFF.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# FreshContext — Handoff Document
|
|
2
|
-
**Version:** 0.3.
|
|
3
|
-
**
|
|
2
|
+
**Version:** 0.3.14 (npm) / 0.21 (Apify)
|
|
3
|
+
**Spec:** v1.1
|
|
4
|
+
**Date:** 2026-04-09
|
|
4
5
|
**Author:** Immanuel Gabriel (Prince Gabriel), Grootfontein, Namibia
|
|
5
6
|
**Contact:** gimmanuel73@gmail.com
|
|
6
7
|
|
|
@@ -8,17 +9,53 @@
|
|
|
8
9
|
|
|
9
10
|
## What You Are Receiving
|
|
10
11
|
|
|
11
|
-
FreshContext is a
|
|
12
|
-
retrieved web data in a structured freshness envelope — exact retrieval timestamp,
|
|
13
|
-
publication date estimate, freshness confidence (high/medium/low), and a 0-100
|
|
14
|
-
numeric score with domain-specific decay rates.
|
|
12
|
+
FreshContext is a **data freshness layer for AI agents** — an open standard and reference implementation that makes retrieved data trustworthy.
|
|
15
13
|
|
|
16
|
-
|
|
17
|
-
Anthropic's official MCP Registry, npm, and Apify Store.
|
|
14
|
+
Every piece of web data an AI agent retrieves has an age. Most tools ignore it. FreshContext surfaces it — wrapping every result in a structured envelope:
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
```
|
|
17
|
+
[FRESHCONTEXT]
|
|
18
|
+
Source: https://github.com/owner/repo
|
|
19
|
+
Published: 2024-11-03
|
|
20
|
+
Retrieved: 2026-04-05T09:19:00Z
|
|
21
|
+
Confidence: high
|
|
22
|
+
---
|
|
23
|
+
... content ...
|
|
24
|
+
[/FRESHCONTEXT]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**20 tools. No API keys. Deployed globally on Cloudflare's edge.**
|
|
28
|
+
|
|
29
|
+
Listed on the official MCP Registry, npm, and Apify Store. The FreshContext Specification v1.1 is published as an open standard under MIT license — any tool that wraps retrieved data in this envelope is FreshContext-compatible.
|
|
30
|
+
|
|
31
|
+
**npm downloads (first week, zero marketing): 191**
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## The 20 Tools
|
|
36
|
+
|
|
37
|
+
### Standard (11)
|
|
38
|
+
`extract_github`, `extract_hackernews`, `extract_scholar`, `extract_arxiv`,
|
|
39
|
+
`extract_reddit`, `extract_yc`, `extract_producthunt`, `search_repos`,
|
|
40
|
+
`package_trends`, `extract_finance`, `search_jobs`
|
|
41
|
+
|
|
42
|
+
### Composite Landscapes (5)
|
|
43
|
+
| Tool | Sources | What it delivers |
|
|
44
|
+
|---|---|---|
|
|
45
|
+
| `extract_landscape` | 6 | YC + GitHub + HN + Reddit + Product Hunt + npm |
|
|
46
|
+
| `extract_idea_landscape` | 6 | HN + YC + GitHub + Jobs + npm + Product Hunt — full idea validation |
|
|
47
|
+
| `extract_gov_landscape` | 4 | Gov contracts + HN + GitHub + changelog |
|
|
48
|
+
| `extract_finance_landscape` | 5 | Finance + HN + Reddit + GitHub + changelog |
|
|
49
|
+
| `extract_company_landscape` | 5 | SEC + govcontracts + GDELT + changelog + finance |
|
|
50
|
+
|
|
51
|
+
### Unique — Not Available in Any Other MCP Server (5)
|
|
52
|
+
| Tool | Source | What it delivers |
|
|
53
|
+
|---|---|---|
|
|
54
|
+
| `extract_changelog` | GitHub Releases API / npm / auto-discover | Update history from any repo, package, or website |
|
|
55
|
+
| `extract_govcontracts` | USASpending.gov | US federal contract awards — company, amount, agency, period |
|
|
56
|
+
| `extract_sec_filings` | SEC EDGAR | 8-K filings — legally mandated material event disclosures |
|
|
57
|
+
| `extract_gdelt` | GDELT Project | Global news intelligence — 100+ languages, every country, 15-min updates |
|
|
58
|
+
| `extract_gebiz` | data.gov.sg | Singapore Government procurement tenders — open dataset, no auth |
|
|
22
59
|
|
|
23
60
|
---
|
|
24
61
|
|
|
@@ -27,46 +64,60 @@ from any GitHub repo, npm package, or website).
|
|
|
27
64
|
### 1. GitHub Repository
|
|
28
65
|
URL: https://github.com/PrinceGabriel-lgtm/freshcontext-mcp
|
|
29
66
|
Branch: main
|
|
30
|
-
Transfer method: GitHub Settings
|
|
31
|
-
|
|
67
|
+
Transfer method: GitHub Settings → Transfer ownership
|
|
68
|
+
Contents: All TypeScript source, Dockerfile, specs, session saves, roadmap, CI/CD
|
|
32
69
|
|
|
33
70
|
### 2. npm Package
|
|
34
|
-
Package: freshcontext-mcp (v0.3.
|
|
71
|
+
Package: `freshcontext-mcp` (v0.3.14)
|
|
35
72
|
URL: https://www.npmjs.com/package/freshcontext-mcp
|
|
36
73
|
Account: immanuel-gabriel on npmjs.com
|
|
37
|
-
Transfer method: npm owner add new-username freshcontext-mcp
|
|
38
|
-
Note:
|
|
74
|
+
Transfer method: `npm owner add new-username freshcontext-mcp`
|
|
75
|
+
Note: Auto-published via GitHub Actions on every push to main
|
|
39
76
|
|
|
40
77
|
### 3. Cloudflare Account
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
78
|
+
| Resource | Details |
|
|
79
|
+
|---|---|
|
|
80
|
+
| Worker | freshcontext-mcp — the live MCP endpoint |
|
|
81
|
+
| D1 | freshcontext-db — ID: d9898d65-f67e-4dcb-abdc-7f7b53f2d444 |
|
|
82
|
+
| KV | RATE_LIMITER and CACHE — IDs in wrangler.jsonc |
|
|
83
|
+
| Cron | `0 */6 * * *` — runs automatically every 6 hours |
|
|
84
|
+
| Endpoint | https://freshcontext-mcp.gimmanuel73.workers.dev/mcp |
|
|
47
85
|
|
|
48
86
|
Transfer method: Add new account as Super Administrator, remove original.
|
|
49
|
-
D1 export: wrangler d1 export freshcontext-db --output=dump.sql
|
|
87
|
+
D1 export: `wrangler d1 export freshcontext-db --output=dump.sql`
|
|
88
|
+
|
|
89
|
+
Features live on the Worker:
|
|
90
|
+
- KV response caching (adapter-specific TTLs)
|
|
91
|
+
- Global rate limiting (60 req/min per IP across all edge nodes)
|
|
92
|
+
- 6-hour cron scraper with relevancy scoring (0-100, noise below 35 filtered)
|
|
93
|
+
- Hash-based deduplication on all cron results
|
|
50
94
|
|
|
51
95
|
### 4. Apify Actor
|
|
52
|
-
Actor:
|
|
53
|
-
|
|
96
|
+
Actor: `prince_gabriel/freshcontext-mcp`
|
|
97
|
+
Version: 0.21 (build 0.21.2 — tested and confirmed working April 2026)
|
|
98
|
+
URL: https://apify.com/prince_gabriel/freshcontext-mcp
|
|
54
99
|
Monetization: $50.00 per 1,000 results (Pay per event)
|
|
55
|
-
Transfer method: Re-publish under new Apify account
|
|
100
|
+
Transfer method: Re-publish under new Apify account using `apify push`
|
|
101
|
+
Note: Use `apify push` from local — GitHub cloning is blocked on Apify's build servers
|
|
56
102
|
|
|
57
103
|
### 5. MCP Registry Listing
|
|
58
|
-
Entry:
|
|
59
|
-
Config: server.json in the GitHub repo
|
|
104
|
+
Entry: `io.github.PrinceGabriel-lgtm/freshcontext`
|
|
105
|
+
Config: `server.json` in the GitHub repo
|
|
60
106
|
Transfer method: Update server.json with new repo URL and re-submit
|
|
61
107
|
|
|
62
108
|
### 6. GitHub Actions CI/CD
|
|
63
|
-
File:
|
|
64
|
-
Action: On every push to main — npm ci
|
|
65
|
-
Secret: NPM_TOKEN (granular access token from npmjs.com, renew annually)
|
|
109
|
+
File: `.github/workflows/publish.yml`
|
|
110
|
+
Action: On every push to main — `npm ci` → `tsc` → `npm publish`
|
|
111
|
+
Secret: `NPM_TOKEN` (granular access token from npmjs.com, renew annually)
|
|
112
|
+
|
|
113
|
+
### 7. PitchHut Listing
|
|
114
|
+
URL: https://pitchhut.com/project/freshcontext-mcp-tools
|
|
115
|
+
Account: gimmanuel73@gmail.com
|
|
116
|
+
Status: Claimed April 2026
|
|
66
117
|
|
|
67
118
|
---
|
|
68
119
|
|
|
69
|
-
## Credentials Map
|
|
120
|
+
## Credentials Map
|
|
70
121
|
|
|
71
122
|
| Credential | Where Used | Location |
|
|
72
123
|
|---|---|---|
|
|
@@ -74,109 +125,187 @@ Secret: NPM_TOKEN (granular access token from npmjs.com, renew annually)
|
|
|
74
125
|
| ANTHROPIC_KEY | Synthesis/briefing endpoint | Cloudflare env var |
|
|
75
126
|
| GITHUB_TOKEN | GitHub API rate limit bypass | Cloudflare env var |
|
|
76
127
|
| NPM_TOKEN | GitHub Actions auto-publish | GitHub secret |
|
|
128
|
+
| Stripe keys | Catatonica payments | Supabase / Cloudflare env |
|
|
77
129
|
|
|
78
130
|
---
|
|
79
131
|
|
|
80
132
|
## Codebase Map
|
|
81
133
|
|
|
82
|
-
|
|
83
|
-
src/
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
.
|
|
94
|
-
|
|
95
|
-
|
|
134
|
+
```
|
|
135
|
+
src/
|
|
136
|
+
server.ts — MCP stdio server, all 20 tools registered here
|
|
137
|
+
apify.ts — Apify Actor entry point (read input, call adapter, exit)
|
|
138
|
+
security.ts — URL validation, SSRF prevention, domain allowlists
|
|
139
|
+
types.ts — FreshContext, AdapterResult, ExtractOptions interfaces
|
|
140
|
+
adapters/ — One file per data source (18 files)
|
|
141
|
+
changelog.ts UNIQUE: GitHub Releases API + npm + auto-discover
|
|
142
|
+
govcontracts.ts UNIQUE: USASpending.gov federal contract awards
|
|
143
|
+
secFilings.ts UNIQUE: SEC EDGAR 8-K filings
|
|
144
|
+
gdelt.ts UNIQUE: GDELT global news intelligence
|
|
145
|
+
gebiz.ts UNIQUE: Singapore GeBIZ procurement
|
|
146
|
+
tools/
|
|
147
|
+
freshnessStamp.ts — Score calculation, JSON form, text envelope
|
|
148
|
+
|
|
149
|
+
worker/src/worker.ts — Cloudflare Worker: 20 tools + KV cache + rate limit
|
|
150
|
+
+ D1 cron scraper + relevancy scoring + briefing formatter
|
|
151
|
+
|
|
152
|
+
.actor/
|
|
153
|
+
Dockerfile — apify/actor-node-playwright-chrome:20 base image
|
|
154
|
+
actor.json — version: "0.21", Apify Actor metadata
|
|
155
|
+
|
|
156
|
+
FRESHCONTEXT_SPEC.md — The open standard v1.1 (MIT license)
|
|
96
157
|
ROADMAP.md — 10-layer product vision
|
|
158
|
+
HANDOFF.md — This file
|
|
159
|
+
SESSION_SAVE_V6.md — Most recent session save (April 2026)
|
|
97
160
|
server.json — MCP Registry listing
|
|
98
161
|
.github/workflows/
|
|
99
162
|
publish.yml — GitHub Actions CI/CD
|
|
163
|
+
```
|
|
100
164
|
|
|
101
165
|
---
|
|
102
166
|
|
|
103
|
-
##
|
|
167
|
+
## D1 Database Schema
|
|
104
168
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
package_trends, extract_finance, search_jobs
|
|
169
|
+
```
|
|
170
|
+
watched_queries 18 active monitored topics
|
|
171
|
+
id, adapter, query, label, filters, enabled, last_run_at
|
|
109
172
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
extract_finance_landscape — finance + HN + Reddit + GitHub + changelog
|
|
173
|
+
scrape_results Raw results, deduplicated by content hash
|
|
174
|
+
id, watched_query_id, adapter, query, raw_content, result_hash,
|
|
175
|
+
is_new, scraped_at, relevancy_score
|
|
114
176
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
177
|
+
briefings Formatted intelligence reports per cron run
|
|
178
|
+
id, user_id, summary, new_results_count, adapters_run, created_at
|
|
179
|
+
|
|
180
|
+
user_profiles Personalization data for briefing synthesis
|
|
181
|
+
id, name, skills, certifications, targets, location, context
|
|
182
|
+
```
|
|
118
183
|
|
|
119
184
|
---
|
|
120
185
|
|
|
121
|
-
##
|
|
186
|
+
## The FreshContext Specification v1.1
|
|
122
187
|
|
|
123
|
-
|
|
124
|
-
id, adapter, query, label, filters, enabled, last_run_at
|
|
188
|
+
`FRESHCONTEXT_SPEC.md` is the open standard, MIT license, authored March 2026, updated April 2026.
|
|
125
189
|
|
|
126
|
-
|
|
127
|
-
|
|
190
|
+
Key additions in v1.1 vs v1.0:
|
|
191
|
+
- Domain-specific decay rate table (financial: 5.0 → academic: 0.3)
|
|
192
|
+
- Composite Adapters section — defines how multi-source tools handle envelopes
|
|
193
|
+
- Compatibility Levels: compatible / aware / scored
|
|
194
|
+
- Reference implementation updated to 20 adapters
|
|
128
195
|
|
|
129
|
-
|
|
130
|
-
id, user_id, summary, new_results_count, adapters_run, created_at
|
|
196
|
+
Any implementation returning the `[FRESHCONTEXT]...[/FRESHCONTEXT]` envelope or the structured JSON form with `freshcontext.retrieved_at` and `freshcontext.freshness_confidence` is FreshContext-compatible.
|
|
131
197
|
|
|
132
|
-
|
|
133
|
-
id, name, skills, certifications, targets, location, context
|
|
198
|
+
**The spec is the durable asset. The code is the reference implementation.**
|
|
134
199
|
|
|
135
200
|
---
|
|
136
201
|
|
|
137
|
-
## The
|
|
202
|
+
## The Best Demo
|
|
203
|
+
|
|
204
|
+
Run this in Claude with FreshContext connected:
|
|
205
|
+
|
|
206
|
+
```
|
|
207
|
+
Use extract_company_landscape with company "Palantir" and ticker "PLTR"
|
|
208
|
+
```
|
|
138
209
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
210
|
+
Returns in one call, all timestamped:
|
|
211
|
+
- Q4 2025 SEC 8-K filing — revenue $1.407B (+70% YoY), Rule of 40 score 127%
|
|
212
|
+
- $1.1B+ in federal contracts from USASpending.gov across DoD, DHS, VA, DoE
|
|
213
|
+
- Global news coverage from GDELT — ICE/Medicaid controversy, UK MoD warning
|
|
214
|
+
- Live PLTR price, market cap ~$370B, P/E 244x from Yahoo Finance
|
|
143
215
|
|
|
144
|
-
|
|
216
|
+
Bloomberg Terminal doesn't read commit history as a company health signal. FreshContext does.
|
|
145
217
|
|
|
146
218
|
---
|
|
147
219
|
|
|
148
220
|
## What Keeps Running Without You
|
|
149
221
|
|
|
150
|
-
The Cloudflare cron fires every 6 hours automatically. Every run
|
|
151
|
-
|
|
152
|
-
|
|
222
|
+
The Cloudflare cron fires every 6 hours automatically. Every run:
|
|
223
|
+
1. Scrapes all 18 watched queries across all adapters
|
|
224
|
+
2. Deduplicates results by content hash
|
|
225
|
+
3. Scores each result for relevancy (0-100)
|
|
226
|
+
4. Filters noise below 35
|
|
227
|
+
5. Stores new signals in D1
|
|
228
|
+
6. Formats a briefing sorted by relevancy score
|
|
229
|
+
|
|
230
|
+
The dataset accumulates indefinitely. No action required.
|
|
153
231
|
|
|
154
232
|
---
|
|
155
233
|
|
|
156
|
-
##
|
|
234
|
+
## Valuation Reference
|
|
157
235
|
|
|
158
|
-
|
|
159
|
-
|
|
236
|
+
### FreshContext
|
|
237
|
+
| Deal type | Ask | Accept | Walk below |
|
|
238
|
+
|---|---|---|---|
|
|
239
|
+
| White-label licence | $8K/mo | $2–3K/mo | $1,500/mo |
|
|
240
|
+
| Full acquisition | $500K | $80–150K | $50K |
|
|
160
241
|
|
|
161
|
-
|
|
162
|
-
|
|
242
|
+
### Catatonica
|
|
243
|
+
| Deal type | Ask | Accept | Walk below |
|
|
244
|
+
|---|---|---|---|
|
|
245
|
+
| White-label licence | $5K/mo | $1.5–2.5K/mo | $800/mo |
|
|
246
|
+
| Full acquisition | $250K | $30–75K | $20K |
|
|
163
247
|
|
|
164
|
-
|
|
165
|
-
add one line to server.ts. Gives tool call tracking and usage dashboards.
|
|
248
|
+
---
|
|
166
249
|
|
|
167
|
-
|
|
168
|
-
|
|
250
|
+
## Active Outreach at Time of Handoff (April 2026)
|
|
251
|
+
|
|
252
|
+
### FreshContext — AGI Leasing Pitch Sent
|
|
253
|
+
OpenAI (partner form submitted + partnerships@openai.com),
|
|
254
|
+
Anthropic (partnerships@anthropic.com),
|
|
255
|
+
Google (partnerships@google.com),
|
|
256
|
+
xAI (partnerships@x.ai),
|
|
257
|
+
Cohere (partnerships@cohere.com),
|
|
258
|
+
Meta AI (ai-partnerships@meta.com),
|
|
259
|
+
Perplexity (partnerships@perplexity.ai),
|
|
260
|
+
Mistral (partnerships@mistral.ai),
|
|
261
|
+
Hugging Face (partnerships@huggingface.co),
|
|
262
|
+
DeepSeek (partnerships@deepseek.com)
|
|
263
|
+
|
|
264
|
+
### FreshContext — Other
|
|
265
|
+
Palantir, GovTech Singapore (GeBIZ adapter delivered),
|
|
266
|
+
LangChain, LlamaIndex, CrewAI, Zalando, Celonis, Vercel,
|
|
267
|
+
FactSet, Morningstar, LSEG, PatSnap, Klarna, MiniMax,
|
|
268
|
+
Apify, Cloudflare Startups
|
|
269
|
+
|
|
270
|
+
### Catatonica — Wellness / Wearables
|
|
271
|
+
Calm (+ partnership form submitted via Monday.com),
|
|
272
|
+
Headspace, Whoop, Oura, WellHub, Eight Sleep
|
|
273
|
+
|
|
274
|
+
### Catatonica — Japan
|
|
275
|
+
Recruit Holdings, LY Corporation (LINE), Mercari,
|
|
276
|
+
DeNA, KDDI, Meiji Yasuda Life
|
|
277
|
+
|
|
278
|
+
### LinkedIn Activity
|
|
279
|
+
Profile post live (origin story), 3 group posts live across
|
|
280
|
+
AI/ML groups — 107+ impressions. Stephen Petersilge
|
|
281
|
+
(Head of BizOps, OpenAI) messaged directly.
|
|
169
282
|
|
|
170
283
|
---
|
|
171
284
|
|
|
172
|
-
##
|
|
285
|
+
## Pending Items
|
|
286
|
+
|
|
287
|
+
| Item | Notes |
|
|
288
|
+
|---|---|
|
|
289
|
+
| Synthesis endpoint `/briefing/now` | Paused — needs ANTHROPIC_KEY in Worker env + credits at console.anthropic.com. Infrastructure fully built. |
|
|
290
|
+
| Apify store description | Still shows old tool count — update to 20 tools |
|
|
291
|
+
| Dashboard (Layer 5) | React frontend for D1 pipeline — designed, not yet built |
|
|
292
|
+
| `extract_gdelt` GKG upgrade | Tone scores, Goldstein scale, event codes — planned |
|
|
293
|
+
| Agnost AI analytics | Free MCP analytics via Apify. Sign up at app.agnost.ai |
|
|
294
|
+
|
|
295
|
+
---
|
|
296
|
+
|
|
297
|
+
## Also Built: Catatonica
|
|
298
|
+
|
|
299
|
+
A second project by the same author.
|
|
173
300
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
301
|
+
Live at: https://catatonica.pages.dev
|
|
302
|
+
Stack: Vanilla HTML/CSS/JS, Cloudflare Pages, Supabase (magic link auth), Stripe
|
|
303
|
+
Pricing: Free / $9/mo Deep / $29/mo The Order
|
|
304
|
+
Philosophy: The Art of Doing Nothing — structured stillness practice for high-intensity minds
|
|
305
|
+
Mechanics: Situations → Sessions → Catatons → Planned Obsolescence → Chronicle
|
|
178
306
|
|
|
179
|
-
|
|
307
|
+
Catatonica is available for separate acquisition or white-label arrangement.
|
|
308
|
+
See HANDOFF.md valuation section above.
|
|
180
309
|
|
|
181
310
|
---
|
|
182
311
|
|