gtxagent-mcp 0.3.2 → 0.4.0
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 +28 -12
- package/bin/gtxagent-mcp-dispatch.mjs +4 -4
- package/bin/gtxagent-mcp-hosted.mjs +11 -10
- package/bin/gtxagent-mcp.mjs +11 -10
- package/package.json +2 -2
- package/server.json +7 -7
package/README.md
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
# gtxagent-mcp
|
|
2
2
|
|
|
3
|
-
MCP bridge for the GTXAgent x402 tools.
|
|
3
|
+
MCP bridge for the GTXAgent x402 tools. One command, three modes:
|
|
4
4
|
|
|
5
|
-
- **
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
- **Keyless (zero setup, default):** with no credential the bridge connects to
|
|
6
|
+
`https://app.gtxagent.com/mcp` unattended. Initialize and `tools/list` always work; the four
|
|
7
|
+
market tools run free, 3 calls per day from your network — enough to install and try it.
|
|
8
|
+
- **Wallet (zero account):** `GTX_X402_BUYER_KEY=0x…` pays each call from your own Base wallet.
|
|
9
|
+
Five decision tools, no signup, no tenant key.
|
|
10
|
+
- **Hosted (prepaid):** `GTX_MCP_KEY=gtx_mcp_…` forwards with a prepaid tenant key. All eleven
|
|
11
|
+
tools, no wallet in the client.
|
|
9
12
|
|
|
10
13
|
New tools and paid-call proofs are posted on the channel: [t.me/gtxagent](https://t.me/gtxagent).
|
|
11
14
|
|
|
@@ -71,7 +74,10 @@ transaction exists. Without `from`, a balance-dependent call is reported as skip
|
|
|
71
74
|
|
|
72
75
|
## Hosted mode
|
|
73
76
|
|
|
74
|
-
The same command runs the hosted path
|
|
77
|
+
The same command runs the hosted path (no wallet needed). With no `GTX_MCP_KEY` it connects keyless:
|
|
78
|
+
initialize and `tools/list` need no account, and the four market tools (`market_pulse`,
|
|
79
|
+
`token_registry`, `token_quote`, `token_decision`) answer free, 3 calls per day from your network;
|
|
80
|
+
the seven aggregate tools answer with a `MCP_KEY_REQUIRED` tool error instead of spending money.
|
|
75
81
|
|
|
76
82
|
```bash
|
|
77
83
|
npx -y gtxagent-mcp
|
|
@@ -79,14 +85,24 @@ npx -y gtxagent-mcp
|
|
|
79
85
|
|
|
80
86
|
| Variable | Required | Meaning |
|
|
81
87
|
|---|---|---|
|
|
82
|
-
| `GTX_MCP_KEY` |
|
|
88
|
+
| `GTX_MCP_KEY` | no | `gtx_mcp_…` prepaid tenant key; omit it for the hosted free tier (3 market-tool calls per day) |
|
|
83
89
|
| `GTX_MCP_URL` | no | defaults to `https://app.gtxagent.com/mcp`; `http://localhost` is allowed for development |
|
|
84
90
|
|
|
85
|
-
The hosted server exposes
|
|
86
|
-
`token_decision`, `
|
|
87
|
-
`
|
|
88
|
-
`credits_available` balance; the per-key daily cap is
|
|
89
|
-
returns a tool error, not a partial result.
|
|
91
|
+
The hosted server exposes fourteen data tools: `market_pulse`, `token_registry`, `token_quote`,
|
|
92
|
+
`token_decision`, `strategy_catalog`, `strategy_krokus`, `strategy_prepa`, `token_safety`,
|
|
93
|
+
`x_search`, `token_price`, `market_open`, `agent_recommend`, `trending_coins`, `whale_coverage`.
|
|
94
|
+
Every call is charged to the tenant's prepaid `credits_available` balance; the per-key daily cap is
|
|
95
|
+
$5 by default. An insufficient balance or cap returns a tool error, not a partial result.
|
|
96
|
+
|
|
97
|
+
| Tool | Price | What it returns |
|
|
98
|
+
|---|---:|---|
|
|
99
|
+
| `strategy_catalog` | $0.005 | Krokus and Prepa: thesis, as_of, freshness, universe size, endpoints |
|
|
100
|
+
| `strategy_krokus` | $0.05 | The Krokus daily funding-flush signal: side, thresholds, decisive features, failed conditions, OOS stats, paper ledger |
|
|
101
|
+
| `strategy_prepa` | $0.05 | The Prepa daily taker-flow signal: side, thresholds, decisive features, failed conditions, OOS stats, paper ledger |
|
|
102
|
+
|
|
103
|
+
Both signal tools are research products, not execution instructions; `symbol` filters one report
|
|
104
|
+
symbol and `include=all` returns the full table. A report older than 36 hours answers
|
|
105
|
+
`STRATEGY_REPORT_STALE` instead of data.
|
|
90
106
|
|
|
91
107
|
Keys are issued per tenant and are not self-service yet. Ask through
|
|
92
108
|
https://gtxagent.com/agents.html or the GTXAgent Telegram bot. The raw key is shown **once**; only a
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
// GTX_X402_BUYER_KEY set -> wallet bridge (zero account, pays per call from your Base wallet)
|
|
5
5
|
// GTX_MCP_KEY set -> hosted bridge (prepaid tenant key, eleven data tools)
|
|
6
|
+
// neither -> hosted bridge keyless (free tier: 3 free market-tool calls per day)
|
|
6
7
|
//
|
|
7
8
|
// The mode is chosen by the environment so `npx -y gtxagent-mcp` is the only command a user needs.
|
|
8
9
|
import { spawn } from 'node:child_process';
|
|
@@ -12,11 +13,10 @@ const hosted = (process.env.GTX_MCP_KEY ?? '').trim();
|
|
|
12
13
|
|
|
13
14
|
if (wallet === '' && hosted === '') {
|
|
14
15
|
console.error([
|
|
15
|
-
'gtxagent-mcp: no credential.',
|
|
16
|
-
'
|
|
17
|
-
'
|
|
16
|
+
'gtxagent-mcp: no credential — starting the hosted keyless free tier.',
|
|
17
|
+
'Free tier: 3 market-tool calls per day, install needs no account.',
|
|
18
|
+
'Full access: export GTX_X402_BUYER_KEY=0x... (wallet bridge) or GTX_MCP_KEY=gtx_mcp_... (prepaid hosted bridge).',
|
|
18
19
|
].join('\n'));
|
|
19
|
-
process.exit(1);
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
const target = wallet !== '' ? './gtxagent-mcp-wallet.mjs' : './gtxagent-mcp.mjs';
|
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
// gtxagent-mcp — stdio MCP bridge to the hosted GTXAgent x402 tools.
|
|
3
3
|
//
|
|
4
4
|
// The client (Claude Desktop, Cursor, any MCP host) speaks stdio to this process; this process
|
|
5
|
-
// speaks Streamable HTTP to https://app.gtxagent.com/mcp
|
|
6
|
-
//
|
|
5
|
+
// speaks Streamable HTTP to https://app.gtxagent.com/mcp. GTX_MCP_KEY is the prepaid tenant key;
|
|
6
|
+
// without one the bridge connects keyless and gets the hosted free tier. The key stays in the
|
|
7
|
+
// environment and is never printed. No wallet, no local GTX account.
|
|
7
8
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
8
9
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
9
10
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
10
11
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
11
12
|
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
12
13
|
|
|
13
|
-
const VERSION = '0.
|
|
14
|
+
const VERSION = '0.4.0';
|
|
14
15
|
const DEFAULT_URL = 'https://app.gtxagent.com/mcp';
|
|
15
16
|
|
|
16
17
|
function fail(message) {
|
|
@@ -31,14 +32,14 @@ function endpoint() {
|
|
|
31
32
|
return url;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
const key = process.env.GTX_MCP_KEY?.trim();
|
|
35
|
-
if (
|
|
36
|
-
if (!/^gtx_mcp_[0-9a-f]{64}$/.test(key)) fail('GTX_MCP_KEY is malformed (expected gtx_mcp_ followed by 64 hex characters)');
|
|
35
|
+
const key = process.env.GTX_MCP_KEY?.trim() || '';
|
|
36
|
+
if (key && !/^gtx_mcp_[0-9a-f]{64}$/.test(key)) fail('GTX_MCP_KEY is malformed (expected gtx_mcp_ followed by 64 hex characters)');
|
|
37
37
|
|
|
38
|
+
// Without a key the hosted endpoint runs its keyless free tier: initialize and tools/list work
|
|
39
|
+
// unattended and the four market tools answer free within the daily allowance.
|
|
40
|
+
const headers = key ? { Authorization: ['Bearer', key].join(' ') } : {};
|
|
38
41
|
const remote = new Client({ name: 'gtxagent-mcp', version: VERSION }, { capabilities: {} });
|
|
39
|
-
const transport = new StreamableHTTPClientTransport(endpoint(), {
|
|
40
|
-
requestInit: { headers: { Authorization: ['Bearer', key].join(' ') } },
|
|
41
|
-
});
|
|
42
|
+
const transport = new StreamableHTTPClientTransport(endpoint(), { requestInit: { headers } });
|
|
42
43
|
|
|
43
44
|
try {
|
|
44
45
|
await remote.connect(transport);
|
|
@@ -64,4 +65,4 @@ process.on('SIGINT', shutdown);
|
|
|
64
65
|
process.on('SIGTERM', shutdown);
|
|
65
66
|
|
|
66
67
|
await server.connect(new StdioServerTransport());
|
|
67
|
-
console.error(`gtxagent-mcp ${VERSION}: connected to ${endpoint().href}`);
|
|
68
|
+
console.error(`gtxagent-mcp ${VERSION}: connected to ${endpoint().href} (${key ? 'prepaid tenant key' : 'keyless free tier: 3 free market-tool calls per day, a prepaid GTX_MCP_KEY unlocks everything'})`);
|
package/bin/gtxagent-mcp.mjs
CHANGED
|
@@ -2,15 +2,16 @@
|
|
|
2
2
|
// gtxagent-mcp — stdio MCP bridge to the hosted GTXAgent x402 tools.
|
|
3
3
|
//
|
|
4
4
|
// The client (Claude Desktop, Cursor, any MCP host) speaks stdio to this process; this process
|
|
5
|
-
// speaks Streamable HTTP to https://app.gtxagent.com/mcp
|
|
6
|
-
//
|
|
5
|
+
// speaks Streamable HTTP to https://app.gtxagent.com/mcp. GTX_MCP_KEY is the prepaid tenant key;
|
|
6
|
+
// without one the bridge connects keyless and gets the hosted free tier. The key stays in the
|
|
7
|
+
// environment and is never printed. No wallet, no local GTX account.
|
|
7
8
|
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
|
|
8
9
|
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
|
|
9
10
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
10
11
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
11
12
|
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
12
13
|
|
|
13
|
-
const VERSION = '0.
|
|
14
|
+
const VERSION = '0.4.0';
|
|
14
15
|
const DEFAULT_URL = 'https://app.gtxagent.com/mcp';
|
|
15
16
|
|
|
16
17
|
function fail(message) {
|
|
@@ -31,14 +32,14 @@ function endpoint() {
|
|
|
31
32
|
return url;
|
|
32
33
|
}
|
|
33
34
|
|
|
34
|
-
const key = process.env.GTX_MCP_KEY?.trim();
|
|
35
|
-
if (
|
|
36
|
-
if (!/^gtx_mcp_[0-9a-f]{64}$/.test(key)) fail('GTX_MCP_KEY is malformed (expected gtx_mcp_ followed by 64 hex characters)');
|
|
35
|
+
const key = process.env.GTX_MCP_KEY?.trim() || '';
|
|
36
|
+
if (key && !/^gtx_mcp_[0-9a-f]{64}$/.test(key)) fail('GTX_MCP_KEY is malformed (expected gtx_mcp_ followed by 64 hex characters)');
|
|
37
37
|
|
|
38
|
+
// Without a key the hosted endpoint runs its keyless free tier: initialize and tools/list work
|
|
39
|
+
// unattended and the four market tools answer free within the daily allowance.
|
|
40
|
+
const headers = key ? { Authorization: ['Bearer', key].join(' ') } : {};
|
|
38
41
|
const remote = new Client({ name: 'gtxagent-mcp', version: VERSION }, { capabilities: {} });
|
|
39
|
-
const transport = new StreamableHTTPClientTransport(endpoint(), {
|
|
40
|
-
requestInit: { headers: { Authorization: ['Bearer', key].join(' ') } },
|
|
41
|
-
});
|
|
42
|
+
const transport = new StreamableHTTPClientTransport(endpoint(), { requestInit: { headers } });
|
|
42
43
|
|
|
43
44
|
try {
|
|
44
45
|
await remote.connect(transport);
|
|
@@ -64,4 +65,4 @@ process.on('SIGINT', shutdown);
|
|
|
64
65
|
process.on('SIGTERM', shutdown);
|
|
65
66
|
|
|
66
67
|
await server.connect(new StdioServerTransport());
|
|
67
|
-
console.error(`gtxagent-mcp ${VERSION}: connected to ${endpoint().href}`);
|
|
68
|
+
console.error(`gtxagent-mcp ${VERSION}: connected to ${endpoint().href} (${key ? 'prepaid tenant key' : 'keyless free tier: 3 free market-tool calls per day, a prepaid GTX_MCP_KEY unlocks everything'})`);
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gtxagent-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"mcpName": "com.gtxagent/gtxagent-mcp",
|
|
5
|
-
"description": "GTXAgent x402 tools for MCP clients: a zero-account wallet bridge with five decision tools (verdict, preflight, preflight full, position risk, wallet dossier) and a hosted
|
|
5
|
+
"description": "GTXAgent x402 tools for MCP clients: a zero-account wallet bridge with five decision tools (verdict, preflight, preflight full, position risk, wallet dossier) and a hosted mode that also installs keyless (3 free calls a day) with the daily Krokus and Prepa research signals.",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
8
|
"gtxagent-mcp": "bin/gtxagent-mcp-dispatch.mjs",
|
package/server.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
|
|
3
3
|
"name": "com.gtxagent/gtxagent-mcp",
|
|
4
|
-
"description": "
|
|
5
|
-
"version": "0.
|
|
4
|
+
"description": "Paid x402 crypto tools for AI agents. Installs keyless with 3 free calls a day; a key unlocks all, including the daily Krokus and Prepa research signals.",
|
|
5
|
+
"version": "0.4.0",
|
|
6
6
|
"websiteUrl": "https://gtxagent.com/agents.html",
|
|
7
7
|
"packages": [
|
|
8
8
|
{
|
|
9
9
|
"registryType": "npm",
|
|
10
10
|
"identifier": "gtxagent-mcp",
|
|
11
|
-
"version": "0.3.
|
|
11
|
+
"version": "0.3.3",
|
|
12
12
|
"transport": {
|
|
13
13
|
"type": "stdio"
|
|
14
14
|
},
|
|
15
15
|
"environmentVariables": [
|
|
16
16
|
{
|
|
17
17
|
"name": "GTX_MCP_KEY",
|
|
18
|
-
"description": "
|
|
19
|
-
"isRequired":
|
|
18
|
+
"description": "Optional prepaid tenant key; without it the hosted free tier applies (3 calls/day)",
|
|
19
|
+
"isRequired": false,
|
|
20
20
|
"isSecret": true,
|
|
21
21
|
"format": "string"
|
|
22
22
|
},
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"headers": [
|
|
38
38
|
{
|
|
39
39
|
"name": "Authorization",
|
|
40
|
-
"description": "Bearer gtx_mcp_
|
|
41
|
-
"isRequired":
|
|
40
|
+
"description": "Optional: Bearer gtx_mcp_\u2026 prepaid tenant key; omit for the free tier",
|
|
41
|
+
"isRequired": false,
|
|
42
42
|
"isSecret": true,
|
|
43
43
|
"format": "string"
|
|
44
44
|
}
|