agenticbtc-mcp 1.0.1 ā 1.0.2
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/bin/agentbtc.js +41 -46
- package/package.json +2 -2
package/bin/agentbtc.js
CHANGED
|
@@ -17,7 +17,6 @@ function getClaudeConfigPath() {
|
|
|
17
17
|
} else if (platform === "win32") {
|
|
18
18
|
return join(process.env.APPDATA || join(homedir(), "AppData", "Roaming"), "Claude", "claude_desktop_config.json");
|
|
19
19
|
} else {
|
|
20
|
-
// Linux/other
|
|
21
20
|
return join(homedir(), ".config", "claude", "claude_desktop_config.json");
|
|
22
21
|
}
|
|
23
22
|
}
|
|
@@ -51,11 +50,10 @@ async function checkApi(apiUrl, apiKey) {
|
|
|
51
50
|
|
|
52
51
|
// Commands
|
|
53
52
|
async function setup() {
|
|
54
|
-
console.log("š
|
|
53
|
+
console.log("š AgenticBTC Setup\n");
|
|
55
54
|
|
|
56
|
-
|
|
57
|
-
const
|
|
58
|
-
const apiKey = await prompt("AgentBTC API Key: ");
|
|
55
|
+
const apiUrl = await prompt(`AgenticBTC API URL (https://agenticbtc.app): `) || "https://agenticbtc.app";
|
|
56
|
+
const apiKey = await prompt("AgenticBTC API Key: ");
|
|
59
57
|
|
|
60
58
|
if (!apiKey) {
|
|
61
59
|
console.log("ā API Key is required");
|
|
@@ -82,7 +80,6 @@ async function setup() {
|
|
|
82
80
|
const configPath = getClaudeConfigPath();
|
|
83
81
|
let config = { mcpServers: {} };
|
|
84
82
|
|
|
85
|
-
// Load existing config if it exists
|
|
86
83
|
if (existsSync(configPath)) {
|
|
87
84
|
try {
|
|
88
85
|
const existing = readFileSync(configPath, "utf8");
|
|
@@ -95,25 +92,25 @@ async function setup() {
|
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
94
|
|
|
98
|
-
// Add
|
|
95
|
+
// Add AgenticBTC server config
|
|
99
96
|
const serverConfig = {
|
|
100
97
|
command: "npx",
|
|
101
|
-
args: ["
|
|
98
|
+
args: ["agenticbtc-mcp", "server"],
|
|
102
99
|
env: {
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
AGENTICBTC_API_URL: apiUrl,
|
|
101
|
+
AGENTICBTC_API_KEY: apiKey,
|
|
105
102
|
NODE_TLS_REJECT_UNAUTHORIZED: "0"
|
|
106
103
|
}
|
|
107
104
|
};
|
|
108
105
|
|
|
109
106
|
if (lndHost) {
|
|
110
|
-
serverConfig.env.
|
|
107
|
+
serverConfig.env.AGENTICBTC_LND_HOST = lndHost;
|
|
111
108
|
}
|
|
112
109
|
if (lndMacaroon) {
|
|
113
|
-
serverConfig.env.
|
|
110
|
+
serverConfig.env.AGENTICBTC_LND_MACAROON = lndMacaroon;
|
|
114
111
|
}
|
|
115
112
|
|
|
116
|
-
config.mcpServers.
|
|
113
|
+
config.mcpServers.agenticbtc = serverConfig;
|
|
117
114
|
|
|
118
115
|
// Create config directory if needed
|
|
119
116
|
try {
|
|
@@ -137,25 +134,23 @@ async function setup() {
|
|
|
137
134
|
}
|
|
138
135
|
|
|
139
136
|
console.log("\nš Setup complete!");
|
|
140
|
-
console.log("š” Restart Claude Desktop to load the
|
|
141
|
-
console.log("š§ Test with:
|
|
137
|
+
console.log("š” Restart Claude Desktop to load the AgenticBTC MCP server.");
|
|
138
|
+
console.log("š§ Test with: npx agenticbtc-mcp status");
|
|
142
139
|
}
|
|
143
140
|
|
|
144
141
|
async function status() {
|
|
145
|
-
const apiUrl = process.env.AGENTBTC_API_URL || "
|
|
146
|
-
const apiKey = process.env.AGENTBTC_API_KEY || "";
|
|
147
|
-
const lndHost = process.env.AGENTBTC_LND_HOST || "";
|
|
142
|
+
const apiUrl = process.env.AGENTICBTC_API_URL || process.env.AGENTBTC_API_URL || "https://agenticbtc.app";
|
|
143
|
+
const apiKey = process.env.AGENTICBTC_API_KEY || process.env.AGENTBTC_API_KEY || "";
|
|
144
|
+
const lndHost = process.env.AGENTICBTC_LND_HOST || process.env.AGENTBTC_LND_HOST || "";
|
|
148
145
|
|
|
149
|
-
console.log("š
|
|
146
|
+
console.log("š AgenticBTC Status\n");
|
|
150
147
|
|
|
151
|
-
// Configuration
|
|
152
148
|
console.log("Configuration:");
|
|
153
149
|
console.log(` API URL: ${apiUrl}`);
|
|
154
150
|
console.log(` API Key: ${apiKey ? "ā
Set" : "ā Not set"}`);
|
|
155
151
|
console.log(` LND Host: ${lndHost || "ā Not configured"}`);
|
|
156
|
-
console.log(` LND Macaroon: ${process.env.AGENTBTC_LND_MACAROON ? "ā
Set" : "ā Not set"}`);
|
|
152
|
+
console.log(` LND Macaroon: ${(process.env.AGENTICBTC_LND_MACAROON || process.env.AGENTBTC_LND_MACAROON) ? "ā
Set" : "ā Not set"}`);
|
|
157
153
|
|
|
158
|
-
// API connectivity
|
|
159
154
|
console.log("\nš Testing API connection...");
|
|
160
155
|
const apiTest = await checkApi(apiUrl, apiKey);
|
|
161
156
|
if (apiTest.ok) {
|
|
@@ -167,12 +162,12 @@ async function status() {
|
|
|
167
162
|
}
|
|
168
163
|
}
|
|
169
164
|
|
|
170
|
-
|
|
171
|
-
|
|
165
|
+
if (lndHost && (process.env.AGENTICBTC_LND_MACAROON || process.env.AGENTBTC_LND_MACAROON)) {
|
|
166
|
+
const macaroon = process.env.AGENTICBTC_LND_MACAROON || process.env.AGENTBTC_LND_MACAROON;
|
|
172
167
|
console.log("\nš Testing LND connection...");
|
|
173
168
|
try {
|
|
174
169
|
const lndRes = await fetch(`${lndHost}/v1/getinfo`, {
|
|
175
|
-
headers: { "Grpc-Metadata-macaroon":
|
|
170
|
+
headers: { "Grpc-Metadata-macaroon": macaroon }
|
|
176
171
|
});
|
|
177
172
|
if (lndRes.ok) {
|
|
178
173
|
const lndData = await lndRes.json();
|
|
@@ -187,52 +182,52 @@ async function status() {
|
|
|
187
182
|
}
|
|
188
183
|
}
|
|
189
184
|
|
|
190
|
-
// Claude Desktop config
|
|
191
185
|
const configPath = getClaudeConfigPath();
|
|
192
186
|
console.log(`\nš§ Claude Desktop config: ${configPath}`);
|
|
193
187
|
if (existsSync(configPath)) {
|
|
194
188
|
try {
|
|
195
189
|
const config = JSON.parse(readFileSync(configPath, "utf8"));
|
|
196
|
-
if (config.mcpServers?.
|
|
197
|
-
console.log("ā
|
|
190
|
+
if (config.mcpServers?.agenticbtc) {
|
|
191
|
+
console.log("ā
AgenticBTC server configured in Claude Desktop");
|
|
192
|
+
} else if (config.mcpServers?.agentbtc) {
|
|
193
|
+
console.log("ā ļø Old AgentBTC config found ā run 'npx agenticbtc-mcp start' to upgrade");
|
|
198
194
|
} else {
|
|
199
|
-
console.log("ā ļø
|
|
200
|
-
console.log(" Run:
|
|
195
|
+
console.log("ā ļø AgenticBTC server not found in Claude Desktop config");
|
|
196
|
+
console.log(" Run: npx agenticbtc-mcp start");
|
|
201
197
|
}
|
|
202
198
|
} catch (error) {
|
|
203
199
|
console.log(`ā Could not read config: ${error.message}`);
|
|
204
200
|
}
|
|
205
201
|
} else {
|
|
206
202
|
console.log("ā Claude Desktop config not found");
|
|
207
|
-
console.log(" Run:
|
|
203
|
+
console.log(" Run: npx agenticbtc-mcp start");
|
|
208
204
|
}
|
|
209
205
|
}
|
|
210
206
|
|
|
211
207
|
function server() {
|
|
212
|
-
// Import and start the MCP server
|
|
213
208
|
import("../src/server.js");
|
|
214
209
|
}
|
|
215
210
|
|
|
216
211
|
function help() {
|
|
217
212
|
console.log(`
|
|
218
|
-
š
|
|
213
|
+
š AgenticBTC - Intelligent Payment Routing for AI Agents
|
|
219
214
|
|
|
220
215
|
Usage:
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
216
|
+
npx agenticbtc-mcp start Get started (interactive setup)
|
|
217
|
+
npx agenticbtc-mcp setup Interactive setup for Claude Desktop
|
|
218
|
+
npx agenticbtc-mcp server Start the MCP server (used by Claude Desktop)
|
|
219
|
+
npx agenticbtc-mcp status Check configuration and connectivity
|
|
220
|
+
npx agenticbtc-mcp --help Show this help message
|
|
226
221
|
|
|
227
222
|
Examples:
|
|
228
|
-
npx
|
|
229
|
-
|
|
223
|
+
npx agenticbtc-mcp start # First-time setup
|
|
224
|
+
npx agenticbtc-mcp status # Check if everything is working
|
|
230
225
|
|
|
231
226
|
Environment Variables:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
227
|
+
AGENTICBTC_API_URL AgenticBTC API endpoint (default: https://agenticbtc.app)
|
|
228
|
+
AGENTICBTC_API_KEY AgenticBTC API key (required)
|
|
229
|
+
AGENTICBTC_LND_HOST Lightning node REST API host (optional)
|
|
230
|
+
AGENTICBTC_LND_MACAROON Lightning node macaroon in hex (optional)
|
|
236
231
|
|
|
237
232
|
More info: https://agenticbtc.app
|
|
238
233
|
`);
|
|
@@ -257,6 +252,6 @@ switch (command) {
|
|
|
257
252
|
break;
|
|
258
253
|
default:
|
|
259
254
|
console.log(`Unknown command: ${command}`);
|
|
260
|
-
console.log("Run '
|
|
255
|
+
console.log("Run 'npx agenticbtc-mcp --help' for usage information.");
|
|
261
256
|
process.exit(1);
|
|
262
|
-
}
|
|
257
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agenticbtc-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Privacy-intelligent payments for AI agents ā your privacy, your choice. Universal payment router with Lightning, Strike, Coinbase, PayPal, Venmo support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bitcoin",
|
|
@@ -46,4 +46,4 @@
|
|
|
46
46
|
"start": "node src/server.js",
|
|
47
47
|
"test": "node bin/agenticbtc.js --help"
|
|
48
48
|
}
|
|
49
|
-
}
|
|
49
|
+
}
|