chain-insights 0.2.20 → 0.2.21

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 CHANGED
@@ -4,12 +4,11 @@
4
4
 
5
5
  Chain Insights is an open-source AML investigation toolkit for AI agents and
6
6
  analysts. Install it from npm to screen blockchain addresses, trace funds,
7
- expand scam topologies, manage case evidence, and generate graph reports from
8
- Chain Insights graph intelligence.
7
+ expand scam topologies, manage case evidence, and generate graph reports.
9
8
 
10
- The hosted GraphRAG MCP access path is paid through x402. The CLI and MCP proxy
11
- handle local wallet status, paid graph calls, approved test access, case files,
12
- evidence pointers, dossiers, and reports.
9
+ Graph access is configuration-driven. The package defaults to a local GraphRAG
10
+ MCP endpoint for development; hosted endpoints are set explicitly with
11
+ `graphMcpEndpoint` or `CHAIN_INSIGHTS_GRAPH_MCP_ENDPOINT`.
13
12
 
14
13
  ## What You Can Do Today
15
14
 
@@ -53,26 +52,32 @@ cd ./chain-insights-investigations
53
52
  cia init .
54
53
  ```
55
54
 
56
- ## Configure MCP server address
55
+ ## Configure GraphRAG MCP Endpoint
57
56
 
58
- `cia` uses `graphMcpEndpoint` for all GraphRAG MCP calls. Configure it explicitly per environment.
57
+ `cia` uses `graphMcpEndpoint` for all GraphRAG MCP calls. The npm package does
58
+ not hardcode a hosted endpoint. Configure the endpoint explicitly for the
59
+ environment you intend to use.
59
60
 
60
- 1. Local GraphRAG MCP (loopback HTTP allowed):
61
+ Local development endpoint (default):
61
62
 
62
63
  ```bash
63
64
  cia config set graphMcpEndpoint http://127.0.0.1:8012/mcp
64
65
  ```
65
66
 
66
- 2. Hosted staging/production GraphRAG MCP (HTTPS required):
67
+ Hosted staging endpoint for approved testers:
67
68
 
68
69
  ```bash
69
70
  cia config set graphMcpEndpoint https://staging-mcp.chain-insights.ai/mcp
70
71
  ```
71
72
 
72
- 3. Optional one-shot override from environment (highest precedence for that process):
73
+ Hosted access also needs an access mode, such as an approved access key or a
74
+ prepared wallet. Keep those credentials out of README examples; setup commands
75
+ live in [MCP proxy](docs/mcp-proxy.md).
76
+
77
+ Optional one-shot override from the environment:
73
78
 
74
79
  ```bash
75
- export CHAIN_INSIGHTS_GRAPH_MCP_ENDPOINT=https://prod-mcp.example.com/mcp
80
+ export CHAIN_INSIGHTS_GRAPH_MCP_ENDPOINT=https://staging-mcp.chain-insights.ai/mcp
76
81
  ```
77
82
 
78
83
  Validation rules:
@@ -91,15 +96,13 @@ Check the configured endpoint and current GraphRAG MCP capabilities:
91
96
 
92
97
  ```bash
93
98
  cia config get graphMcpEndpoint
94
- cia wallet balance
95
99
  cia mcp networks
96
100
  cia mcp tools --refresh
