@continuumdao/continuum-node-sdk 1.3.0 → 1.3.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/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/mcp-resources.d.ts +5 -0
- package/dist/mcp/mcp-resources.d.ts.map +1 -0
- package/dist/mcp/mcp-resources.js +25 -0
- package/dist/mcp/mcp-resources.js.map +1 -0
- package/dist/mcp/register.d.ts +1 -0
- package/dist/mcp/register.d.ts.map +1 -1
- package/dist/mcp/register.js +19 -32
- package/dist/mcp/register.js.map +1 -1
- package/dist/mcp/resources/agent-cron-jobs.md +50 -0
- package/dist/mcp/resources/agent-mcp-servers.md +18 -0
- package/dist/mcp/resources/agent-skills.md +35 -0
- package/dist/mcp/resources/agent-webhooks.md +19 -0
- package/dist/mcp/resources/group.md +70 -0
- package/dist/mcp/resources/keygen.md +175 -0
- package/dist/mcp/resources/management-signer.md +110 -0
- package/dist/mcp/resources/mpc.md +227 -0
- package/dist/mcp/resources/overview.md +64 -0
- package/dist/mcp/resources/registry/address-book.md +53 -0
- package/dist/mcp/resources/registry/networks.md +59 -0
- package/dist/mcp/resources/registry/tokens.md +63 -0
- package/dist/mcp/resources/technical-indicators.md +86 -0
- package/dist/mcp/resources/vpn.md +41 -0
- package/dist/mcp/ta/register.d.ts +1 -0
- package/dist/mcp/ta/register.d.ts.map +1 -1
- package/dist/mcp/ta/register.js +5 -20
- package/dist/mcp/ta/register.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# Technical indicators (continuum-mcp)
|
|
2
|
+
|
|
3
|
+
Tools on the builtin **continuum-mcp** server wrapping [fast-technical-indicators](https://www.npmjs.com/package/fast-technical-indicators). Call **`list_technical_indicators`** first to see required input profiles, then **`calculate_technical_indicator`**.
|
|
4
|
+
|
|
5
|
+
## Input profiles
|
|
6
|
+
|
|
7
|
+
| Profile | Provide in `input` |
|
|
8
|
+
|---------|-------------------|
|
|
9
|
+
| `close_series` | `values` or `close`, or `candles[]` (close extracted) |
|
|
10
|
+
| `ohl_series` | `high`, `low` |
|
|
11
|
+
| `ohlc_series` | `high`, `low`, `close` |
|
|
12
|
+
| `hlcv_series` | `high`, `low`, `close`, `volume` |
|
|
13
|
+
| `ohlcv_series` | `open`, `high`, `low`, `close`, `volume` |
|
|
14
|
+
| `close_volume_series` | `close` (or `values`), `volume` |
|
|
15
|
+
| `candle_objects` | `candles[]` with `{ open, high, low, close, volume? }` |
|
|
16
|
+
| `range_scalar` | `range: { high, low, trend? }` |
|
|
17
|
+
| `dual_series` | `valuesA`, `valuesB` |
|
|
18
|
+
| `special` | `renko`: `candles[]` + `params.brickSize`; `fibonacciProjection`: `values`/`close` + `swingPoints` |
|
|
19
|
+
|
|
20
|
+
All array fields must have equal length where applicable. Max series length defaults to **50_000** (`TA_MCP_MAX_SERIES_LENGTH`).
|
|
21
|
+
|
|
22
|
+
## Warmup
|
|
23
|
+
|
|
24
|
+
Many indicators return `undefined` for initial bars until enough history exists. The response includes **`warmupCount`**. Set **`options.trimWarmup: true`** to drop leading empty slots from **`result`**.
|
|
25
|
+
|
|
26
|
+
## Examples
|
|
27
|
+
|
|
28
|
+
### SMA (close series)
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"indicator": "sma",
|
|
33
|
+
"params": { "period": 3 },
|
|
34
|
+
"input": { "values": [1, 2, 3, 4, 5] },
|
|
35
|
+
"options": { "trimWarmup": true }
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Stochastic (OHLC)
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"indicator": "stochastic",
|
|
44
|
+
"params": { "period": 14, "signalPeriod": 3 },
|
|
45
|
+
"input": {
|
|
46
|
+
"high": [48.7, 48.9, 49.0],
|
|
47
|
+
"low": [47.8, 48.1, 48.2],
|
|
48
|
+
"close": [48.2, 48.6, 48.8]
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### MACD (objects output)
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"indicator": "macd",
|
|
58
|
+
"input": { "values": [44, 44.5, 45, 44.8, 45.2] }
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Fibonacci retracement (levels)
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"indicator": "fibonacci",
|
|
67
|
+
"input": { "range": { "high": 100, "low": 80, "trend": "up" } }
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Doji pattern (booleans)
|
|
72
|
+
|
|
73
|
+
```json
|
|
74
|
+
{
|
|
75
|
+
"indicator": "doji",
|
|
76
|
+
"input": {
|
|
77
|
+
"candles": [
|
|
78
|
+
{ "open": 10, "high": 11, "low": 9, "close": 10.05 }
|
|
79
|
+
]
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Aliases
|
|
85
|
+
|
|
86
|
+
Some indicators accept alternate names (e.g. `ichimokucloud` → `ichimokukinkouhyou`, `keltnerchannels` → `keltnerchannel`, `fibonacciretracement` → `fibonacci`). The response **`indicator`** field always uses the canonical id.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# VPN (admin + egress)
|
|
2
|
+
|
|
3
|
+
WireGuard admin VPN and peer egress flows on the attached node. Read tools use GET management API routes; write and download tools POST management-signed bodies with the preferred Ed25519 management key (same as agent skills and cron jobs).
|
|
4
|
+
|
|
5
|
+
Prerequisites: local management private key in `added_keys/` (see `management-signer.md`), node attached via SDK config.
|
|
6
|
+
|
|
7
|
+
Download tools write client files to **user_folder** (default `MPC_AUTH_USER_FOLDER=/app/user_folder`, host bind mount in Docker). Override with optional `userFolder` on download inputs.
|
|
8
|
+
|
|
9
|
+
## Admin VPN
|
|
10
|
+
|
|
11
|
+
- `get_vpn_status`
|
|
12
|
+
- GET `/vpn/status` — availability, active profile, obfuscation, billing summary.
|
|
13
|
+
- `set_vpn_enabled`
|
|
14
|
+
- POST `/vpn/setEnabled` — `enabled` true/false; when enabling: optional `profile` (`split`|`full`, default `full`), optional `obfuscation`.
|
|
15
|
+
- Triggers host systemd automation via pending VPN file (same as node app Enable/Disable).
|
|
16
|
+
- `download_vpn_admin_client_config`
|
|
17
|
+
- POST `/vpn/clientConfig` — optional `profile`, `obfuscation` (when obfuscated), optional `userFolder`.
|
|
18
|
+
- Saves WireGuard `.conf` (and transport proxy file when obfuscated) under user_folder.
|
|
19
|
+
- Returns `wireGuardPath`, optional `transportPath`, and `setupInstructions` when provided.
|
|
20
|
+
|
|
21
|
+
## Egress (provider + consumer)
|
|
22
|
+
|
|
23
|
+
- `get_vpn_egress_status`
|
|
24
|
+
- GET `/vpn/egress/status` on **this** node when acting as an egress provider.
|
|
25
|
+
- `set_vpn_egress_sharing`
|
|
26
|
+
- POST `/vpn/egress/setSharing` — `enabled`, optional `obfuscation`, optional `defaultRateLimitMbps`.
|
|
27
|
+
- `revoke_vpn_egress_peer`
|
|
28
|
+
- POST `/vpn/egress/revokePeer` — `consumerNodeKey` (128-char hex, lowercase).
|
|
29
|
+
- `list_vpn_egress_exits`
|
|
30
|
+
- GET `/vpn/egress/availableExits` — exit routes discovered from other nodes (`address`, `publicKey`, country, obfuscation, billing fields).
|
|
31
|
+
- `download_vpn_egress_client_config`
|
|
32
|
+
- POST `/vpn/egress/requestClientConfig` — `targetAddress` from an exit row, optional `obfuscation`, optional `userFolder`.
|
|
33
|
+
- Saves `cont-egress.conf` (and transport file when needed) to user_folder.
|
|
34
|
+
|
|
35
|
+
## Typical flows
|
|
36
|
+
|
|
37
|
+
**Admin connect:** `get_vpn_status` → ensure billing month active (MPA VPN tools in `mpc.md`) → `set_vpn_enabled` `{ enabled: true, profile: "full" }` → wait for active status → `download_vpn_admin_client_config`.
|
|
38
|
+
|
|
39
|
+
**Consumer egress:** `list_vpn_egress_exits` → pick `address` → `download_vpn_egress_client_config` `{ targetAddress: "…" }`.
|
|
40
|
+
|
|
41
|
+
**Provider sharing:** `set_vpn_egress_sharing` `{ enabled: true, defaultRateLimitMbps: 20 }` → revoke with `revoke_vpn_egress_peer` when access should end.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import { mcpStructuredContent } from '../tool-utils.js';
|
|
3
3
|
export declare function registerTaTools(server: McpServer): void;
|
|
4
|
+
export declare function registerTaResources(server: McpServer): void;
|
|
4
5
|
export declare function createTaMcpServer(): McpServer;
|
|
5
6
|
export { mcpStructuredContent };
|
|
6
7
|
//# sourceMappingURL=register.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/mcp/ta/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/mcp/ta/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAYlE,OAAO,EAAC,oBAAoB,EAA4B,MAAM,kBAAkB,CAAC;AAEjF,wBAAgB,eAAe,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAuBvD;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAO3D;AAED,wBAAgB,iBAAiB,IAAI,SAAS,CAiB7C;AAED,OAAO,EAAC,oBAAoB,EAAC,CAAC"}
|
package/dist/mcp/ta/register.js
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
|
-
import { promises as fs } from 'node:fs';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
2
|
import { z } from 'zod';
|
|
6
3
|
import { calculateTechnicalIndicator, listTechnicalIndicators, } from '../../core/ta/calculate.js';
|
|
7
4
|
import { CalculateTechnicalIndicatorInputSchema, CalculateTechnicalIndicatorOutputSchema, ListTechnicalIndicatorsOutputSchema, } from '../../core/ta/schemas.js';
|
|
5
|
+
import { registerMcpMarkdownResource } from '../mcp-resources.js';
|
|
8
6
|
import { mcpStructuredContent, sdkResultToCallToolResult } from '../tool-utils.js';
|
|
9
|
-
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
7
|
export function registerTaTools(server) {
|
|
11
8
|
server.registerTool('list_technical_indicators', {
|
|
12
9
|
description: 'List technical indicators available via calculate_technical_indicator: id, category, inputProfile, defaultParams, outputKind. Call this before computing.',
|
|
@@ -19,6 +16,9 @@ export function registerTaTools(server) {
|
|
|
19
16
|
outputSchema: CalculateTechnicalIndicatorOutputSchema,
|
|
20
17
|
}, async (input) => sdkResultToCallToolResult(calculateTechnicalIndicator(input)));
|
|
21
18
|
}
|
|
19
|
+
export function registerTaResources(server) {
|
|
20
|
+
registerMcpMarkdownResource(server, 'technical_indicators_docs', 'technical-indicators.md', 'Technical indicators: input profiles, warmup semantics, and examples.');
|
|
21
|
+
}
|
|
22
22
|
export function createTaMcpServer() {
|
|
23
23
|
const server = new McpServer({
|
|
24
24
|
name: 'continuum-ta-mcp',
|
|
@@ -29,22 +29,7 @@ export function createTaMcpServer() {
|
|
|
29
29
|
},
|
|
30
30
|
});
|
|
31
31
|
registerTaTools(server);
|
|
32
|
-
|
|
33
|
-
server.registerResource('technical-indicators', 'docs://technical-indicators', {
|
|
34
|
-
description: 'Technical indicators MCP usage: input profiles, warmup semantics, and examples.',
|
|
35
|
-
mimeType: 'text/markdown',
|
|
36
|
-
}, async () => {
|
|
37
|
-
const text = await fs.readFile(resourcePath, 'utf8');
|
|
38
|
-
return {
|
|
39
|
-
contents: [
|
|
40
|
-
{
|
|
41
|
-
uri: 'docs://technical-indicators',
|
|
42
|
-
mimeType: 'text/markdown',
|
|
43
|
-
text,
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
};
|
|
47
|
-
});
|
|
32
|
+
registerTaResources(server);
|
|
48
33
|
return server;
|
|
49
34
|
}
|
|
50
35
|
export { mcpStructuredContent };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/mcp/ta/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../../src/mcp/ta/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAClE,OAAO,EAAC,CAAC,EAAC,MAAM,KAAK,CAAC;AACtB,OAAO,EACN,2BAA2B,EAC3B,uBAAuB,GACvB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACN,sCAAsC,EACtC,uCAAuC,EACvC,mCAAmC,GACnC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAC,2BAA2B,EAAC,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAC,oBAAoB,EAAE,yBAAyB,EAAC,MAAM,kBAAkB,CAAC;AAEjF,MAAM,UAAU,eAAe,CAAC,MAAiB;IAChD,MAAM,CAAC,YAAY,CAClB,2BAA2B,EAC3B;QACC,WAAW,EACV,2JAA2J;QAC5J,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,EAAE;QAClC,YAAY,EAAE,mCAAmC;KACjD,EACD,KAAK,IAAI,EAAE,CAAC,yBAAyB,CAAC,uBAAuB,EAAE,CAAC,CAChE,CAAC;IAEF,MAAM,CAAC,YAAY,CAClB,+BAA+B,EAC/B;QACC,WAAW,EACV,iNAAiN;QAClN,WAAW,EAAE,sCAAsC;QACnD,YAAY,EAAE,uCAAuC;KACrD,EACD,KAAK,EAAE,KAA6D,EAAE,EAAE,CACvE,yBAAyB,CAAC,2BAA2B,CAAC,KAAK,CAAC,CAAC,CAC9D,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACpD,2BAA2B,CAC1B,MAAM,EACN,2BAA2B,EAC3B,yBAAyB,EACzB,uEAAuE,CACvE,CAAC;AACH,CAAC;AAED,MAAM,UAAU,iBAAiB;IAChC,MAAM,MAAM,GAAG,IAAI,SAAS,CAC3B;QACC,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,OAAO;KAChB,EACD;QACC,YAAY,EAAE;YACb,KAAK,EAAE,EAAE;SACT;KACD,CACD,CAAC;IAEF,eAAe,CAAC,MAAM,CAAC,CAAC;IACxB,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAE5B,OAAO,MAAM,CAAC;AACf,CAAC;AAED,OAAO,EAAC,oBAAoB,EAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@continuumdao/continuum-node-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"description": "JSON SDK for the Continuum node client management API",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/ContinuumDAO/continuum-node-sdk#readme",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"prebuild": "bash scripts/prebuild-sync-defi.sh",
|
|
33
33
|
"build": "tsc",
|
|
34
|
-
"postbuild": "mkdir -p dist/mcp/
|
|
34
|
+
"postbuild": "mkdir -p dist/mcp/resources && cp -r src/mcp/resources/. dist/mcp/resources/",
|
|
35
35
|
"prepublishOnly": "npm run build",
|
|
36
36
|
"test": "npm run build && node --experimental-strip-types --test 'test/**/*.test.ts'",
|
|
37
37
|
"mcp:start": "node dist/mcp/server/index.js",
|