gtxagent-mcp 0.3.1 → 0.3.3

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
@@ -1,11 +1,16 @@
1
1
  # gtxagent-mcp
2
2
 
3
- MCP bridge for the GTXAgent x402 tools. Two modes:
3
+ MCP bridge for the GTXAgent x402 tools. One command, three modes:
4
4
 
5
- - **Wallet (zero account, default):** `gtxagent-mcp` runs locally and pays each call from your
6
- own Base wallet. Five decision tools, no signup, no tenant key.
7
- - **Hosted:** `gtxagent-mcp` forwards to `https://app.gtxagent.com/mcp` with a prepaid tenant key.
8
- Eleven data tools, no wallet in the client.
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.
12
+
13
+ New tools and paid-call proofs are posted on the channel: [t.me/gtxagent](https://t.me/gtxagent).
9
14
 
10
15
  ## Quick start (wallet)
11
16
 
@@ -69,7 +74,10 @@ transaction exists. Without `from`, a balance-dependent call is reported as skip
69
74
 
70
75
  ## Hosted mode
71
76
 
72
- The same command runs the hosted path when `GTX_MCP_KEY` is set (no wallet needed):
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.
73
81
 
74
82
  ```bash
75
83
  npx -y gtxagent-mcp
@@ -77,7 +85,7 @@ npx -y gtxagent-mcp
77
85
 
78
86
  | Variable | Required | Meaning |
79
87
  |---|---|---|
80
- | `GTX_MCP_KEY` | yes | `gtx_mcp_…` tenant key, shown once when issued |
88
+ | `GTX_MCP_KEY` | no | `gtx_mcp_…` prepaid tenant key; omit it for the hosted free tier (3 market-tool calls per day) |
81
89
  | `GTX_MCP_URL` | no | defaults to `https://app.gtxagent.com/mcp`; `http://localhost` is allowed for development |
82
90
 
83
91
  The hosted server exposes eleven data tools: `market_pulse`, `token_registry`, `token_quote`,
@@ -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
- 'Wallet mode (no signup): export GTX_X402_BUYER_KEY=0x... (a funded Base wallet).',
17
- 'Hosted mode: export GTX_MCP_KEY=gtx_mcp_... (a prepaid tenant key).',
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 with the tenant's prepaid key. The key
6
- // stays in the environment and is never printed. No wallet, no local GTX account.
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.2.0';
14
+ const VERSION = '0.3.3';
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 (!key) fail('GTX_MCP_KEY is required — issue a gtx_mcp_… key for your tenant first');
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'})`);
@@ -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 with the tenant's prepaid key. The key
6
- // stays in the environment and is never printed. No wallet, no local GTX account.
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.2.0';
14
+ const VERSION = '0.3.3';
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 (!key) fail('GTX_MCP_KEY is required — issue a gtx_mcp_… key for your tenant first');
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.1",
3
+ "version": "0.3.3",
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 eleven-tool mode over one prepaid key.",
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 market-tool calls per day).",
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": "Eleven paid x402 crypto tools for AI agents (hosted) plus a zero-account wallet bridge with five decision tools.",
5
- "version": "0.3.1",
4
+ "description": "Paid x402 crypto tools for AI agents. Installs keyless with 3 free calls a day; a key unlocks all.",
5
+ "version": "0.3.3",
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.1",
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": "Tenant key (gtx_mcp_\u2026), shown once when issued",
19
- "isRequired": true,
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_\u2026 tenant key",
41
- "isRequired": true,
40
+ "description": "Optional: Bearer gtx_mcp_… prepaid tenant key; omit for the free tier",
41
+ "isRequired": false,
42
42
  "isSecret": true,
43
43
  "format": "string"
44
44
  }