freshcontext-mcp 0.1.0 β 0.1.2
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/README.md +188 -35
- package/package.json +21 -1
package/README.md
CHANGED
|
@@ -1,60 +1,92 @@
|
|
|
1
1
|
# freshcontext-mcp
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> Timestamped web intelligence for AI agents. Every result is wrapped in a **FreshContext envelope** β so your agent always knows *when* it's looking at data, not just *what*.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/freshcontext-mcp)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
---
|
|
4
9
|
|
|
5
10
|
## The Problem
|
|
6
11
|
|
|
7
|
-
LLMs hallucinate recency. They'll cite a 2022 job posting as "current"
|
|
12
|
+
LLMs hallucinate recency. They'll cite a 2022 job posting as "current", recall outdated API docs as if they're live, or tell you a project is active when it hasn't been touched in two years. This happens because they have no reliable signal for *when* data was retrieved vs. when it was published.
|
|
8
13
|
|
|
9
|
-
|
|
14
|
+
Existing MCP servers return raw content. No timestamp. No confidence signal. No way for the agent to know if it's looking at something from this morning or three years ago.
|
|
10
15
|
|
|
11
|
-
|
|
16
|
+
## The Fix: FreshContext Envelope
|
|
12
17
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
Every piece of data extracted by `freshcontext-mcp` is wrapped in a structured envelope:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
[FRESHCONTEXT]
|
|
22
|
+
Source: https://github.com/owner/repo
|
|
23
|
+
Published: 2024-11-03
|
|
24
|
+
Retrieved: 2026-03-03T10:14:00Z
|
|
25
|
+
Confidence: high
|
|
26
|
+
---
|
|
27
|
+
... content ...
|
|
28
|
+
[/FRESHCONTEXT]
|
|
22
29
|
```
|
|
23
30
|
|
|
24
|
-
The AI agent always knows
|
|
31
|
+
The AI agent always knows **when it's looking at data**, not just what the data says. This is the difference between a hallucinated recency claim and a verifiable one.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Tools
|
|
36
|
+
|
|
37
|
+
### π¬ Intelligence Tools
|
|
25
38
|
|
|
26
|
-
|
|
39
|
+
| Tool | Description |
|
|
40
|
+
|---|---|
|
|
41
|
+
| `extract_github` | README, stars, forks, language, topics, last commit from any GitHub repo |
|
|
42
|
+
| `extract_hackernews` | Top stories or search results from HN with scores and timestamps |
|
|
43
|
+
| `extract_scholar` | Research paper titles, authors, years, and snippets from Google Scholar |
|
|
27
44
|
|
|
28
|
-
|
|
29
|
-
|---|---|---|
|
|
30
|
-
| GitHub | `extract_github` | README, stars, forks, last commit, topics |
|
|
31
|
-
| Google Scholar | `extract_scholar` | Titles, authors, years, snippets |
|
|
32
|
-
| Hacker News | `extract_hackernews` | Top stories, scores, post timestamps |
|
|
45
|
+
### π Competitive Intelligence Tools
|
|
33
46
|
|
|
34
|
-
|
|
47
|
+
| Tool | Description |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `extract_yc` | Scrape YC company listings by keyword β find who's funded in your space |
|
|
50
|
+
| `search_repos` | Search GitHub for similar/competing repos, ranked by stars with activity signals |
|
|
51
|
+
| `package_trends` | npm and PyPI package metadata β version history, release cadence, last updated |
|
|
52
|
+
|
|
53
|
+
### πΊοΈ Composite Tool
|
|
54
|
+
|
|
55
|
+
| Tool | Description |
|
|
56
|
+
|---|---|
|
|
57
|
+
| `extract_landscape` | **One call. Full picture.** Queries YC startups + GitHub repos + HN sentiment + package ecosystem simultaneously. Returns a unified landscape report. |
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
## Quick Start
|
|
62
|
+
|
|
63
|
+
### Install via npm
|
|
35
64
|
|
|
36
65
|
```bash
|
|
37
|
-
|
|
38
|
-
cd freshcontext-mcp
|
|
39
|
-
npm install
|
|
40
|
-
npx playwright install chromium
|
|
41
|
-
npm run build
|
|
66
|
+
npx freshcontext-mcp
|
|
42
67
|
```
|
|
43
68
|
|
|
44
|
-
|
|
69
|
+
### Or clone and run locally
|
|
45
70
|
|
|
46
71
|
```bash
|
|
47
|
-
|
|
72
|
+
git clone https://github.com/PrinceGabriel-lgtm/freshcontext-mcp
|
|
73
|
+
cd freshcontext-mcp
|
|
74
|
+
npm install
|
|
75
|
+
npx playwright install chromium
|
|
76
|
+
npm run build
|
|
48
77
|
```
|
|
49
78
|
|
|
50
|
-
|
|
79
|
+
### Connect to Claude Desktop
|
|
51
80
|
|
|
52
81
|
Add to your `claude_desktop_config.json`:
|
|
53
82
|
|
|
83
|
+
**Mac:** `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
84
|
+
**Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
|
|
85
|
+
|
|
54
86
|
```json
|
|
55
87
|
{
|
|
56
88
|
"mcpServers": {
|
|
57
|
-
"freshcontext": {
|
|
89
|
+
"freshcontext-local": {
|
|
58
90
|
"command": "node",
|
|
59
91
|
"args": ["/absolute/path/to/freshcontext-mcp/dist/server.js"]
|
|
60
92
|
}
|
|
@@ -62,10 +94,131 @@ Add to your `claude_desktop_config.json`:
|
|
|
62
94
|
}
|
|
63
95
|
```
|
|
64
96
|
|
|
97
|
+
Restart Claude Desktop. You'll see the freshcontext tools available in your session.
|
|
98
|
+
|
|
99
|
+
### Or use the Cloudflare edge deployment (no install needed)
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"mcpServers": {
|
|
104
|
+
"freshcontext-cloud": {
|
|
105
|
+
"command": "npx",
|
|
106
|
+
"args": ["-y", "mcp-remote", "https://freshcontext-worker.gimmanuel73.workers.dev/mcp"]
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Usage Examples
|
|
115
|
+
|
|
116
|
+
### Check if anyone is already building what you're building
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
Use extract_landscape with topic "cashflow prediction mcp"
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Returns a unified report: who's funded (YC), what's trending (HN), what repos exist (GitHub), what packages are active (npm/PyPI). All timestamped.
|
|
123
|
+
|
|
124
|
+
### Analyse a specific repo
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
Use extract_github on https://github.com/anthropics/anthropic-sdk-python
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Find research papers on a topic
|
|
131
|
+
|
|
132
|
+
```
|
|
133
|
+
Use extract_scholar on https://scholar.google.com/scholar?q=llm+context+freshness
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
### Check package ecosystem health
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
Use package_trends with packages "npm:@modelcontextprotocol/sdk,pypi:langchain"
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Why FreshContext?
|
|
145
|
+
|
|
146
|
+
Most AI agents retrieve data but don't timestamp it. This creates a silent failure mode: the agent presents stale information with the same confidence as fresh information. The user has no way to know the difference.
|
|
147
|
+
|
|
148
|
+
FreshContext treats **retrieval time as first-class metadata**. Every adapter returns:
|
|
149
|
+
|
|
150
|
+
- `retrieved_at` β exact ISO timestamp of when the data was fetched
|
|
151
|
+
- `content_date` β best estimate of when the content was originally published
|
|
152
|
+
- `freshness_confidence` β `high`, `medium`, or `low` based on signal quality
|
|
153
|
+
- `adapter` β which source the data came from
|
|
154
|
+
|
|
155
|
+
This makes freshness **verifiable**, not assumed.
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
## Deployment
|
|
160
|
+
|
|
161
|
+
### Local (Playwright-based)
|
|
162
|
+
Uses headless Chromium via Playwright. Full browser rendering for JavaScript-heavy sites.
|
|
163
|
+
|
|
164
|
+
### Cloud (Cloudflare Workers)
|
|
165
|
+
The `worker/` directory contains a Cloudflare Workers deployment using the Browser Rendering REST API. No Playwright dependency β runs at the edge globally.
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
cd worker
|
|
169
|
+
npm install
|
|
170
|
+
npx wrangler secret put CF_API_TOKEN
|
|
171
|
+
npx wrangler deploy
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## Project Structure
|
|
177
|
+
|
|
178
|
+
```
|
|
179
|
+
freshcontext-mcp/
|
|
180
|
+
βββ src/
|
|
181
|
+
β βββ server.ts # MCP server, all tool registrations
|
|
182
|
+
β βββ types.ts # FreshContext interfaces
|
|
183
|
+
β βββ adapters/
|
|
184
|
+
β β βββ github.ts # GitHub repo extraction
|
|
185
|
+
β β βββ hackernews.ts # HN front page + Algolia API
|
|
186
|
+
β β βββ scholar.ts # Google Scholar scraping
|
|
187
|
+
β β βββ yc.ts # YC company directory
|
|
188
|
+
β β βββ repoSearch.ts # GitHub Search API
|
|
189
|
+
β β βββ packageTrends.ts # npm + PyPI registries
|
|
190
|
+
β βββ tools/
|
|
191
|
+
β βββ freshnessStamp.ts # FreshContext envelope builder
|
|
192
|
+
βββ worker/ # Cloudflare Workers deployment
|
|
193
|
+
βββ src/worker.ts
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
65
198
|
## Roadmap
|
|
66
199
|
|
|
67
|
-
- [
|
|
68
|
-
- [
|
|
69
|
-
- [
|
|
70
|
-
- [
|
|
71
|
-
- [
|
|
200
|
+
- [x] GitHub adapter
|
|
201
|
+
- [x] Hacker News adapter
|
|
202
|
+
- [x] Google Scholar adapter
|
|
203
|
+
- [x] YC startup scraper
|
|
204
|
+
- [x] GitHub repo search
|
|
205
|
+
- [x] npm/PyPI package trends
|
|
206
|
+
- [x] `extract_landscape` composite tool
|
|
207
|
+
- [x] Cloudflare Workers deployment
|
|
208
|
+
- [ ] Product Hunt launches adapter
|
|
209
|
+
- [ ] Crunchbase/funding signals adapter
|
|
210
|
+
- [ ] TTL-based caching layer
|
|
211
|
+
- [ ] `freshness_score` numeric metric
|
|
212
|
+
- [ ] Webhook support for real-time updates
|
|
213
|
+
|
|
214
|
+
---
|
|
215
|
+
|
|
216
|
+
## Contributing
|
|
217
|
+
|
|
218
|
+
PRs welcome. New adapters are the highest-value contribution β see the existing adapters in `src/adapters/` for the pattern. Each adapter returns `{ raw, content_date, freshness_confidence }`.
|
|
219
|
+
|
|
220
|
+
---
|
|
221
|
+
|
|
222
|
+
## License
|
|
223
|
+
|
|
224
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "freshcontext-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Real-time web extraction MCP server with freshness timestamps for AI agents",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"mcp",
|
|
7
|
+
"mcp-server",
|
|
8
|
+
"ai-agents",
|
|
9
|
+
"llm",
|
|
10
|
+
"freshness",
|
|
11
|
+
"web-scraping",
|
|
12
|
+
"github-analytics",
|
|
13
|
+
"hackernews",
|
|
14
|
+
"yc",
|
|
15
|
+
"typescript",
|
|
16
|
+
"context",
|
|
17
|
+
"model-context-protocol"
|
|
18
|
+
],
|
|
19
|
+
"homepage": "https://github.com/PrinceGabriel-lgtm/freshcontext-mcp",
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "https://github.com/PrinceGabriel-lgtm/freshcontext-mcp.git"
|
|
23
|
+
},
|
|
24
|
+
"license": "MIT",
|
|
5
25
|
"type": "module",
|
|
6
26
|
"main": "dist/server.js",
|
|
7
27
|
"scripts": {
|