freshcontext-mcp 0.3.3 → 0.3.4
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/USAGE.md +294 -0
- package/dist/adapters/govcontracts.js +60 -30
- package/package.json +1 -1
package/USAGE.md
ADDED
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
# FreshContext — Usage Guide
|
|
2
|
+
> *13 tools. No API keys. Every result timestamped.*
|
|
3
|
+
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Quick Start
|
|
7
|
+
|
|
8
|
+
Add FreshContext to Claude Desktop (no install required):
|
|
9
|
+
|
|
10
|
+
```json
|
|
11
|
+
{
|
|
12
|
+
"mcpServers": {
|
|
13
|
+
"freshcontext": {
|
|
14
|
+
"command": "npx",
|
|
15
|
+
"args": ["-y", "mcp-remote", "https://freshcontext-mcp.gimmanuel73.workers.dev/mcp"]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Restart Claude. Done. All 13 tools are now available.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## The 13 Tools
|
|
26
|
+
|
|
27
|
+
| Tool | What it does | Input |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| `extract_github` | README, stars, forks, last commit | GitHub URL |
|
|
30
|
+
| `extract_hackernews` | Stories + scores with timestamps | HN URL or search query |
|
|
31
|
+
| `extract_scholar` | Research papers ranked by year | Google Scholar URL |
|
|
32
|
+
| `extract_arxiv` | arXiv papers via official API | Search query or arXiv URL |
|
|
33
|
+
| `extract_reddit` | Subreddit posts + community sentiment | Subreddit URL |
|
|
34
|
+
| `extract_yc` | YC company listings by keyword | Topic keyword |
|
|
35
|
+
| `extract_producthunt` | Recent launches by topic | Topic or PH URL |
|
|
36
|
+
| `search_repos` | GitHub repos ranked by stars + recency | Search query |
|
|
37
|
+
| `package_trends` | npm/PyPI metadata + download stats | Package name(s) |
|
|
38
|
+
| `extract_finance` | Live stock data — price, P/E, 52w range | Ticker symbol(s) |
|
|
39
|
+
| `extract_landscape` | 6 sources in one call | Topic keyword |
|
|
40
|
+
| `extract_changelog` | Update history from any product/repo | GitHub URL, npm name, or website URL |
|
|
41
|
+
| `extract_govcontracts` | US federal contract awards | Company name, keyword, or NAICS code |
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Command Reference
|
|
46
|
+
|
|
47
|
+
Copy and paste these directly into Claude.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
### Competitive Research
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
Use extract_landscape with topic "AI data freshness"
|
|
55
|
+
```
|
|
56
|
+
*Full picture: who's funded, what's trending, what repos exist, what packages are moving.*
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
Use search_repos with query "mcp server typescript"
|
|
60
|
+
```
|
|
61
|
+
*GitHub repos ranked by stars. See who's already building in your space.*
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
Use extract_yc with query "developer infrastructure"
|
|
65
|
+
```
|
|
66
|
+
*Which YC companies are funded in your category.*
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
Use extract_producthunt with url "developer tools"
|
|
70
|
+
```
|
|
71
|
+
*What launched this week in your category.*
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### Market Intelligence
|
|
76
|
+
|
|
77
|
+
```
|
|
78
|
+
Use extract_hackernews with url "https://hn.algolia.com/?q=model+context+protocol+2026"
|
|
79
|
+
```
|
|
80
|
+
*What the developer community is saying about a topic right now.*
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
Use extract_reddit with url "https://www.reddit.com/r/MachineLearning/"
|
|
84
|
+
```
|
|
85
|
+
*Subreddit sentiment — what problems people are complaining about or excited about.*
|
|
86
|
+
|
|
87
|
+
```
|
|
88
|
+
Use extract_finance with url "NVDA,MSFT,GOOGL"
|
|
89
|
+
```
|
|
90
|
+
*Live stock data for competitive set. Know the market before a pitch.*
|
|
91
|
+
|
|
92
|
+
```
|
|
93
|
+
Use extract_govcontracts with url "AI infrastructure"
|
|
94
|
+
```
|
|
95
|
+
*Which companies are winning federal AI contracts. High-signal GTM data.*
|
|
96
|
+
|
|
97
|
+
```
|
|
98
|
+
Use extract_govcontracts with url "Palantir"
|
|
99
|
+
```
|
|
100
|
+
*How much government business a specific company is doing — and when.*
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### Job Market Intelligence
|
|
105
|
+
|
|
106
|
+
```
|
|
107
|
+
Use search_jobs with query "AI engineer" location "remote" max_age_days 7
|
|
108
|
+
```
|
|
109
|
+
*Fresh job listings only. Every result has a freshness badge — never apply to a closed role again.*
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
Use search_jobs with query "typescript developer" remote_only true
|
|
113
|
+
```
|
|
114
|
+
*Remote-only filtered results with publish dates.*
|
|
115
|
+
|
|
116
|
+
```
|
|
117
|
+
Use extract_govcontracts with url "541511"
|
|
118
|
+
```
|
|
119
|
+
*NAICS 541511 = Custom Computer Programming Services. See who's hiring via contract awards.*
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Developer Ecosystem Research
|
|
124
|
+
|
|
125
|
+
```
|
|
126
|
+
Use package_trends with url "mcp,wrangler,anthropic"
|
|
127
|
+
```
|
|
128
|
+
*npm download trends for multiple packages. See what's gaining traction.*
|
|
129
|
+
|
|
130
|
+
```
|
|
131
|
+
Use extract_changelog with url "https://github.com/anthropics/anthropic-sdk-python"
|
|
132
|
+
```
|
|
133
|
+
*Latest releases with dates. Know exactly when a dependency shipped a change.*
|
|
134
|
+
|
|
135
|
+
```
|
|
136
|
+
Use extract_changelog with url "freshcontext-mcp"
|
|
137
|
+
```
|
|
138
|
+
*npm package changelog — version history and release cadence.*
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
Use extract_changelog with url "https://linear.app"
|
|
142
|
+
```
|
|
143
|
+
*Auto-discovers the changelog page and extracts update history.*
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
Use search_repos with query "cloudflare workers MCP 2026"
|
|
147
|
+
```
|
|
148
|
+
*What's being built on a platform right now.*
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
### Academic & Research Intelligence
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
Use extract_arxiv with url "https://arxiv.org/search/?query=model+context+protocol&searchtype=all"
|
|
156
|
+
```
|
|
157
|
+
*Latest papers on a topic with submission dates.*
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
Use extract_scholar with url "https://scholar.google.com/scholar?q=AI+agent+grounding"
|
|
161
|
+
```
|
|
162
|
+
*Google Scholar results ranked by recency.*
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Full Research Workflows
|
|
167
|
+
|
|
168
|
+
#### Validate a startup idea
|
|
169
|
+
```
|
|
170
|
+
1. Use extract_landscape with topic "[your idea]"
|
|
171
|
+
2. Use extract_yc with query "[your idea]"
|
|
172
|
+
3. Use extract_govcontracts with url "[your idea keyword]"
|
|
173
|
+
4. Use extract_hackernews with url "https://hn.algolia.com/?q=[your+idea]"
|
|
174
|
+
```
|
|
175
|
+
*Tells you: who's funded, what's trending, is there government demand, what do developers think.*
|
|
176
|
+
|
|
177
|
+
#### Research a company before a meeting
|
|
178
|
+
```
|
|
179
|
+
1. Use extract_github with url "https://github.com/[company]"
|
|
180
|
+
2. Use extract_changelog with url "https://github.com/[company]/[main-repo]"
|
|
181
|
+
3. Use extract_govcontracts with url "[company name]"
|
|
182
|
+
4. Use extract_finance with url "[ticker]"
|
|
183
|
+
```
|
|
184
|
+
*Tells you: how active is their engineering team, what did they ship recently, do they have government contracts, what's the stock doing.*
|
|
185
|
+
|
|
186
|
+
#### Find your next job
|
|
187
|
+
```
|
|
188
|
+
1. Use search_jobs with query "[your role]" max_age_days 7
|
|
189
|
+
2. Use extract_govcontracts with url "[target company]"
|
|
190
|
+
3. Use extract_changelog with url "https://github.com/[target-company]/[repo]"
|
|
191
|
+
```
|
|
192
|
+
*Fresh listings only + proof the company is growing + proof they're actively shipping.*
|
|
193
|
+
|
|
194
|
+
#### Track a competitor
|
|
195
|
+
```
|
|
196
|
+
1. Use extract_changelog with url "https://[competitor].com"
|
|
197
|
+
2. Use extract_github with url "https://github.com/[competitor]/[repo]"
|
|
198
|
+
3. Use package_trends with url "[competitor-npm-package]"
|
|
199
|
+
4. Use extract_hackernews with url "https://hn.algolia.com/?q=[competitor+name]"
|
|
200
|
+
```
|
|
201
|
+
*When did they last ship? Is their repo active? Are downloads growing? What is the community saying?*
|
|
202
|
+
|
|
203
|
+
---
|
|
204
|
+
|
|
205
|
+
## Who This Is For
|
|
206
|
+
|
|
207
|
+
### Jobseekers
|
|
208
|
+
The tool FreshContext was built for. Stop applying to roles that closed months ago. Every job listing comes with a freshness badge — green means posted this week, red means posted 60+ days ago. Filter by `max_age_days` to only see roles posted recently.
|
|
209
|
+
|
|
210
|
+
**Key tools:** `search_jobs`, `extract_govcontracts`, `extract_changelog`
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
### Founders & Product Teams
|
|
215
|
+
Validate ideas, track competitors, monitor your ecosystem. `extract_landscape` gives you a full competitive picture in one call — YC funding, GitHub activity, HN sentiment, Product Hunt launches, npm traction, all timestamped.
|
|
216
|
+
|
|
217
|
+
**Key tools:** `extract_landscape`, `extract_yc`, `extract_changelog`, `extract_hackernews`
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
### GTM & Sales Teams
|
|
222
|
+
Government contracts are buying intent signals. A company that just won a $5M DoD contract is hiring, spending, and building. FreshContext is the only MCP server with access to USASpending.gov contract data.
|
|
223
|
+
|
|
224
|
+
**Key tools:** `extract_govcontracts`, `extract_landscape`, `extract_finance`
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
### Investors & Analysts
|
|
229
|
+
Track portfolio companies, find signals before they're obvious, monitor competitor funding. `extract_govcontracts` shows government contract pipeline. `extract_changelog` shows engineering velocity. `extract_finance` gives live market data.
|
|
230
|
+
|
|
231
|
+
**Key tools:** `extract_govcontracts`, `extract_landscape`, `extract_finance`, `extract_changelog`
|
|
232
|
+
|
|
233
|
+
---
|
|
234
|
+
|
|
235
|
+
### Researchers & Academics
|
|
236
|
+
Fresh papers from arXiv and Google Scholar, ranked by date. Never cite a paper without knowing exactly when it was published and retrieved.
|
|
237
|
+
|
|
238
|
+
**Key tools:** `extract_arxiv`, `extract_scholar`, `extract_hackernews`
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
### Developers & DevRel Teams
|
|
243
|
+
Monitor your dependencies, track ecosystem traction, see what's getting attention in the community. `extract_changelog` works on any GitHub repo, npm package, or website that has a changelog.
|
|
244
|
+
|
|
245
|
+
**Key tools:** `extract_changelog`, `package_trends`, `search_repos`, `extract_github`
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
## Understanding the FreshContext Envelope
|
|
250
|
+
|
|
251
|
+
Every result is wrapped like this:
|
|
252
|
+
|
|
253
|
+
```
|
|
254
|
+
[FRESHCONTEXT]
|
|
255
|
+
Source: https://github.com/owner/repo
|
|
256
|
+
Published: 2026-03-10
|
|
257
|
+
Retrieved: 2026-03-17T09:19:00Z
|
|
258
|
+
Confidence: high
|
|
259
|
+
---
|
|
260
|
+
... content ...
|
|
261
|
+
[/FRESHCONTEXT]
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Confidence levels:**
|
|
265
|
+
- `high` — date came from a structured API field. Reliable.
|
|
266
|
+
- `medium` — date inferred from page signals or URL patterns. Likely correct.
|
|
267
|
+
- `low` — no date signal found. Treat with caution.
|
|
268
|
+
|
|
269
|
+
The gap between `Published` and `Retrieved` is your staleness indicator. If a job was published 90 days ago and retrieved today, the role is likely filled. If a GitHub repo was last pushed 2 years ago, the project may be abandoned.
|
|
270
|
+
|
|
271
|
+
---
|
|
272
|
+
|
|
273
|
+
## Freshness Score (coming in v0.4.0)
|
|
274
|
+
|
|
275
|
+
A numeric score from 0–100 will be added to every result:
|
|
276
|
+
|
|
277
|
+
```
|
|
278
|
+
freshness_score = max(0, 100 - (days_since_retrieved × decay_rate))
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Different data types decay at different rates — financial data goes stale faster than academic papers. You'll be able to filter results by `freshness_score > 70` directly in your prompts.
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## The Standard
|
|
286
|
+
|
|
287
|
+
FreshContext implements the **FreshContext Specification v1.0** — an open standard for data freshness envelopes. See `FRESHCONTEXT_SPEC.md` for the full specification.
|
|
288
|
+
|
|
289
|
+
Any tool or agent that wraps its retrieved data in the FreshContext envelope is **FreshContext-compatible**.
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
*Built by Prince Gabriel — Grootfontein, Namibia 🇳🇦*
|
|
294
|
+
*"The work isn't gone. It's just waiting to be continued."*
|
|
@@ -65,22 +65,37 @@ async function searchByRecipient(query, maxLength) {
|
|
|
65
65
|
order: "desc",
|
|
66
66
|
subawards: false,
|
|
67
67
|
};
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
68
|
+
const controller = new AbortController();
|
|
69
|
+
const timeout = setTimeout(() => controller.abort(), 15000);
|
|
70
|
+
try {
|
|
71
|
+
const res = await fetch("https://api.usaspending.gov/api/v2/search/spending_by_award/", {
|
|
72
|
+
method: "POST",
|
|
73
|
+
headers: {
|
|
74
|
+
"Content-Type": "application/json",
|
|
75
|
+
"Accept": "application/json",
|
|
76
|
+
"User-Agent": "Mozilla/5.0 (compatible; freshcontext-mcp/1.0)",
|
|
77
|
+
"Origin": "https://www.usaspending.gov",
|
|
78
|
+
"Referer": "https://www.usaspending.gov/",
|
|
79
|
+
},
|
|
80
|
+
body: JSON.stringify(body),
|
|
81
|
+
signal: controller.signal,
|
|
82
|
+
});
|
|
83
|
+
clearTimeout(timeout);
|
|
84
|
+
if (!res.ok)
|
|
85
|
+
throw new Error(`USASpending API error: ${res.status} ${res.statusText}`);
|
|
86
|
+
const data = await res.json();
|
|
87
|
+
if (!data.results?.length) {
|
|
88
|
+
return {
|
|
89
|
+
raw: `No federal contracts found for "${query}" in the last 2 years.\n\nThis could mean:\n- The company name differs from the registered recipient name\n- The company operates under a subsidiary name\n- No contracts awarded in this period\n\nTry searching by parent company name or NAICS code.`,
|
|
90
|
+
content_date: null,
|
|
91
|
+
freshness_confidence: "high",
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
return formatResults(data.results, `Federal contracts — ${query}`, maxLength);
|
|
95
|
+
}
|
|
96
|
+
finally {
|
|
97
|
+
clearTimeout(timeout);
|
|
82
98
|
}
|
|
83
|
-
return formatResults(data.results, `Federal contracts — ${query}`, maxLength);
|
|
84
99
|
}
|
|
85
100
|
// ─── Search by keyword ────────────────────────────────────────────────────────
|
|
86
101
|
async function searchByKeyword(keyword, maxLength) {
|
|
@@ -107,22 +122,37 @@ async function searchByKeyword(keyword, maxLength) {
|
|
|
107
122
|
order: "desc",
|
|
108
123
|
subawards: false,
|
|
109
124
|
};
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
const controller = new AbortController();
|
|
126
|
+
const timeout = setTimeout(() => controller.abort(), 15000);
|
|
127
|
+
try {
|
|
128
|
+
const res = await fetch("https://api.usaspending.gov/api/v2/search/spending_by_award/", {
|
|
129
|
+
method: "POST",
|
|
130
|
+
headers: {
|
|
131
|
+
"Content-Type": "application/json",
|
|
132
|
+
"Accept": "application/json",
|
|
133
|
+
"User-Agent": "Mozilla/5.0 (compatible; freshcontext-mcp/1.0)",
|
|
134
|
+
"Origin": "https://www.usaspending.gov",
|
|
135
|
+
"Referer": "https://www.usaspending.gov/",
|
|
136
|
+
},
|
|
137
|
+
body: JSON.stringify(body),
|
|
138
|
+
signal: controller.signal,
|
|
139
|
+
});
|
|
140
|
+
clearTimeout(timeout);
|
|
141
|
+
if (!res.ok)
|
|
142
|
+
throw new Error(`USASpending keyword search error: ${res.status} ${res.statusText}`);
|
|
143
|
+
const data = await res.json();
|
|
144
|
+
if (!data.results?.length) {
|
|
145
|
+
return {
|
|
146
|
+
raw: `No federal contracts found matching keyword "${keyword}" in the last year.`,
|
|
147
|
+
content_date: null,
|
|
148
|
+
freshness_confidence: "high",
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
return formatResults(data.results, `Federal contracts matching "${keyword}"`, maxLength);
|
|
152
|
+
}
|
|
153
|
+
finally {
|
|
154
|
+
clearTimeout(timeout);
|
|
124
155
|
}
|
|
125
|
-
return formatResults(data.results, `Federal contracts matching "${keyword}"`, maxLength);
|
|
126
156
|
}
|
|
127
157
|
// ─── Format results ───────────────────────────────────────────────────────────
|
|
128
158
|
function formatResults(results, title, maxLength) {
|
package/package.json
CHANGED