nanoparse-mcp 1.0.7 → 1.0.9
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 +39 -74
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,102 +1,67 @@
|
|
|
1
1
|
# NanoParse MCP
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](./LICENSE)
|
|
3
|
+
**Give your AI agent clean, structured web content.** NanoParse MCP is a hosted Model Context Protocol server at `https://nanoparse.app/mcp` that turns any URL into clean Markdown your agent can actually use — with machine-readable trust signals attached.
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
No install. No wallet key. No `.env`. Connect once and your agent can read the web.
|
|
7
6
|
|
|
8
|
-
##
|
|
7
|
+
## Quick start
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
Add this to your MCP client config:
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```bash
|
|
21
|
-
npx nanoparse-mcp
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Or install globally:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npm install -g nanoparse-mcp
|
|
11
|
+
```json
|
|
12
|
+
{
|
|
13
|
+
"mcpServers": {
|
|
14
|
+
"nanoparse": {
|
|
15
|
+
"url": "https://nanoparse.app/mcp"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
28
19
|
```
|
|
29
20
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
- Node.js 18+
|
|
33
|
-
- A Base wallet with USDC (after your first 10 free parses)
|
|
34
|
-
- Set `NANOPARSE_WALLET_KEY` in your environment
|
|
35
|
-
|
|
36
|
-
## Getting a wallet
|
|
21
|
+
Restart your client, and your agent auto-discovers two tools:
|
|
37
22
|
|
|
38
|
-
|
|
23
|
+
- **`nanoparse_fetch(url)`** — fetch any web page and get clean Markdown back
|
|
24
|
+
- **`nanoparse_status()`** — check free quota, wallet and USDC balance before spending
|
|
39
25
|
|
|
40
|
-
|
|
26
|
+
That's it. Your agent can now fetch pages from inside any MCP-compatible client (Claude, Cursor, Hermes, Windsurf, and others).
|
|
41
27
|
|
|
42
|
-
|
|
28
|
+
## What you get
|
|
43
29
|
|
|
44
|
-
|
|
45
|
-
cp .env.example .env
|
|
46
|
-
```
|
|
30
|
+
`nanoparse_fetch` renders the page in a real headless browser (JavaScript and all), isolates the actual article from nav, ads, and cookie banners, and returns:
|
|
47
31
|
|
|
48
|
-
|
|
32
|
+
- **Clean Markdown** — GFM tables, callouts, math, and footnotes preserved
|
|
33
|
+
- **Metadata** — title, author, dates, language, word count, OpenGraph, schema.org JSON-LD
|
|
34
|
+
- **Litmus** — machine-readable signals your agent can reason over: source authority, freshness, structural trust, content density, syndication and paywall detection
|
|
49
35
|
|
|
50
|
-
|
|
51
|
-
NANOPARSE_WALLET_KEY=0x_your_private_key_here
|
|
52
|
-
```
|
|
36
|
+
`nanoparse_status` tells your agent exactly where it stands: free parses remaining, wallet and USDC balance, and whether the next call will succeed without payment. Agents call it before spending.
|
|
53
37
|
|
|
54
|
-
|
|
38
|
+
## Payments
|
|
55
39
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
"mcpServers": {
|
|
59
|
-
"nanoparse": {
|
|
60
|
-
"command": "npx",
|
|
61
|
-
"args": ["nanoparse-mcp"]
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
```
|
|
40
|
+
- **First 10 parses per device are free.** No account, no API key, no human required.
|
|
41
|
+
- **After that: $0.01 per parse** (flat, no subscriptions) via **x402** — an open micropayment protocol. Your agent's wallet signs the payment automatically. To give your agent a Coinbase wallet, run `npx @coinbase/payments-mcp` and connect it alongside NanoParse.
|
|
66
42
|
|
|
67
|
-
|
|
43
|
+
## How payments work under the hood
|
|
68
44
|
|
|
69
|
-
|
|
45
|
+
When an agent without free quota calls `nanoparse_fetch`, the endpoint responds with an **HTTP 402 — Payment Required** carrying x402 payment instructions. The agent's wallet signs a $0.01 USDC (Base) transfer, the facilitator settles it, and the parse proceeds. The hosted endpoint handles the entire challenge → settlement flow — the agent never needs a private key on your machine.
|
|
70
46
|
|
|
71
|
-
|
|
47
|
+
## Example
|
|
72
48
|
|
|
73
49
|
```
|
|
74
|
-
|
|
75
|
-
```
|
|
76
|
-
|
|
77
|
-
Optional debug mode:
|
|
50
|
+
You: Fetch https://www.ft.com/content/... and summarize the argument.
|
|
78
51
|
|
|
52
|
+
Agent: [calls nanoparse_fetch(url)]
|
|
53
|
+
→ clean Markdown + Litmus signals
|
|
54
|
+
→ summarizes from primary content, cites freshness and authority
|
|
79
55
|
```
|
|
80
|
-
nanoparse_fetch("https://example.com/article", debug=true)
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
See [`examples/basic-usage.md`](./examples/basic-usage.md) for a full copy-paste runnable example.
|
|
84
|
-
|
|
85
|
-
### Pricing
|
|
86
|
-
|
|
87
|
-
First 10 parses per device are free. After that, **$0.0175 per parse** via x402 micropayment in USDC on Base. See [nanoparse.app](https://nanoparse.app) for current pricing and API docs.
|
|
88
|
-
|
|
89
|
-
## Security
|
|
90
56
|
|
|
91
|
-
|
|
92
|
-
- The `.env` file is excluded from git via `.gitignore`.
|
|
93
|
-
- Payment signing uses [viem](https://viem.sh), an established, audited Ethereum library.
|
|
94
|
-
- This client never constructs raw blockchain transactions — payment settlement is handled by the [x402 facilitator](https://x402.org).
|
|
57
|
+
## Repository note
|
|
95
58
|
|
|
96
|
-
|
|
59
|
+
The `nanoparse-mcp` npm package previously published here was the first-generation local client, which held a wallet private key and signed x402 payments on your machine. It is retired: the hosted MCP endpoint now handles the full payment flow itself, so the local client is no longer needed. **Use the hosted endpoint above** — it is the current, supported integration.
|
|
97
60
|
|
|
98
|
-
|
|
61
|
+
## Docs
|
|
99
62
|
|
|
100
|
-
|
|
63
|
+
- Quick start & integration: [nanoparse.app/quickstart](https://nanoparse.app/quickstart)
|
|
64
|
+
- Compare & pricing: [nanoparse.app/compare](https://nanoparse.app/compare)
|
|
65
|
+
- API + MCP endpoint: [nanoparse.app](https://nanoparse.app)
|
|
101
66
|
|
|
102
|
-
MIT
|
|
67
|
+
MIT licensed.
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextpro
|
|
|
5
5
|
import { fetchPage } from "./fetch.js";
|
|
6
6
|
const server = new Server({
|
|
7
7
|
name: "nanoparse-mcp",
|
|
8
|
-
version: "1.0.
|
|
8
|
+
version: "1.0.9",
|
|
9
9
|
}, {
|
|
10
10
|
capabilities: {
|
|
11
11
|
tools: {},
|
|
@@ -16,7 +16,7 @@ server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
|
16
16
|
{
|
|
17
17
|
name: "nanoparse_fetch",
|
|
18
18
|
description: "Fetch a web page and return clean, structured Markdown with metadata. " +
|
|
19
|
-
"First 10 parses free per device. After that, pay $0.
|
|
19
|
+
"First 10 parses free per device. After that, pay $0.01 USDC on Base via x402. " +
|
|
20
20
|
"No account or API key required.",
|
|
21
21
|
inputSchema: {
|
|
22
22
|
type: "object",
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAEvC,MAAM,MAAM,GAAG,IAAI,MAAM,CACvB;IACE,IAAI,EAAE,eAAe;IACrB,OAAO,EAAE,OAAO;C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