webify-mcp 0.0.1__tar.gz
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.
- webify_mcp-0.0.1/.gitignore +10 -0
- webify_mcp-0.0.1/LICENSE +21 -0
- webify_mcp-0.0.1/PKG-INFO +284 -0
- webify_mcp-0.0.1/README.md +264 -0
- webify_mcp-0.0.1/mcp_server.py +154 -0
- webify_mcp-0.0.1/pyproject.toml +39 -0
- webify_mcp-0.0.1/webify.py +2213 -0
webify_mcp-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 GrapeRoot
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: webify-mcp
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: Adaptive web research for AI coding agents — 91% of Deep Research quality at 5% cost
|
|
5
|
+
Project-URL: Homepage, https://github.com/kunal12203/webify
|
|
6
|
+
Project-URL: Issues, https://github.com/kunal12203/webify/issues
|
|
7
|
+
Author-email: GrapeRoot <support@graperoot.dev>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: ai,claude,graph,mcp,research,retrieval,search,semantic,web
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
17
|
+
Requires-Python: >=3.9
|
|
18
|
+
Requires-Dist: mcp>=1.3.0
|
|
19
|
+
Description-Content-Type: text/markdown
|
|
20
|
+
|
|
21
|
+
# Webify
|
|
22
|
+
|
|
23
|
+
Adaptive web research for AI coding agents. Search the web, build semantic graphs, get synthesized answers — at 5% the cost of deep research tools.
|
|
24
|
+
|
|
25
|
+
A skill by [GrapeRoot](https://graperoot.dev)
|
|
26
|
+
|
|
27
|
+
**Docs:** [中文](docs/README.zh-CN.md) | [日本語](docs/README.ja.md) | [한국어](docs/README.ko.md) | [Español](docs/README.es.md) | [हिन्दी](docs/README.hi.md) | [Français](docs/README.fr.md) | [Deutsch](docs/README.de.md) | [Português](docs/README.pt-BR.md) | [Русский](docs/README.ru.md)
|
|
28
|
+
|
|
29
|
+
## What it does
|
|
30
|
+
|
|
31
|
+
| Tool | Purpose | Cost |
|
|
32
|
+
|------|---------|------|
|
|
33
|
+
| `web_find(query)` | Multi-source web search + synthesis | ~$0.003/query |
|
|
34
|
+
| `web_lookup(url, query)` | Single-page graph retrieval | ~$0.0005/query |
|
|
35
|
+
|
|
36
|
+
**web_find** searches DuckDuckGo, builds semantic graphs from multiple sources in parallel, extracts relevant content via BM25, and synthesizes with Haiku. It adapts depth based on query complexity — simple factual queries hit 3 sources, multi-dimensional research queries scale to 6+ sources with multi-aspect retrieval.
|
|
37
|
+
|
|
38
|
+
**web_lookup** fetches a single page, builds a heading-hierarchy graph, and returns only the relevant nodes (~250-750 tokens instead of 5,000-50,000).
|
|
39
|
+
|
|
40
|
+
## Benchmarks
|
|
41
|
+
|
|
42
|
+
Blind A/B evaluation against Claude's Deep Research on 15 unseen queries (5 tech, 5 non-tech, 5 mixed). Judge: Sonnet, scoring accuracy + completeness + specificity (1-5 each, max 15/query).
|
|
43
|
+
|
|
44
|
+
| Metric | Webify | Deep Research |
|
|
45
|
+
|--------|--------|--------------|
|
|
46
|
+
| Quality score | **68/75** (90.7%) | 73/75 (97.3%) |
|
|
47
|
+
| Cost per query | **~$0.003** | ~$0.05+ |
|
|
48
|
+
| Latency | **30-90s** | 80-280s |
|
|
49
|
+
| Cost efficiency | **18× better** | baseline |
|
|
50
|
+
|
|
51
|
+
Webify achieves 91% of Deep Research quality at 5% of the cost. The gap is always on completeness/specificity, never accuracy — Webify finds correct information but Deep Research finds more of it.
|
|
52
|
+
|
|
53
|
+
<details>
|
|
54
|
+
<summary>Per-query breakdown (unseen validation set)</summary>
|
|
55
|
+
|
|
56
|
+
| Query | Webify | Deep Research | Winner |
|
|
57
|
+
|-------|--------|--------------|--------|
|
|
58
|
+
| Battery degradation mechanisms | 13/15 | 15/15 | Deep |
|
|
59
|
+
| OAuth vs OIDC | 13/15 | 15/15 | Deep |
|
|
60
|
+
| Coral reef bleaching | 14/15 | 15/15 | Deep |
|
|
61
|
+
| CRISPR gene editing | 15/15 | 13/15 | **Webify** |
|
|
62
|
+
| Earthquake tsunami mechanics | 13/15 | 15/15 | Deep |
|
|
63
|
+
|
|
64
|
+
Scoring: (accuracy/completeness/specificity), each 1-5. Blind judge with randomized A/B order.
|
|
65
|
+
</details>
|
|
66
|
+
|
|
67
|
+
## How it works
|
|
68
|
+
|
|
69
|
+
### web_find pipeline
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
Query → Complexity Detection (1-3) → DuckDuckGo Search
|
|
73
|
+
→ Parallel Graph Builds (3-6+ sources)
|
|
74
|
+
→ Multi-Aspect BM25 Extraction
|
|
75
|
+
→ Haiku Synthesis + Raw Fragments
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
Key components:
|
|
79
|
+
- **Adaptive complexity**: Heuristic scoring scales sources, nodes, and synthesis depth
|
|
80
|
+
- **LinUCB contextual bandit**: Learns query reformulation strategies per query type
|
|
81
|
+
- **Multi-aspect retrieval**: Decomposes complex queries into sub-aspects, runs BM25 independently
|
|
82
|
+
- **Domain affinity**: Welford online stats — learns which sites produce quality content
|
|
83
|
+
- **Citation chasing**: Follows primary-source URLs found in pages
|
|
84
|
+
- **No hard caps**: The calling model controls depth by making multiple calls
|
|
85
|
+
|
|
86
|
+
### web_lookup pipeline
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
URL → Fetch → Extract (Readability/NEXT_DATA/JSON-LD)
|
|
90
|
+
→ Build heading-hierarchy graph → Cache (24h)
|
|
91
|
+
Query → BM25 score nodes → BFS traversal → ~250-750 tokens
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Installation
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
pip install webify-mcp
|
|
98
|
+
claude mcp add webify -- webify-mcp
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
That's it. Two commands. Works with any MCP client — see [Tool-Specific Setup](#tool-specific-setup) for VS Code, Cursor, Windsurf, Zed.
|
|
102
|
+
|
|
103
|
+
**Requirements:** Python 3.9+, pip
|
|
104
|
+
|
|
105
|
+
## Updating
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
pip install --upgrade webify-mcp
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## Tool-Specific Setup
|
|
112
|
+
|
|
113
|
+
### Claude Code
|
|
114
|
+
|
|
115
|
+
Already configured during installation. Verify:
|
|
116
|
+
```bash
|
|
117
|
+
claude mcp list # Should show "webify"
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### VS Code (Continue / Cline)
|
|
121
|
+
|
|
122
|
+
Add to `~/.continue/config.json`:
|
|
123
|
+
```json
|
|
124
|
+
{
|
|
125
|
+
"mcpServers": {
|
|
126
|
+
"webify": {
|
|
127
|
+
"command": "webify-mcp"
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Cursor
|
|
134
|
+
|
|
135
|
+
Add to `~/.cursor/mcp.json`:
|
|
136
|
+
```json
|
|
137
|
+
{
|
|
138
|
+
"mcpServers": {
|
|
139
|
+
"webify": {
|
|
140
|
+
"command": "webify-mcp",
|
|
141
|
+
"env": {}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Windsurf
|
|
148
|
+
|
|
149
|
+
Add to `~/.windsurf/settings.json`:
|
|
150
|
+
```json
|
|
151
|
+
{
|
|
152
|
+
"mcp.servers": {
|
|
153
|
+
"webify": {
|
|
154
|
+
"command": "webify-mcp"
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Zed
|
|
161
|
+
|
|
162
|
+
Add to `~/.config/zed/settings.json`:
|
|
163
|
+
```json
|
|
164
|
+
{
|
|
165
|
+
"mcp_servers": {
|
|
166
|
+
"webify": {
|
|
167
|
+
"command": "webify-mcp"
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Other MCP Clients
|
|
174
|
+
|
|
175
|
+
Webify uses stdio transport. Configure with:
|
|
176
|
+
- **Command:** `webify-mcp`
|
|
177
|
+
- **Transport:** stdio
|
|
178
|
+
|
|
179
|
+
## MCP Tools
|
|
180
|
+
|
|
181
|
+
| Tool | Description |
|
|
182
|
+
|------|-------------|
|
|
183
|
+
| `web_find(query)` | Search the web + synthesize multi-source answer |
|
|
184
|
+
| `web_lookup(url, query)` | Retrieve relevant content from a specific URL |
|
|
185
|
+
| `web_build(url)` | Pre-build graph for a URL (cache it) |
|
|
186
|
+
| `web_stats(url)` | Show graph stats for a cached URL |
|
|
187
|
+
|
|
188
|
+
## Usage
|
|
189
|
+
|
|
190
|
+
### As a Claude Code MCP tool
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
> What are the tradeoffs between Raft and Paxos consensus algorithms?
|
|
194
|
+
# Claude uses web_find → searches, builds graphs, synthesizes answer
|
|
195
|
+
|
|
196
|
+
> Look up rate limits in the GitHub REST API docs
|
|
197
|
+
# Claude uses web_lookup → fetches specific page, returns relevant sections
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### As a CLI
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
python webify.py build https://docs.python.org/3/library/json.html
|
|
204
|
+
python webify.py lookup https://docs.python.org/3/library/json.html "parse JSON string"
|
|
205
|
+
python webify.py stats https://docs.python.org/3/library/json.html
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
### As a Python library
|
|
209
|
+
|
|
210
|
+
```python
|
|
211
|
+
import webify
|
|
212
|
+
|
|
213
|
+
# Multi-source web search
|
|
214
|
+
result = webify.web_find("how does mTLS work in service meshes")
|
|
215
|
+
print(result["content"]) # Synthesized answer
|
|
216
|
+
print(result["sources"]) # [{url, title, confidence, tokens}]
|
|
217
|
+
|
|
218
|
+
# Single-page lookup
|
|
219
|
+
result = webify.smart_lookup("https://docs.python.org/3/library/json.html", "parse JSON")
|
|
220
|
+
print(result["content"]) # Relevant sections only (~376 tokens)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Configuration
|
|
224
|
+
|
|
225
|
+
| Env var | Required | Description |
|
|
226
|
+
|---------|----------|-------------|
|
|
227
|
+
| `ANTHROPIC_API_KEY` | For `web_find` | Haiku synthesis + bandit learning |
|
|
228
|
+
| `BRAVE_SEARCH_API_KEY` | Recommended | Reliable search ([free 2k queries/mo](https://brave.com/search/api/)) |
|
|
229
|
+
| `WEBIFY_CACHE_DIR` | No | Cache location (default: `~/.cache/webify`) |
|
|
230
|
+
|
|
231
|
+
**Search priority:** Brave API (if key set) → DuckDuckGo Lite (free, no key, may rate-limit under heavy use).
|
|
232
|
+
|
|
233
|
+
### Setting API Keys
|
|
234
|
+
|
|
235
|
+
**macOS / Linux** — add to `~/.zshrc` or `~/.bashrc`:
|
|
236
|
+
```bash
|
|
237
|
+
export ANTHROPIC_API_KEY="sk-ant-..."
|
|
238
|
+
export BRAVE_SEARCH_API_KEY="BSA..."
|
|
239
|
+
```
|
|
240
|
+
Then restart your terminal or run `source ~/.zshrc`.
|
|
241
|
+
|
|
242
|
+
**Windows (PowerShell)** — set permanently:
|
|
243
|
+
```powershell
|
|
244
|
+
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "sk-ant-...", "User")
|
|
245
|
+
[Environment]::SetEnvironmentVariable("BRAVE_SEARCH_API_KEY", "BSA...", "User")
|
|
246
|
+
```
|
|
247
|
+
Then restart your terminal.
|
|
248
|
+
|
|
249
|
+
**Per-tool env (Claude Code, Cursor, Windsurf)** — add to your MCP config:
|
|
250
|
+
```json
|
|
251
|
+
{
|
|
252
|
+
"mcpServers": {
|
|
253
|
+
"webify": {
|
|
254
|
+
"command": "webify-mcp",
|
|
255
|
+
"env": {
|
|
256
|
+
"ANTHROPIC_API_KEY": "sk-ant-...",
|
|
257
|
+
"BRAVE_SEARCH_API_KEY": "BSA..."
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
**Get your keys:**
|
|
265
|
+
- Anthropic: https://console.anthropic.com/settings/keys
|
|
266
|
+
- Brave Search: https://brave.com/search/api/ (free plan — 2,000 queries/month)
|
|
267
|
+
|
|
268
|
+
## Troubleshooting
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
python3 --version # Must be >= 3.9
|
|
272
|
+
webify-mcp # Test server (Ctrl+C to exit)
|
|
273
|
+
ls ~/.cache/webify/ # Check cache
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Common issues:
|
|
277
|
+
- **"webify-mcp: command not found"** → Run `pip install webify-mcp`
|
|
278
|
+
- **Tool not detected** → Restart your editor after config changes
|
|
279
|
+
- **web_find returns errors** → Set `ANTHROPIC_API_KEY` environment variable
|
|
280
|
+
- **web_find returns "no_results"** → DDG is rate-limiting; set `BRAVE_SEARCH_API_KEY` for reliable search
|
|
281
|
+
|
|
282
|
+
## License
|
|
283
|
+
|
|
284
|
+
[MIT](LICENSE) — Copyright (c) 2026 GrapeRoot
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# Webify
|
|
2
|
+
|
|
3
|
+
Adaptive web research for AI coding agents. Search the web, build semantic graphs, get synthesized answers — at 5% the cost of deep research tools.
|
|
4
|
+
|
|
5
|
+
A skill by [GrapeRoot](https://graperoot.dev)
|
|
6
|
+
|
|
7
|
+
**Docs:** [中文](docs/README.zh-CN.md) | [日本語](docs/README.ja.md) | [한국어](docs/README.ko.md) | [Español](docs/README.es.md) | [हिन्दी](docs/README.hi.md) | [Français](docs/README.fr.md) | [Deutsch](docs/README.de.md) | [Português](docs/README.pt-BR.md) | [Русский](docs/README.ru.md)
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
| Tool | Purpose | Cost |
|
|
12
|
+
|------|---------|------|
|
|
13
|
+
| `web_find(query)` | Multi-source web search + synthesis | ~$0.003/query |
|
|
14
|
+
| `web_lookup(url, query)` | Single-page graph retrieval | ~$0.0005/query |
|
|
15
|
+
|
|
16
|
+
**web_find** searches DuckDuckGo, builds semantic graphs from multiple sources in parallel, extracts relevant content via BM25, and synthesizes with Haiku. It adapts depth based on query complexity — simple factual queries hit 3 sources, multi-dimensional research queries scale to 6+ sources with multi-aspect retrieval.
|
|
17
|
+
|
|
18
|
+
**web_lookup** fetches a single page, builds a heading-hierarchy graph, and returns only the relevant nodes (~250-750 tokens instead of 5,000-50,000).
|
|
19
|
+
|
|
20
|
+
## Benchmarks
|
|
21
|
+
|
|
22
|
+
Blind A/B evaluation against Claude's Deep Research on 15 unseen queries (5 tech, 5 non-tech, 5 mixed). Judge: Sonnet, scoring accuracy + completeness + specificity (1-5 each, max 15/query).
|
|
23
|
+
|
|
24
|
+
| Metric | Webify | Deep Research |
|
|
25
|
+
|--------|--------|--------------|
|
|
26
|
+
| Quality score | **68/75** (90.7%) | 73/75 (97.3%) |
|
|
27
|
+
| Cost per query | **~$0.003** | ~$0.05+ |
|
|
28
|
+
| Latency | **30-90s** | 80-280s |
|
|
29
|
+
| Cost efficiency | **18× better** | baseline |
|
|
30
|
+
|
|
31
|
+
Webify achieves 91% of Deep Research quality at 5% of the cost. The gap is always on completeness/specificity, never accuracy — Webify finds correct information but Deep Research finds more of it.
|
|
32
|
+
|
|
33
|
+
<details>
|
|
34
|
+
<summary>Per-query breakdown (unseen validation set)</summary>
|
|
35
|
+
|
|
36
|
+
| Query | Webify | Deep Research | Winner |
|
|
37
|
+
|-------|--------|--------------|--------|
|
|
38
|
+
| Battery degradation mechanisms | 13/15 | 15/15 | Deep |
|
|
39
|
+
| OAuth vs OIDC | 13/15 | 15/15 | Deep |
|
|
40
|
+
| Coral reef bleaching | 14/15 | 15/15 | Deep |
|
|
41
|
+
| CRISPR gene editing | 15/15 | 13/15 | **Webify** |
|
|
42
|
+
| Earthquake tsunami mechanics | 13/15 | 15/15 | Deep |
|
|
43
|
+
|
|
44
|
+
Scoring: (accuracy/completeness/specificity), each 1-5. Blind judge with randomized A/B order.
|
|
45
|
+
</details>
|
|
46
|
+
|
|
47
|
+
## How it works
|
|
48
|
+
|
|
49
|
+
### web_find pipeline
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
Query → Complexity Detection (1-3) → DuckDuckGo Search
|
|
53
|
+
→ Parallel Graph Builds (3-6+ sources)
|
|
54
|
+
→ Multi-Aspect BM25 Extraction
|
|
55
|
+
→ Haiku Synthesis + Raw Fragments
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Key components:
|
|
59
|
+
- **Adaptive complexity**: Heuristic scoring scales sources, nodes, and synthesis depth
|
|
60
|
+
- **LinUCB contextual bandit**: Learns query reformulation strategies per query type
|
|
61
|
+
- **Multi-aspect retrieval**: Decomposes complex queries into sub-aspects, runs BM25 independently
|
|
62
|
+
- **Domain affinity**: Welford online stats — learns which sites produce quality content
|
|
63
|
+
- **Citation chasing**: Follows primary-source URLs found in pages
|
|
64
|
+
- **No hard caps**: The calling model controls depth by making multiple calls
|
|
65
|
+
|
|
66
|
+
### web_lookup pipeline
|
|
67
|
+
|
|
68
|
+
```
|
|
69
|
+
URL → Fetch → Extract (Readability/NEXT_DATA/JSON-LD)
|
|
70
|
+
→ Build heading-hierarchy graph → Cache (24h)
|
|
71
|
+
Query → BM25 score nodes → BFS traversal → ~250-750 tokens
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Installation
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
pip install webify-mcp
|
|
78
|
+
claude mcp add webify -- webify-mcp
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
That's it. Two commands. Works with any MCP client — see [Tool-Specific Setup](#tool-specific-setup) for VS Code, Cursor, Windsurf, Zed.
|
|
82
|
+
|
|
83
|
+
**Requirements:** Python 3.9+, pip
|
|
84
|
+
|
|
85
|
+
## Updating
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
pip install --upgrade webify-mcp
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Tool-Specific Setup
|
|
92
|
+
|
|
93
|
+
### Claude Code
|
|
94
|
+
|
|
95
|
+
Already configured during installation. Verify:
|
|
96
|
+
```bash
|
|
97
|
+
claude mcp list # Should show "webify"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### VS Code (Continue / Cline)
|
|
101
|
+
|
|
102
|
+
Add to `~/.continue/config.json`:
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"mcpServers": {
|
|
106
|
+
"webify": {
|
|
107
|
+
"command": "webify-mcp"
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
### Cursor
|
|
114
|
+
|
|
115
|
+
Add to `~/.cursor/mcp.json`:
|
|
116
|
+
```json
|
|
117
|
+
{
|
|
118
|
+
"mcpServers": {
|
|
119
|
+
"webify": {
|
|
120
|
+
"command": "webify-mcp",
|
|
121
|
+
"env": {}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Windsurf
|
|
128
|
+
|
|
129
|
+
Add to `~/.windsurf/settings.json`:
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"mcp.servers": {
|
|
133
|
+
"webify": {
|
|
134
|
+
"command": "webify-mcp"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
### Zed
|
|
141
|
+
|
|
142
|
+
Add to `~/.config/zed/settings.json`:
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"mcp_servers": {
|
|
146
|
+
"webify": {
|
|
147
|
+
"command": "webify-mcp"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Other MCP Clients
|
|
154
|
+
|
|
155
|
+
Webify uses stdio transport. Configure with:
|
|
156
|
+
- **Command:** `webify-mcp`
|
|
157
|
+
- **Transport:** stdio
|
|
158
|
+
|
|
159
|
+
## MCP Tools
|
|
160
|
+
|
|
161
|
+
| Tool | Description |
|
|
162
|
+
|------|-------------|
|
|
163
|
+
| `web_find(query)` | Search the web + synthesize multi-source answer |
|
|
164
|
+
| `web_lookup(url, query)` | Retrieve relevant content from a specific URL |
|
|
165
|
+
| `web_build(url)` | Pre-build graph for a URL (cache it) |
|
|
166
|
+
| `web_stats(url)` | Show graph stats for a cached URL |
|
|
167
|
+
|
|
168
|
+
## Usage
|
|
169
|
+
|
|
170
|
+
### As a Claude Code MCP tool
|
|
171
|
+
|
|
172
|
+
```
|
|
173
|
+
> What are the tradeoffs between Raft and Paxos consensus algorithms?
|
|
174
|
+
# Claude uses web_find → searches, builds graphs, synthesizes answer
|
|
175
|
+
|
|
176
|
+
> Look up rate limits in the GitHub REST API docs
|
|
177
|
+
# Claude uses web_lookup → fetches specific page, returns relevant sections
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### As a CLI
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
python webify.py build https://docs.python.org/3/library/json.html
|
|
184
|
+
python webify.py lookup https://docs.python.org/3/library/json.html "parse JSON string"
|
|
185
|
+
python webify.py stats https://docs.python.org/3/library/json.html
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
### As a Python library
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
import webify
|
|
192
|
+
|
|
193
|
+
# Multi-source web search
|
|
194
|
+
result = webify.web_find("how does mTLS work in service meshes")
|
|
195
|
+
print(result["content"]) # Synthesized answer
|
|
196
|
+
print(result["sources"]) # [{url, title, confidence, tokens}]
|
|
197
|
+
|
|
198
|
+
# Single-page lookup
|
|
199
|
+
result = webify.smart_lookup("https://docs.python.org/3/library/json.html", "parse JSON")
|
|
200
|
+
print(result["content"]) # Relevant sections only (~376 tokens)
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Configuration
|
|
204
|
+
|
|
205
|
+
| Env var | Required | Description |
|
|
206
|
+
|---------|----------|-------------|
|
|
207
|
+
| `ANTHROPIC_API_KEY` | For `web_find` | Haiku synthesis + bandit learning |
|
|
208
|
+
| `BRAVE_SEARCH_API_KEY` | Recommended | Reliable search ([free 2k queries/mo](https://brave.com/search/api/)) |
|
|
209
|
+
| `WEBIFY_CACHE_DIR` | No | Cache location (default: `~/.cache/webify`) |
|
|
210
|
+
|
|
211
|
+
**Search priority:** Brave API (if key set) → DuckDuckGo Lite (free, no key, may rate-limit under heavy use).
|
|
212
|
+
|
|
213
|
+
### Setting API Keys
|
|
214
|
+
|
|
215
|
+
**macOS / Linux** — add to `~/.zshrc` or `~/.bashrc`:
|
|
216
|
+
```bash
|
|
217
|
+
export ANTHROPIC_API_KEY="sk-ant-..."
|
|
218
|
+
export BRAVE_SEARCH_API_KEY="BSA..."
|
|
219
|
+
```
|
|
220
|
+
Then restart your terminal or run `source ~/.zshrc`.
|
|
221
|
+
|
|
222
|
+
**Windows (PowerShell)** — set permanently:
|
|
223
|
+
```powershell
|
|
224
|
+
[Environment]::SetEnvironmentVariable("ANTHROPIC_API_KEY", "sk-ant-...", "User")
|
|
225
|
+
[Environment]::SetEnvironmentVariable("BRAVE_SEARCH_API_KEY", "BSA...", "User")
|
|
226
|
+
```
|
|
227
|
+
Then restart your terminal.
|
|
228
|
+
|
|
229
|
+
**Per-tool env (Claude Code, Cursor, Windsurf)** — add to your MCP config:
|
|
230
|
+
```json
|
|
231
|
+
{
|
|
232
|
+
"mcpServers": {
|
|
233
|
+
"webify": {
|
|
234
|
+
"command": "webify-mcp",
|
|
235
|
+
"env": {
|
|
236
|
+
"ANTHROPIC_API_KEY": "sk-ant-...",
|
|
237
|
+
"BRAVE_SEARCH_API_KEY": "BSA..."
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
**Get your keys:**
|
|
245
|
+
- Anthropic: https://console.anthropic.com/settings/keys
|
|
246
|
+
- Brave Search: https://brave.com/search/api/ (free plan — 2,000 queries/month)
|
|
247
|
+
|
|
248
|
+
## Troubleshooting
|
|
249
|
+
|
|
250
|
+
```bash
|
|
251
|
+
python3 --version # Must be >= 3.9
|
|
252
|
+
webify-mcp # Test server (Ctrl+C to exit)
|
|
253
|
+
ls ~/.cache/webify/ # Check cache
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Common issues:
|
|
257
|
+
- **"webify-mcp: command not found"** → Run `pip install webify-mcp`
|
|
258
|
+
- **Tool not detected** → Restart your editor after config changes
|
|
259
|
+
- **web_find returns errors** → Set `ANTHROPIC_API_KEY` environment variable
|
|
260
|
+
- **web_find returns "no_results"** → DDG is rate-limiting; set `BRAVE_SEARCH_API_KEY` for reliable search
|
|
261
|
+
|
|
262
|
+
## License
|
|
263
|
+
|
|
264
|
+
[MIT](LICENSE) — Copyright (c) 2026 GrapeRoot
|