97
101
  ```
98
102
 
99
- GraphRAG MCP calls use x402 paid mode by default unless you configure approved
100
- test access or local debug access. If network or tool discovery fails, fix
101
- endpoint/auth/payment first; the CLI can still initialize workspaces and manage
102
- cases without a reachable GraphRAG MCP endpoint.
103
+ If network or tool discovery fails, check the endpoint and access mode first.
104
+ The CLI can still initialize workspaces and manage cases without a reachable
105
+ GraphRAG MCP endpoint.
103
106
 
104
107
  Open a case and run a small investigation:
105
108
 
@@ -175,7 +178,8 @@ Graph queries must choose the right read layer explicitly:
175
178
  | `facts` | Labels, features, risk scores, assets, and enrichment |
176
179
 
177
180
  Use `graph_query_batch` when related reads should share one call and one
178
- result envelope. Paid hosted calls are settled through x402.
181
+ result envelope. Endpoint access and authentication are configured separately;
182
+ see [MCP proxy](docs/mcp-proxy.md).
179
183
 
180
184
  ## AML Tools
181
185
 
@@ -201,7 +205,7 @@ reports under the workspace instead of embedding large payloads in case notes.
201
205
  | --- | --- |
202
206
  | [Graph tools](docs/graph-tools.md) | GraphRAG MCP layers, `graph_query`, `graph_query_batch`, AML tool contracts, graph reports, evidence pointers |
203
207
  | [Investigation workspaces](docs/investigation-workspaces.md) | `cia init`, case layout, evidence, dossiers, imports, templates, sessions, reports |
204
- | [MCP proxy](docs/mcp-proxy.md) | Stdio proxy behavior, agent installers, local tools, auth modes, Inspector validation |
208
+ | [MCP proxy](docs/mcp-proxy.md) | Stdio proxy behavior, endpoint configuration, agent installers, local tools, auth modes, Inspector validation |
205
209
  | [Architecture](docs/architecture.md) | Product layers, data flow, local storage, security model, config keys |
206
210
  | [Development](docs/development.md) | Build, test, and local install commands |
207
211
  | [Contributing](docs/contributing.md) | Development workflow, pull requests, release expectations |
@@ -59,8 +59,12 @@ Primary GraphRAG MCP config:
59
59
  ```bash
60
60
  chain-insights config get graphMcpEndpoint
61
61
  chain-insights config set graphMcpEndpoint https://staging-mcp.chain-insights.ai/mcp
62
+ export CHAIN_INSIGHTS_GRAPH_MCP_ENDPOINT=https://staging-mcp.chain-insights.ai/mcp
62
63
  ```
63
64
 
65
+ The runtime default is local loopback: `http://127.0.0.1:8012/mcp`. Hosted
66
+ endpoints are operator configuration, not hardcoded package defaults.
67
+
64
68
  Supported config keys:
65
69
 
66
70
  | Key | Purpose |
package/docs/mcp-proxy.md CHANGED
@@ -20,6 +20,47 @@ Use this MCP server configuration:
20
20
 
21
21
  The proxy reads the same local Chain Insights config as the CLI.
22
22
 
23
+ ## GraphRAG MCP Endpoint Configuration
24
+
25
+ The endpoint lives in Chain Insights config, not in the MCP client registration.
26
+ The npm package default is the local development endpoint
27
+ `http://127.0.0.1:8012/mcp`; hosted endpoints must be set explicitly.
28
+
29
+ Set local development:
30
+
31
+ ```bash
32
+ chain-insights config set graphMcpEndpoint http://127.0.0.1:8012/mcp
33
+ ```
34
+
35
+ Set hosted staging for approved testers:
36
+
37
+ ```bash
38
+ chain-insights config set graphMcpEndpoint https://staging-mcp.chain-insights.ai/mcp
39
+ ```
40
+
41
+ Use a one-shot environment override:
42
+
43
+ ```bash
44
+ export CHAIN_INSIGHTS_GRAPH_MCP_ENDPOINT=https://staging-mcp.chain-insights.ai/mcp
45
+ ```
46
+
47
+ Configuration precedence:
48
+
49
+ 1. `CHAIN_INSIGHTS_GRAPH_MCP_ENDPOINT`
50
+ 2. `GRAPH_MCP_ENDPOINT` legacy alias
51
+ 3. saved `graphMcpEndpoint`
52
+ 4. local default `http://127.0.0.1:8012/mcp`
53
+
54
+ Validation rules:
55
+
56
+ - local `http://` is accepted only for localhost and loopback addresses
57
+ - remote endpoints must use `https://`
58
+ - endpoint URLs with credentials, query strings, or fragments are rejected
59
+
60
+ Keep hosted endpoint values in operator config or environment variables. Do not
61
+ bake hosted endpoint URLs into MCP client JSON, source code, or workspace
62
+ templates.
63
+
23
64
  ## Behavior
24
65
 
25
66
  The proxy:
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chain-insights",
3
- "version": "0.2.20",
4
- "description": "AML investigation CLI and MCP proxy for blockchain risk, fund-flow tracing, case reports, and x402-paid GraphRAG MCP access",
3
+ "version": "0.2.21",
4
+ "description": "AML investigation CLI and MCP proxy for blockchain risk, fund-flow tracing, case reports, and GraphRAG MCP access",
5
5
  "homepage": "https://chain-insights.ai",
6
6
  "repository": {
7
7
  "type": "git",