@axiomworks/agentreader-mcp 0.0.0-stage → 1.6.1
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/LICENSE +9 -0
- package/README.md +162 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +376 -0
- package/dist/index.js.map +1 -0
- package/package.json +87 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AgentReader
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,163 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @axiomworks/agentreader-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Axiom Works AgentReader** — stdio [MCP](https://modelcontextprotocol.io) server for AI agents.
|
|
4
|
+
|
|
5
|
+
> Not affiliated with other products named “AgentReader”. This is **Axiom Works AgentReader** at [api.axiomworks.co.uk](https://api.axiomworks.co.uk).
|
|
6
|
+
|
|
7
|
+
26 pay-per-call tools: web → Markdown, UK Companies House & Charity Commission due diligence, Land Registry / area profiles, document conversion, change monitors, EVM wallet/tx/token/ENS/gas/NFT lookups, ECB FX, and open research search.
|
|
8
|
+
|
|
9
|
+
Payments use **[x402](https://x402.org) v2 exact** — **USDC on Base** (`eip155:8453`). No API keys or accounts.
|
|
10
|
+
|
|
11
|
+
- **API:** https://api.axiomworks.co.uk
|
|
12
|
+
- **Remote MCP (streamable HTTP):** https://api.axiomworks.co.uk/mcp
|
|
13
|
+
- **Dashboard:** https://api.axiomworks.co.uk/dashboard
|
|
14
|
+
- **Landing:** https://grokbot1233.github.io/agentreader/
|
|
15
|
+
- **Repo:** https://github.com/grokbot1233/agentreader
|
|
16
|
+
- **Typed JS/TS SDK:** [`@axiomworks/agentreader`](https://www.npmjs.com/package/@axiomworks/agentreader)
|
|
17
|
+
|
|
18
|
+
## Quick start
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx -y @axiomworks/agentreader-mcp
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
### Claude Desktop
|
|
25
|
+
|
|
26
|
+
Add to `claude_desktop_config.json`:
|
|
27
|
+
|
|
28
|
+
```json
|
|
29
|
+
{
|
|
30
|
+
"mcpServers": {
|
|
31
|
+
"agentreader": {
|
|
32
|
+
"command": "npx",
|
|
33
|
+
"args": ["-y", "@axiomworks/agentreader-mcp"],
|
|
34
|
+
"env": {
|
|
35
|
+
"AGENTREADER_PRIVATE_KEY": "0xYOUR_BASE_USDC_PAYER_KEY"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Cursor
|
|
43
|
+
|
|
44
|
+
Add to MCP settings (`.cursor/mcp.json` or Cursor Settings → MCP):
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"mcpServers": {
|
|
49
|
+
"agentreader": {
|
|
50
|
+
"command": "npx",
|
|
51
|
+
"args": ["-y", "@axiomworks/agentreader-mcp"],
|
|
52
|
+
"env": {
|
|
53
|
+
"AGENTREADER_PRIVATE_KEY": "0xYOUR_BASE_USDC_PAYER_KEY"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Claude Code
|
|
61
|
+
|
|
62
|
+
```json
|
|
63
|
+
{
|
|
64
|
+
"mcpServers": {
|
|
65
|
+
"agentreader": {
|
|
66
|
+
"command": "npx",
|
|
67
|
+
"args": ["-y", "@axiomworks/agentreader-mcp"],
|
|
68
|
+
"env": {
|
|
69
|
+
"AGENTREADER_PRIVATE_KEY": "0xYOUR_BASE_USDC_PAYER_KEY"
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Omit `AGENTREADER_PRIVATE_KEY` to explore free **preview** responses (truncated, 8/IP/day) and the free `pricing` tool. Paid calls without a key return a clear `payment_required` payload with x402 requirements.
|
|
77
|
+
|
|
78
|
+
Alternative env names: `EVM_PRIVATE_KEY`, `PRIVATE_KEY`, `X402_PRIVATE_KEY`.
|
|
79
|
+
|
|
80
|
+
Override API origin (advanced): `AGENTREADER_ORIGIN=https://api.axiomworks.co.uk`.
|
|
81
|
+
|
|
82
|
+
### Remote HTTP MCP (no npm)
|
|
83
|
+
|
|
84
|
+
Clients that speak streamable HTTP can use the hosted server directly:
|
|
85
|
+
|
|
86
|
+
```json
|
|
87
|
+
{
|
|
88
|
+
"mcpServers": {
|
|
89
|
+
"agentreader": {
|
|
90
|
+
"url": "https://api.axiomworks.co.uk/mcp"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
(Configure an x402-capable MCP client / wallet for paid tools.)
|
|
97
|
+
|
|
98
|
+
## How payment works (x402)
|
|
99
|
+
|
|
100
|
+
1. Tool call hits a paid HTTP route on `api.axiomworks.co.uk`.
|
|
101
|
+
2. Server responds **HTTP 402** with a `PAYMENT-REQUIRED` header (x402 v2).
|
|
102
|
+
3. With `AGENTREADER_PRIVATE_KEY` set, this package uses [`@x402/fetch`](https://www.npmjs.com/package/@x402/fetch) + [`@x402/evm`](https://www.npmjs.com/package/@x402/evm) `ExactEvmScheme` to sign an EIP-3009 USDC transfer on **Base** and retry.
|
|
103
|
+
4. Facilitator settles; you get the JSON result. **No ETH gas needed** for the payer (EIP-3009).
|
|
104
|
+
|
|
105
|
+
Network: `eip155:8453` · Asset: USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`
|
|
106
|
+
|
|
107
|
+
Fund a Base wallet with a few dollars of USDC for testing. Keep the key offline; never commit it.
|
|
108
|
+
|
|
109
|
+
Without a key, GET tools automatically add `preview=1` so you still see truncated samples.
|
|
110
|
+
|
|
111
|
+
## Tools & prices (USDC)
|
|
112
|
+
|
|
113
|
+
| MCP tool | HTTP | Price | Returns |
|
|
114
|
+
|---|---|---|---|
|
|
115
|
+
| `read_url` | `/read?url=` | $0.002 | Clean Markdown + metadata |
|
|
116
|
+
| `extract_links` | `/links?url=` | $0.001 | De-duplicated absolute links |
|
|
117
|
+
| `check_domain` | `/check?domain=` | $0.001 | DNS/TLS/MX/SPF/DMARC + score |
|
|
118
|
+
| `company_research` | `/company?domain=` | $0.25 | Website company research (sourced) |
|
|
119
|
+
| `uk_company` | `/uk-company?number=` / `name=` | $0.50 | Full UK Companies House DD + red flags |
|
|
120
|
+
| `uk_company_lite` | `/uk-company-lite?...` | $0.05 | UK company snapshot |
|
|
121
|
+
| `company_full` | `/company-full?domain=` | $0.65 | Website research + UK DD when detected |
|
|
122
|
+
| `uk_charity` | `/uk-charity?...` | $0.05 | Charity Commission snapshot |
|
|
123
|
+
| `uk_charity_full` | `/uk-charity-full?...` | $0.25 | Full charity DD + red flags |
|
|
124
|
+
| `convert_document` | `/convert?url=` | $0.03 | PDF/DOCX/HTML → markdown/text |
|
|
125
|
+
| `create_monitor` | `POST /monitor` | $1.00 / 30d | Hourly change → webhook |
|
|
126
|
+
| `wallet_balances` | `/wallet` | $0.003 | EVM balances (5 chains) |
|
|
127
|
+
| `tx_status` | `/tx` | $0.003 | Tx status + decoded transfers |
|
|
128
|
+
| `token_check` | `/token-check` | $0.01 | ERC20 risk score |
|
|
129
|
+
| `fx_rates` | `/fx` | $0.002 | ECB FX + conversion |
|
|
130
|
+
| `ens_lookup` | `/ens` | $0.002 | ENS forward/reverse |
|
|
131
|
+
| `token_metadata` | `/token` | $0.001 | name/symbol/decimals/supply |
|
|
132
|
+
| `token_allowance` | `/allowance` | $0.002 | ERC20 allowance |
|
|
133
|
+
| `contract_info` | `/contract` | $0.003 | Proxy/clone/7702/standards |
|
|
134
|
+
| `gas_fees` | `/gas` | $0.001 | Live gas + USD estimates |
|
|
135
|
+
| `block_lookup` | `/block` | $0.001 | Block by number/time |
|
|
136
|
+
| `nft_lookup` | `/nft` | $0.002 | NFT owner + metadata |
|
|
137
|
+
| `web_search` | `/search?q=` | $0.003 | Wikipedia+OpenAlex+arXiv+Crossref |
|
|
138
|
+
| `uk_property_prices` | `/uk-property` | $0.01 | HM Land Registry near postcode |
|
|
139
|
+
| `uk_area_profile` | `/uk-area` | $0.005 | ONS + police + FSA hygiene |
|
|
140
|
+
| `pricing` | `/.well-known/x402` | **free** | Catalog + payment details |
|
|
141
|
+
|
|
142
|
+
Free discovery also: [`/llms.txt`](https://api.axiomworks.co.uk/llms.txt) · [`/openapi.json`](https://api.axiomworks.co.uk/openapi.json) · [`/samples/:kind`](https://api.axiomworks.co.uk/samples/company) · `/health`
|
|
143
|
+
|
|
144
|
+
## Install
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
npm i -g @axiomworks/agentreader-mcp
|
|
148
|
+
agentreader-mcp
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Or pin in a project:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npm i @axiomworks/agentreader-mcp
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
## Links
|
|
158
|
+
|
|
159
|
+
- npm SDK: https://www.npmjs.com/package/@axiomworks/agentreader
|
|
160
|
+
- Glama listing: https://glama.ai/mcp/servers/grokbot1233/agentreader
|
|
161
|
+
- Contact: info@axiomworks.co.uk
|
|
162
|
+
|
|
163
|
+
MIT © Axiom Works
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
5
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
6
|
+
|
|
7
|
+
// src/tools.ts
|
|
8
|
+
import { z } from "zod";
|
|
9
|
+
var ORIGIN = process.env.AGENTREADER_ORIGIN || "https://api.axiomworks.co.uk";
|
|
10
|
+
var VERSION = "1.6.1";
|
|
11
|
+
var CH = z.enum(["base", "ethereum", "arbitrum", "optimism", "polygon"]).optional();
|
|
12
|
+
var qs = (a) => new URLSearchParams(
|
|
13
|
+
Object.entries(a).filter(([, v]) => v != null && v !== "").map(([k, v]) => [k, String(v)])
|
|
14
|
+
).toString();
|
|
15
|
+
var TOOLS = [
|
|
16
|
+
{
|
|
17
|
+
name: "read_url",
|
|
18
|
+
description: "Use this when you need clean Markdown + metadata from a public URL (not raw HTML). $0.002 USDC on Base via x402.",
|
|
19
|
+
price: "$0.002",
|
|
20
|
+
schema: { url: z.string().url() },
|
|
21
|
+
http: (a) => `${ORIGIN}/read?url=${encodeURIComponent(a.url)}`,
|
|
22
|
+
previewable: true
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: "extract_links",
|
|
26
|
+
description: "Use this when you only need de-duplicated absolute links. $0.001 USDC.",
|
|
27
|
+
price: "$0.001",
|
|
28
|
+
schema: { url: z.string().url() },
|
|
29
|
+
http: (a) => `${ORIGIN}/links?url=${encodeURIComponent(a.url)}`,
|
|
30
|
+
previewable: true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
name: "check_domain",
|
|
34
|
+
description: "Use this when vetting domain health: DNS/TLS/MX/SPF/DMARC + score. $0.001 USDC.",
|
|
35
|
+
price: "$0.001",
|
|
36
|
+
schema: { domain: z.string() },
|
|
37
|
+
http: (a) => `${ORIGIN}/check?domain=${encodeURIComponent(a.domain)}`,
|
|
38
|
+
previewable: true
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: "company_research",
|
|
42
|
+
description: "Website company research (tech, contacts, DNS, RDAP, news) with sources \u2014 not UK Companies House. $0.25 USDC.",
|
|
43
|
+
price: "$0.25",
|
|
44
|
+
schema: { domain: z.string() },
|
|
45
|
+
http: (a) => `${ORIGIN}/company?domain=${encodeURIComponent(a.domain)}`,
|
|
46
|
+
previewable: true
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
name: "uk_company",
|
|
50
|
+
description: "Full UK Companies House due diligence (number or name) + red flags. $0.50 USDC. Prefer uk_company_lite for a cheap snapshot.",
|
|
51
|
+
price: "$0.50",
|
|
52
|
+
schema: { number: z.string().optional(), name: z.string().optional() },
|
|
53
|
+
http: (a) => a.number ? `${ORIGIN}/uk-company?number=${encodeURIComponent(a.number)}` : `${ORIGIN}/uk-company?name=${encodeURIComponent(a.name || "")}`,
|
|
54
|
+
previewable: true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "uk_company_lite",
|
|
58
|
+
description: "Cheap UK company snapshot: status, compliance, red flags. $0.05 USDC.",
|
|
59
|
+
price: "$0.05",
|
|
60
|
+
schema: { number: z.string().optional(), name: z.string().optional() },
|
|
61
|
+
http: (a) => a.number ? `${ORIGIN}/uk-company-lite?number=${encodeURIComponent(a.number)}` : `${ORIGIN}/uk-company-lite?name=${encodeURIComponent(a.name || "")}`,
|
|
62
|
+
previewable: true
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "company_full",
|
|
66
|
+
description: "Website company research + UK CH pack when detected ($0.65 vs $0.75 separate).",
|
|
67
|
+
price: "$0.65",
|
|
68
|
+
schema: { domain: z.string() },
|
|
69
|
+
http: (a) => `${ORIGIN}/company-full?domain=${encodeURIComponent(a.domain)}`,
|
|
70
|
+
previewable: true
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "convert_document",
|
|
74
|
+
description: "Convert public PDF/DOCX/HTML/text URL to markdown or text. $0.03 USDC.",
|
|
75
|
+
price: "$0.03",
|
|
76
|
+
schema: { url: z.string().url(), format: z.enum(["markdown", "text"]).optional() },
|
|
77
|
+
http: (a) => `${ORIGIN}/convert?url=${encodeURIComponent(a.url)}&format=${encodeURIComponent(a.format || "markdown")}`,
|
|
78
|
+
previewable: true
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "create_monitor",
|
|
82
|
+
description: "30-day hourly web change monitor \u2192 webhook. $1.00 USDC. POST body.",
|
|
83
|
+
price: "$1.00",
|
|
84
|
+
schema: {
|
|
85
|
+
url: z.string().url(),
|
|
86
|
+
webhook: z.string().url(),
|
|
87
|
+
selector: z.string().optional(),
|
|
88
|
+
keyword: z.string().optional()
|
|
89
|
+
},
|
|
90
|
+
http: () => `${ORIGIN}/monitor`,
|
|
91
|
+
method: "POST",
|
|
92
|
+
body: (a) => a
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
name: "pricing",
|
|
96
|
+
description: "Free: list Axiom Works AgentReader tools, prices and payment details.",
|
|
97
|
+
price: "free",
|
|
98
|
+
schema: {},
|
|
99
|
+
http: () => `${ORIGIN}/.well-known/x402`,
|
|
100
|
+
free: true
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "wallet_balances",
|
|
104
|
+
description: "EVM wallet balances (native + majors), 5 chains. $0.003 USDC.",
|
|
105
|
+
price: "$0.003",
|
|
106
|
+
schema: { address: z.string(), chain: CH, tokens: z.string().optional() },
|
|
107
|
+
http: (a) => `${ORIGIN}/wallet?${qs(a)}`,
|
|
108
|
+
previewable: true
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
name: "tx_status",
|
|
112
|
+
description: "Did a tx/payment land: status, confirmations, fee, decoded ERC20 transfers. $0.003 USDC.",
|
|
113
|
+
price: "$0.003",
|
|
114
|
+
schema: { hash: z.string(), chain: CH },
|
|
115
|
+
http: (a) => `${ORIGIN}/tx?${qs(a)}`,
|
|
116
|
+
previewable: true
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
name: "token_check",
|
|
120
|
+
description: "ERC20 token risk: owner, proxy, liquidity, flags, score. $0.01 USDC.",
|
|
121
|
+
price: "$0.01",
|
|
122
|
+
schema: { address: z.string(), chain: CH },
|
|
123
|
+
http: (a) => `${ORIGIN}/token-check?${qs(a)}`,
|
|
124
|
+
previewable: true
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: "fx_rates",
|
|
128
|
+
description: "ECB FX rates, latest/historical, with conversion. $0.002 USDC.",
|
|
129
|
+
price: "$0.002",
|
|
130
|
+
schema: {
|
|
131
|
+
base: z.string().optional(),
|
|
132
|
+
symbols: z.string().optional(),
|
|
133
|
+
date: z.string().optional(),
|
|
134
|
+
amount: z.string().optional()
|
|
135
|
+
},
|
|
136
|
+
http: (a) => `${ORIGIN}/fx?${qs(a)}`,
|
|
137
|
+
previewable: true
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: "ens_lookup",
|
|
141
|
+
description: "ENS name -> address + records, or reverse. $0.002 USDC.",
|
|
142
|
+
price: "$0.002",
|
|
143
|
+
schema: { name: z.string().optional(), address: z.string().optional() },
|
|
144
|
+
http: (a) => `${ORIGIN}/ens?${qs(a)}`,
|
|
145
|
+
previewable: true
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
name: "token_metadata",
|
|
149
|
+
description: "ERC20 name/symbol/decimals/supply. $0.001 USDC.",
|
|
150
|
+
price: "$0.001",
|
|
151
|
+
schema: { address: z.string(), chain: CH },
|
|
152
|
+
http: (a) => `${ORIGIN}/token?${qs(a)}`,
|
|
153
|
+
previewable: true
|
|
154
|
+
},
|
|
155
|
+
{
|
|
156
|
+
name: "token_allowance",
|
|
157
|
+
description: "ERC20 allowance owner->spender, unlimited flag. $0.002 USDC.",
|
|
158
|
+
price: "$0.002",
|
|
159
|
+
schema: { token: z.string(), owner: z.string(), spender: z.string(), chain: CH },
|
|
160
|
+
http: (a) => `${ORIGIN}/allowance?${qs(a)}`,
|
|
161
|
+
previewable: true
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
name: "contract_info",
|
|
165
|
+
description: "Contract/proxy/clone/7702/standards/Sourcify name. $0.003 USDC.",
|
|
166
|
+
price: "$0.003",
|
|
167
|
+
schema: { address: z.string(), chain: CH },
|
|
168
|
+
http: (a) => `${ORIGIN}/contract?${qs(a)}`,
|
|
169
|
+
previewable: true
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
name: "gas_fees",
|
|
173
|
+
description: "Current gas fees + USD cost estimates. $0.001 USDC.",
|
|
174
|
+
price: "$0.001",
|
|
175
|
+
schema: { chain: CH },
|
|
176
|
+
http: (a) => `${ORIGIN}/gas?${qs(a)}`,
|
|
177
|
+
previewable: true
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "block_lookup",
|
|
181
|
+
description: "Block by number or timestamp. $0.001 USDC.",
|
|
182
|
+
price: "$0.001",
|
|
183
|
+
schema: { number: z.string().optional(), timestamp: z.string().optional(), chain: CH },
|
|
184
|
+
http: (a) => `${ORIGIN}/block?${qs(a)}`,
|
|
185
|
+
previewable: true
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
name: "nft_lookup",
|
|
189
|
+
description: "NFT owner + metadata. $0.002 USDC.",
|
|
190
|
+
price: "$0.002",
|
|
191
|
+
schema: { contract: z.string(), token_id: z.string(), chain: CH },
|
|
192
|
+
http: (a) => `${ORIGIN}/nft?${qs(a)}`,
|
|
193
|
+
previewable: true
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
name: "web_search",
|
|
197
|
+
description: "Open research search: Wikipedia + OpenAlex + arXiv + Crossref merged, deduped, ranked with snippets. $0.003 USDC.",
|
|
198
|
+
price: "$0.003",
|
|
199
|
+
schema: { q: z.string(), sources: z.string().optional(), limit: z.string().optional() },
|
|
200
|
+
http: (a) => `${ORIGIN}/search?${qs(a)}`,
|
|
201
|
+
previewable: true
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "uk_property_prices",
|
|
205
|
+
description: "England & Wales Land Registry sold prices near a postcode + medians. $0.01 USDC.",
|
|
206
|
+
price: "$0.01",
|
|
207
|
+
schema: { postcode: z.string(), radius: z.string().optional() },
|
|
208
|
+
http: (a) => `${ORIGIN}/uk-property?${qs(a)}`,
|
|
209
|
+
previewable: true
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "uk_area_profile",
|
|
213
|
+
description: "UK postcode profile: ONS geography, police crime, FSA hygiene. $0.005 USDC.",
|
|
214
|
+
price: "$0.005",
|
|
215
|
+
schema: { postcode: z.string() },
|
|
216
|
+
http: (a) => `${ORIGIN}/uk-area?${qs(a)}`,
|
|
217
|
+
previewable: true
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
name: "uk_charity",
|
|
221
|
+
description: "UK Charity Commission snapshot: status, income, trustees count, activities. $0.05 USDC.",
|
|
222
|
+
price: "$0.05",
|
|
223
|
+
schema: {
|
|
224
|
+
number: z.string().optional(),
|
|
225
|
+
name: z.string().optional(),
|
|
226
|
+
suffix: z.string().optional()
|
|
227
|
+
},
|
|
228
|
+
http: (a) => a.number ? `${ORIGIN}/uk-charity?number=${encodeURIComponent(a.number)}${a.suffix != null ? `&suffix=${encodeURIComponent(a.suffix)}` : ""}` : `${ORIGIN}/uk-charity?name=${encodeURIComponent(a.name || "")}`,
|
|
229
|
+
previewable: true
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
name: "uk_charity_full",
|
|
233
|
+
description: "Full UK charity DD: trustees, finances, assets, governance, regulatory + red flags. $0.25 USDC.",
|
|
234
|
+
price: "$0.25",
|
|
235
|
+
schema: {
|
|
236
|
+
number: z.string().optional(),
|
|
237
|
+
name: z.string().optional(),
|
|
238
|
+
suffix: z.string().optional()
|
|
239
|
+
},
|
|
240
|
+
http: (a) => a.number ? `${ORIGIN}/uk-charity-full?number=${encodeURIComponent(a.number)}${a.suffix != null ? `&suffix=${encodeURIComponent(a.suffix)}` : ""}` : `${ORIGIN}/uk-charity-full?name=${encodeURIComponent(a.name || "")}`,
|
|
241
|
+
previewable: true
|
|
242
|
+
}
|
|
243
|
+
];
|
|
244
|
+
|
|
245
|
+
// src/payment.ts
|
|
246
|
+
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
|
|
247
|
+
import { ExactEvmScheme } from "@x402/evm/exact/client";
|
|
248
|
+
import { privateKeyToAccount } from "viem/accounts";
|
|
249
|
+
function resolvePrivateKey() {
|
|
250
|
+
const raw = process.env.AGENTREADER_PRIVATE_KEY || process.env.EVM_PRIVATE_KEY || process.env.PRIVATE_KEY || process.env.X402_PRIVATE_KEY;
|
|
251
|
+
if (!raw) return void 0;
|
|
252
|
+
const key = raw.startsWith("0x") ? raw : `0x${raw}`;
|
|
253
|
+
if (!/^0x[0-9a-fA-F]{64}$/.test(key)) {
|
|
254
|
+
throw new Error(
|
|
255
|
+
"Invalid AGENTREADER_PRIVATE_KEY / EVM_PRIVATE_KEY (expected 32-byte hex with optional 0x)"
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
return key;
|
|
259
|
+
}
|
|
260
|
+
function createFetch() {
|
|
261
|
+
const key = resolvePrivateKey();
|
|
262
|
+
if (!key) return { fetch: globalThis.fetch.bind(globalThis), paying: false };
|
|
263
|
+
const account = privateKeyToAccount(key);
|
|
264
|
+
const client = new x402Client().register("eip155:8453", new ExactEvmScheme(account));
|
|
265
|
+
return { fetch: wrapFetchWithPayment(globalThis.fetch.bind(globalThis), client), paying: true };
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// src/index.ts
|
|
269
|
+
function b64json(header) {
|
|
270
|
+
if (!header) return null;
|
|
271
|
+
try {
|
|
272
|
+
return JSON.parse(Buffer.from(header, "base64").toString("utf8"));
|
|
273
|
+
} catch {
|
|
274
|
+
return { raw: header.slice(0, 200) };
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
function withPreview(url, tool, paying, args) {
|
|
278
|
+
if (paying || tool.free || tool.method === "POST" || !tool.previewable) return url;
|
|
279
|
+
if (args?.preview === false || args?.preview === "0") return url;
|
|
280
|
+
const u = new URL(url);
|
|
281
|
+
if (!u.searchParams.has("preview")) u.searchParams.set("preview", "1");
|
|
282
|
+
return u.toString();
|
|
283
|
+
}
|
|
284
|
+
async function callHttp(tool, args, fetchFn, paying) {
|
|
285
|
+
let url = tool.http(args || {});
|
|
286
|
+
url = withPreview(url, tool, paying, args || {});
|
|
287
|
+
const init = {
|
|
288
|
+
method: tool.method || "GET",
|
|
289
|
+
headers: {
|
|
290
|
+
accept: "application/json",
|
|
291
|
+
"user-agent": `axiomworks-agentreader-mcp/${VERSION}`
|
|
292
|
+
}
|
|
293
|
+
};
|
|
294
|
+
if (tool.method === "POST") {
|
|
295
|
+
init.headers["content-type"] = "application/json";
|
|
296
|
+
init.body = JSON.stringify(tool.body ? tool.body(args) : args);
|
|
297
|
+
}
|
|
298
|
+
const res = await fetchFn(url, init);
|
|
299
|
+
const pr = res.headers.get("payment-required") || res.headers.get("PAYMENT-REQUIRED");
|
|
300
|
+
const text = await res.text();
|
|
301
|
+
let body;
|
|
302
|
+
try {
|
|
303
|
+
body = JSON.parse(text);
|
|
304
|
+
} catch {
|
|
305
|
+
body = { raw: text.slice(0, 2e3) };
|
|
306
|
+
}
|
|
307
|
+
if (res.status === 402 || pr) {
|
|
308
|
+
const payment = b64json(pr);
|
|
309
|
+
return {
|
|
310
|
+
content: [
|
|
311
|
+
{
|
|
312
|
+
type: "text",
|
|
313
|
+
text: JSON.stringify(
|
|
314
|
+
{
|
|
315
|
+
error: "payment_required",
|
|
316
|
+
status: 402,
|
|
317
|
+
message: "This tool is paid via x402 (USDC on Base). Set AGENTREADER_PRIVATE_KEY (or EVM_PRIVATE_KEY) so this MCP server can auto-pay, or retry the HTTP URL with @x402/fetch / @axiomworks/agentreader.",
|
|
318
|
+
paid_http: url.replace(/([?&])preview=1(&|$)/, "$1").replace(/\?$/, ""),
|
|
319
|
+
mcp: `${ORIGIN}/mcp`,
|
|
320
|
+
preview_hint: "Without a key, GET tools are called with preview=1 (free truncated sample, 8/IP/day).",
|
|
321
|
+
payment_required: payment,
|
|
322
|
+
body
|
|
323
|
+
},
|
|
324
|
+
null,
|
|
325
|
+
2
|
|
326
|
+
)
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
if (!res.ok) {
|
|
332
|
+
return {
|
|
333
|
+
isError: true,
|
|
334
|
+
content: [
|
|
335
|
+
{
|
|
336
|
+
type: "text",
|
|
337
|
+
text: JSON.stringify(
|
|
338
|
+
{ error: body?.error || `HTTP ${res.status}`, status: res.status, body },
|
|
339
|
+
null,
|
|
340
|
+
2
|
|
341
|
+
)
|
|
342
|
+
}
|
|
343
|
+
]
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
return {
|
|
347
|
+
content: [{ type: "text", text: typeof body === "string" ? body : JSON.stringify(body) }]
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
async function main() {
|
|
351
|
+
const { fetch: fetchFn, paying } = createFetch();
|
|
352
|
+
const server = new McpServer({
|
|
353
|
+
name: "agentreader",
|
|
354
|
+
title: "Axiom Works AgentReader",
|
|
355
|
+
version: VERSION
|
|
356
|
+
});
|
|
357
|
+
for (const t of TOOLS) {
|
|
358
|
+
server.tool(t.name, t.description, t.schema, async (args) => {
|
|
359
|
+
try {
|
|
360
|
+
return await callHttp(t, args || {}, fetchFn, paying);
|
|
361
|
+
} catch (e) {
|
|
362
|
+
return {
|
|
363
|
+
isError: true,
|
|
364
|
+
content: [{ type: "text", text: String(e?.message || e) }]
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
const transport = new StdioServerTransport();
|
|
370
|
+
await server.connect(transport);
|
|
371
|
+
}
|
|
372
|
+
main().catch((e) => {
|
|
373
|
+
console.error(e);
|
|
374
|
+
process.exit(1);
|
|
375
|
+
});
|
|
376
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/tools.ts","../src/payment.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * @axiomworks/agentreader-mcp\n * Stdio MCP server for Axiom Works AgentReader.\n * Proxies tool calls to https://api.axiomworks.co.uk (same surface as /mcp).\n * Optional AGENTREADER_PRIVATE_KEY / EVM_PRIVATE_KEY enables auto x402 payment (USDC on Base).\n * Without a key, free previews (&preview=1) still work; paid calls return payment requirements.\n */\nimport { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { TOOLS, VERSION, ORIGIN, type ToolDef } from \"./tools.js\";\nimport { createFetch } from \"./payment.js\";\n\nfunction b64json(header: string | null) {\n if (!header) return null;\n try {\n return JSON.parse(Buffer.from(header, \"base64\").toString(\"utf8\"));\n } catch {\n return { raw: header.slice(0, 200) };\n }\n}\n\nfunction withPreview(url: string, tool: ToolDef, paying: boolean, args: Record<string, any>): string {\n if (paying || tool.free || tool.method === \"POST\" || !tool.previewable) return url;\n // Explicit preview:false disables free truncated mode\n if (args?.preview === false || args?.preview === \"0\") return url;\n const u = new URL(url);\n if (!u.searchParams.has(\"preview\")) u.searchParams.set(\"preview\", \"1\");\n return u.toString();\n}\n\nasync function callHttp(\n tool: ToolDef,\n args: Record<string, any>,\n fetchFn: typeof fetch,\n paying: boolean,\n) {\n let url = tool.http(args || {});\n url = withPreview(url, tool, paying, args || {});\n const init: RequestInit = {\n method: tool.method || \"GET\",\n headers: {\n accept: \"application/json\",\n \"user-agent\": `axiomworks-agentreader-mcp/${VERSION}`,\n },\n };\n if (tool.method === \"POST\") {\n (init.headers as Record<string, string>)[\"content-type\"] = \"application/json\";\n init.body = JSON.stringify(tool.body ? tool.body(args) : args);\n }\n const res = await fetchFn(url, init);\n const pr = res.headers.get(\"payment-required\") || res.headers.get(\"PAYMENT-REQUIRED\");\n const text = await res.text();\n let body: any;\n try {\n body = JSON.parse(text);\n } catch {\n body = { raw: text.slice(0, 2000) };\n }\n\n if (res.status === 402 || pr) {\n const payment = b64json(pr);\n return {\n content: [\n {\n type: \"text\" as const,\n text: JSON.stringify(\n {\n error: \"payment_required\",\n status: 402,\n message:\n \"This tool is paid via x402 (USDC on Base). Set AGENTREADER_PRIVATE_KEY (or EVM_PRIVATE_KEY) so this MCP server can auto-pay, or retry the HTTP URL with @x402/fetch / @axiomworks/agentreader.\",\n paid_http: url.replace(/([?&])preview=1(&|$)/, \"$1\").replace(/\\?$/, \"\"),\n mcp: `${ORIGIN}/mcp`,\n preview_hint:\n \"Without a key, GET tools are called with preview=1 (free truncated sample, 8/IP/day).\",\n payment_required: payment,\n body,\n },\n null,\n 2,\n ),\n },\n ],\n };\n }\n if (!res.ok) {\n return {\n isError: true,\n content: [\n {\n type: \"text\" as const,\n text: JSON.stringify(\n { error: body?.error || `HTTP ${res.status}`, status: res.status, body },\n null,\n 2,\n ),\n },\n ],\n };\n }\n return {\n content: [{ type: \"text\" as const, text: typeof body === \"string\" ? body : JSON.stringify(body) }],\n };\n}\n\nasync function main() {\n const { fetch: fetchFn, paying } = createFetch();\n const server = new McpServer({\n name: \"agentreader\",\n title: \"Axiom Works AgentReader\",\n version: VERSION,\n });\n\n for (const t of TOOLS) {\n server.tool(t.name, t.description, t.schema, async (args) => {\n try {\n return await callHttp(t, (args as Record<string, any>) || {}, fetchFn, paying);\n } catch (e: any) {\n return {\n isError: true,\n content: [{ type: \"text\" as const, text: String(e?.message || e) }],\n };\n }\n });\n }\n\n const transport = new StdioServerTransport();\n await server.connect(transport);\n}\n\nmain().catch((e) => {\n console.error(e);\n process.exit(1);\n});\n","import { z } from \"zod\";\n\nexport const ORIGIN = process.env.AGENTREADER_ORIGIN || \"https://api.axiomworks.co.uk\";\nexport const VERSION = \"1.6.1\";\n\nconst CH = z.enum([\"base\", \"ethereum\", \"arbitrum\", \"optimism\", \"polygon\"]).optional();\nconst qs = (a: Record<string, unknown>) =>\n new URLSearchParams(\n Object.entries(a)\n .filter(([, v]) => v != null && v !== \"\")\n .map(([k, v]) => [k, String(v)]),\n ).toString();\n\nexport type ToolDef = {\n name: string;\n description: string;\n price: string;\n schema: Record<string, z.ZodTypeAny>;\n http: (a: Record<string, any>) => string;\n method?: \"GET\" | \"POST\";\n body?: (a: Record<string, any>) => unknown;\n free?: boolean;\n /** When true, unpaid preview mode appends preview=1 */\n previewable?: boolean;\n};\n\nexport const TOOLS: ToolDef[] = [\n {\n name: \"read_url\",\n description:\n \"Use this when you need clean Markdown + metadata from a public URL (not raw HTML). $0.002 USDC on Base via x402.\",\n price: \"$0.002\",\n schema: { url: z.string().url() },\n http: (a) => `${ORIGIN}/read?url=${encodeURIComponent(a.url)}`,\n previewable: true,\n },\n {\n name: \"extract_links\",\n description: \"Use this when you only need de-duplicated absolute links. $0.001 USDC.\",\n price: \"$0.001\",\n schema: { url: z.string().url() },\n http: (a) => `${ORIGIN}/links?url=${encodeURIComponent(a.url)}`,\n previewable: true,\n },\n {\n name: \"check_domain\",\n description: \"Use this when vetting domain health: DNS/TLS/MX/SPF/DMARC + score. $0.001 USDC.\",\n price: \"$0.001\",\n schema: { domain: z.string() },\n http: (a) => `${ORIGIN}/check?domain=${encodeURIComponent(a.domain)}`,\n previewable: true,\n },\n {\n name: \"company_research\",\n description:\n \"Website company research (tech, contacts, DNS, RDAP, news) with sources — not UK Companies House. $0.25 USDC.\",\n price: \"$0.25\",\n schema: { domain: z.string() },\n http: (a) => `${ORIGIN}/company?domain=${encodeURIComponent(a.domain)}`,\n previewable: true,\n },\n {\n name: \"uk_company\",\n description:\n \"Full UK Companies House due diligence (number or name) + red flags. $0.50 USDC. Prefer uk_company_lite for a cheap snapshot.\",\n price: \"$0.50\",\n schema: { number: z.string().optional(), name: z.string().optional() },\n http: (a) =>\n a.number\n ? `${ORIGIN}/uk-company?number=${encodeURIComponent(a.number)}`\n : `${ORIGIN}/uk-company?name=${encodeURIComponent(a.name || \"\")}`,\n previewable: true,\n },\n {\n name: \"uk_company_lite\",\n description: \"Cheap UK company snapshot: status, compliance, red flags. $0.05 USDC.\",\n price: \"$0.05\",\n schema: { number: z.string().optional(), name: z.string().optional() },\n http: (a) =>\n a.number\n ? `${ORIGIN}/uk-company-lite?number=${encodeURIComponent(a.number)}`\n : `${ORIGIN}/uk-company-lite?name=${encodeURIComponent(a.name || \"\")}`,\n previewable: true,\n },\n {\n name: \"company_full\",\n description: \"Website company research + UK CH pack when detected ($0.65 vs $0.75 separate).\",\n price: \"$0.65\",\n schema: { domain: z.string() },\n http: (a) => `${ORIGIN}/company-full?domain=${encodeURIComponent(a.domain)}`,\n previewable: true,\n },\n {\n name: \"convert_document\",\n description: \"Convert public PDF/DOCX/HTML/text URL to markdown or text. $0.03 USDC.\",\n price: \"$0.03\",\n schema: { url: z.string().url(), format: z.enum([\"markdown\", \"text\"]).optional() },\n http: (a) =>\n `${ORIGIN}/convert?url=${encodeURIComponent(a.url)}&format=${encodeURIComponent(a.format || \"markdown\")}`,\n previewable: true,\n },\n {\n name: \"create_monitor\",\n description: \"30-day hourly web change monitor → webhook. $1.00 USDC. POST body.\",\n price: \"$1.00\",\n schema: {\n url: z.string().url(),\n webhook: z.string().url(),\n selector: z.string().optional(),\n keyword: z.string().optional(),\n },\n http: () => `${ORIGIN}/monitor`,\n method: \"POST\",\n body: (a) => a,\n },\n {\n name: \"pricing\",\n description: \"Free: list Axiom Works AgentReader tools, prices and payment details.\",\n price: \"free\",\n schema: {},\n http: () => `${ORIGIN}/.well-known/x402`,\n free: true,\n },\n {\n name: \"wallet_balances\",\n description: \"EVM wallet balances (native + majors), 5 chains. $0.003 USDC.\",\n price: \"$0.003\",\n schema: { address: z.string(), chain: CH, tokens: z.string().optional() },\n http: (a) => `${ORIGIN}/wallet?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"tx_status\",\n description: \"Did a tx/payment land: status, confirmations, fee, decoded ERC20 transfers. $0.003 USDC.\",\n price: \"$0.003\",\n schema: { hash: z.string(), chain: CH },\n http: (a) => `${ORIGIN}/tx?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"token_check\",\n description: \"ERC20 token risk: owner, proxy, liquidity, flags, score. $0.01 USDC.\",\n price: \"$0.01\",\n schema: { address: z.string(), chain: CH },\n http: (a) => `${ORIGIN}/token-check?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"fx_rates\",\n description: \"ECB FX rates, latest/historical, with conversion. $0.002 USDC.\",\n price: \"$0.002\",\n schema: {\n base: z.string().optional(),\n symbols: z.string().optional(),\n date: z.string().optional(),\n amount: z.string().optional(),\n },\n http: (a) => `${ORIGIN}/fx?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"ens_lookup\",\n description: \"ENS name -> address + records, or reverse. $0.002 USDC.\",\n price: \"$0.002\",\n schema: { name: z.string().optional(), address: z.string().optional() },\n http: (a) => `${ORIGIN}/ens?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"token_metadata\",\n description: \"ERC20 name/symbol/decimals/supply. $0.001 USDC.\",\n price: \"$0.001\",\n schema: { address: z.string(), chain: CH },\n http: (a) => `${ORIGIN}/token?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"token_allowance\",\n description: \"ERC20 allowance owner->spender, unlimited flag. $0.002 USDC.\",\n price: \"$0.002\",\n schema: { token: z.string(), owner: z.string(), spender: z.string(), chain: CH },\n http: (a) => `${ORIGIN}/allowance?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"contract_info\",\n description: \"Contract/proxy/clone/7702/standards/Sourcify name. $0.003 USDC.\",\n price: \"$0.003\",\n schema: { address: z.string(), chain: CH },\n http: (a) => `${ORIGIN}/contract?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"gas_fees\",\n description: \"Current gas fees + USD cost estimates. $0.001 USDC.\",\n price: \"$0.001\",\n schema: { chain: CH },\n http: (a) => `${ORIGIN}/gas?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"block_lookup\",\n description: \"Block by number or timestamp. $0.001 USDC.\",\n price: \"$0.001\",\n schema: { number: z.string().optional(), timestamp: z.string().optional(), chain: CH },\n http: (a) => `${ORIGIN}/block?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"nft_lookup\",\n description: \"NFT owner + metadata. $0.002 USDC.\",\n price: \"$0.002\",\n schema: { contract: z.string(), token_id: z.string(), chain: CH },\n http: (a) => `${ORIGIN}/nft?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"web_search\",\n description:\n \"Open research search: Wikipedia + OpenAlex + arXiv + Crossref merged, deduped, ranked with snippets. $0.003 USDC.\",\n price: \"$0.003\",\n schema: { q: z.string(), sources: z.string().optional(), limit: z.string().optional() },\n http: (a) => `${ORIGIN}/search?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"uk_property_prices\",\n description: \"England & Wales Land Registry sold prices near a postcode + medians. $0.01 USDC.\",\n price: \"$0.01\",\n schema: { postcode: z.string(), radius: z.string().optional() },\n http: (a) => `${ORIGIN}/uk-property?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"uk_area_profile\",\n description: \"UK postcode profile: ONS geography, police crime, FSA hygiene. $0.005 USDC.\",\n price: \"$0.005\",\n schema: { postcode: z.string() },\n http: (a) => `${ORIGIN}/uk-area?${qs(a)}`,\n previewable: true,\n },\n {\n name: \"uk_charity\",\n description:\n \"UK Charity Commission snapshot: status, income, trustees count, activities. $0.05 USDC.\",\n price: \"$0.05\",\n schema: {\n number: z.string().optional(),\n name: z.string().optional(),\n suffix: z.string().optional(),\n },\n http: (a) =>\n a.number\n ? `${ORIGIN}/uk-charity?number=${encodeURIComponent(a.number)}${a.suffix != null ? `&suffix=${encodeURIComponent(a.suffix)}` : \"\"}`\n : `${ORIGIN}/uk-charity?name=${encodeURIComponent(a.name || \"\")}`,\n previewable: true,\n },\n {\n name: \"uk_charity_full\",\n description:\n \"Full UK charity DD: trustees, finances, assets, governance, regulatory + red flags. $0.25 USDC.\",\n price: \"$0.25\",\n schema: {\n number: z.string().optional(),\n name: z.string().optional(),\n suffix: z.string().optional(),\n },\n http: (a) =>\n a.number\n ? `${ORIGIN}/uk-charity-full?number=${encodeURIComponent(a.number)}${a.suffix != null ? `&suffix=${encodeURIComponent(a.suffix)}` : \"\"}`\n : `${ORIGIN}/uk-charity-full?name=${encodeURIComponent(a.name || \"\")}`,\n previewable: true,\n },\n];\n","import { wrapFetchWithPayment, x402Client } from \"@x402/fetch\";\nimport { ExactEvmScheme } from \"@x402/evm/exact/client\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nexport type PaidFetch = typeof fetch;\n\n/** Resolve an EVM private key from common env names. */\nexport function resolvePrivateKey(): `0x${string}` | undefined {\n const raw =\n process.env.AGENTREADER_PRIVATE_KEY ||\n process.env.EVM_PRIVATE_KEY ||\n process.env.PRIVATE_KEY ||\n process.env.X402_PRIVATE_KEY;\n if (!raw) return undefined;\n const key = raw.startsWith(\"0x\") ? raw : `0x${raw}`;\n if (!/^0x[0-9a-fA-F]{64}$/.test(key)) {\n throw new Error(\n \"Invalid AGENTREADER_PRIVATE_KEY / EVM_PRIVATE_KEY (expected 32-byte hex with optional 0x)\",\n );\n }\n return key as `0x${string}`;\n}\n\n/** Build a fetch that auto-settles x402 exact USDC on Base when a key is present. */\nexport function createFetch(): { fetch: PaidFetch; paying: boolean } {\n const key = resolvePrivateKey();\n if (!key) return { fetch: globalThis.fetch.bind(globalThis), paying: false };\n const account = privateKeyToAccount(key);\n const client = new x402Client().register(\"eip155:8453\", new ExactEvmScheme(account));\n return { fetch: wrapFetchWithPayment(globalThis.fetch.bind(globalThis), client), paying: true };\n}\n"],"mappings":";;;AAQA,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;;;ACTrC,SAAS,SAAS;AAEX,IAAM,SAAS,QAAQ,IAAI,sBAAsB;AACjD,IAAM,UAAU;AAEvB,IAAM,KAAK,EAAE,KAAK,CAAC,QAAQ,YAAY,YAAY,YAAY,SAAS,CAAC,EAAE,SAAS;AACpF,IAAM,KAAK,CAAC,MACV,IAAI;AAAA,EACF,OAAO,QAAQ,CAAC,EACb,OAAO,CAAC,CAAC,EAAE,CAAC,MAAM,KAAK,QAAQ,MAAM,EAAE,EACvC,IAAI,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;AACnC,EAAE,SAAS;AAeN,IAAM,QAAmB;AAAA,EAC9B;AAAA,IACE,MAAM;AAAA,IACN,aACE;AAAA,IACF,OAAO;AAAA,IACP,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;AAAA,IAChC,MAAM,CAAC,MAAM,GAAG,MAAM,aAAa,mBAAmB,EAAE,GAAG,CAAC;AAAA,IAC5D,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,OAAO;AAAA,IACP,QAAQ,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE;AAAA,IAChC,MAAM,CAAC,MAAM,GAAG,MAAM,cAAc,mBAAmB,EAAE,GAAG,CAAC;AAAA,IAC7D,aAAa;AAAA,EACf;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,aAAa;AAAA,IACb,OAAO;AAAA,IACP,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE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Q,SAAS;AAChC;AAEA,KAAK,EAAE,MAAM,CAAC,MAAM;AAClB,UAAQ,MAAM,CAAC;AACf,UAAQ,KAAK,CAAC;AAChB,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,89 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axiomworks/agentreader-mcp",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "1.6.1",
|
|
4
|
+
"description": "Axiom Works AgentReader stdio MCP server \u2014 26 x402-paid tools (web read, UK Companies House/charity/property, EVM wallet/tx/token/ENS, FX, search). Auto-pays USDC on Base when AGENTREADER_PRIVATE_KEY is set. Run: npx -y @axiomworks/agentreader-mcp",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"mcpName": "io.github.grokbot1233/agentreader",
|
|
7
|
+
"bin": {
|
|
8
|
+
"agentreader-mcp": "dist/index.js"
|
|
9
|
+
},
|
|
10
|
+
"main": "./dist/index.js",
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
".": {
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=18"
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "tsup && node -e \"require('fs').chmodSync('dist/index.js',0o755)\"",
|
|
28
|
+
"prepublishOnly": "npm run build",
|
|
29
|
+
"start": "node dist/index.js"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"mcp",
|
|
33
|
+
"mcp-server",
|
|
34
|
+
"model-context-protocol",
|
|
35
|
+
"x402",
|
|
36
|
+
"ai-agent",
|
|
37
|
+
"agents",
|
|
38
|
+
"agentreader",
|
|
39
|
+
"axiomworks",
|
|
40
|
+
"axiom-works",
|
|
41
|
+
"web-scraping",
|
|
42
|
+
"markdown",
|
|
43
|
+
"companies-house",
|
|
44
|
+
"uk-company",
|
|
45
|
+
"uk-charity",
|
|
46
|
+
"charity-commission",
|
|
47
|
+
"due-diligence",
|
|
48
|
+
"blockchain",
|
|
49
|
+
"base",
|
|
50
|
+
"usdc",
|
|
51
|
+
"crypto",
|
|
52
|
+
"evm",
|
|
53
|
+
"ens",
|
|
54
|
+
"nft",
|
|
55
|
+
"fx",
|
|
56
|
+
"langchain",
|
|
57
|
+
"claude",
|
|
58
|
+
"cursor",
|
|
59
|
+
"claude-desktop",
|
|
60
|
+
"stdio",
|
|
61
|
+
"pay-per-call"
|
|
62
|
+
],
|
|
63
|
+
"author": "Axiom Works <info@axiomworks.co.uk>",
|
|
64
|
+
"license": "MIT",
|
|
65
|
+
"homepage": "https://grokbot1233.github.io/agentreader/",
|
|
66
|
+
"repository": {
|
|
67
|
+
"type": "git",
|
|
68
|
+
"url": "git+https://github.com/grokbot1233/agentreader.git",
|
|
69
|
+
"directory": "packages/agentreader-mcp"
|
|
70
|
+
},
|
|
71
|
+
"bugs": {
|
|
72
|
+
"url": "https://github.com/grokbot1233/agentreader/issues"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
76
|
+
"@x402/evm": "^2.30.0",
|
|
77
|
+
"@x402/fetch": "^2.30.0",
|
|
78
|
+
"viem": "^2.57.0",
|
|
79
|
+
"zod": "^3.25.0"
|
|
80
|
+
},
|
|
81
|
+
"devDependencies": {
|
|
82
|
+
"@types/node": "^22.13.4",
|
|
83
|
+
"tsup": "^8.4.0",
|
|
84
|
+
"typescript": "^5.7.3"
|
|
85
|
+
},
|
|
86
|
+
"allowScripts": {
|
|
87
|
+
"esbuild@0.27.7": true
|
|
88
|
+
}
|
|
89
|
+
}
|