bsv-mcp 0.0.30 → 0.0.32
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/CHANGELOG.md +1 -1
- package/README.md +0 -1
- package/index.ts +1 -1
- package/package.json +1 -1
- package/resources/changelog.ts +25 -80
- package/tools/wallet/tools.ts +1 -1
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -362,7 +362,6 @@ The BSV MCP server can be customized using environment variables to enable or di
|
|
|
362
362
|
| `DISABLE_BSV_TOOLS` | `false` | Set to `true` to disable BSV blockchain tools |
|
|
363
363
|
| `DISABLE_ORDINALS_TOOLS` | `false` | Set to `true` to disable Ordinals/NFT tools |
|
|
364
364
|
| `DISABLE_UTILS_TOOLS` | `false` | Set to `true` to disable utility tools |
|
|
365
|
-
| `DISABLE_A2B_TOOLS` | `false` | Set to `true` to disable agent-to-blockchain tools |
|
|
366
365
|
|
|
367
366
|
### Examples
|
|
368
367
|
|
package/index.ts
CHANGED
|
@@ -70,7 +70,7 @@ function initializePrivateKey(): PrivateKey | undefined {
|
|
|
70
70
|
const privKey = initializePrivateKey();
|
|
71
71
|
|
|
72
72
|
const server = new McpServer(
|
|
73
|
-
{ name: "Bitcoin SV", version: "0.0.
|
|
73
|
+
{ name: "Bitcoin SV", version: "0.0.32" },
|
|
74
74
|
// {
|
|
75
75
|
// // Advertise only what you actually implement
|
|
76
76
|
// capabilities: {
|
package/package.json
CHANGED
package/resources/changelog.ts
CHANGED
|
@@ -1,70 +1,27 @@
|
|
|
1
1
|
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
const CHANGELOG_URL =
|
|
4
|
+
"https://raw.githubusercontent.com/b-open-io/bsv-mcp/master/CHANGELOG.md";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* Fetches the changelog from GitHub
|
|
8
|
+
* @returns Promise that resolves to the changelog content
|
|
9
9
|
*/
|
|
10
|
-
function
|
|
11
|
-
// Log which paths we're trying
|
|
12
|
-
console.log("Attempting to locate CHANGELOG.md...");
|
|
13
|
-
|
|
14
|
-
// Strategy 1: Try to resolve from the current module's directory
|
|
15
|
-
try {
|
|
16
|
-
// Convert the URL of the current ESM module to a path
|
|
17
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
18
|
-
const __dirname = dirname(__filename);
|
|
19
|
-
|
|
20
|
-
// Look for CHANGELOG.md in the project root (2 levels up from resources dir)
|
|
21
|
-
const changelogPath = join(__dirname, "..", "..", "CHANGELOG.md");
|
|
22
|
-
console.log(`Checking path: ${changelogPath}`);
|
|
23
|
-
|
|
24
|
-
if (existsSync(changelogPath)) {
|
|
25
|
-
console.log(`Found CHANGELOG.md at: ${changelogPath}`);
|
|
26
|
-
return readFileSync(changelogPath, "utf-8");
|
|
27
|
-
}
|
|
28
|
-
} catch (error) {
|
|
29
|
-
console.error("Error checking module path:", error);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Strategy 2: Try to resolve from the current working directory
|
|
33
|
-
try {
|
|
34
|
-
const changelogPath = join(process.cwd(), "CHANGELOG.md");
|
|
35
|
-
console.log(`Checking path: ${changelogPath}`);
|
|
36
|
-
|
|
37
|
-
if (existsSync(changelogPath)) {
|
|
38
|
-
console.log(`Found CHANGELOG.md at: ${changelogPath}`);
|
|
39
|
-
return readFileSync(changelogPath, "utf-8");
|
|
40
|
-
}
|
|
41
|
-
} catch (error) {
|
|
42
|
-
console.error("Error checking current working directory:", error);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// Strategy 3: Try to load from node_modules if running from installed package
|
|
10
|
+
async function fetchChangelog(): Promise<string> {
|
|
46
11
|
try {
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
12
|
+
const response = await fetch(CHANGELOG_URL);
|
|
13
|
+
|
|
14
|
+
if (!response.ok) {
|
|
15
|
+
throw new Error(
|
|
16
|
+
`Failed to fetch changelog: ${response.status} ${response.statusText}`,
|
|
17
|
+
);
|
|
53
18
|
}
|
|
54
|
-
} catch (error) {
|
|
55
|
-
console.error("Error checking node_modules path:", error);
|
|
56
|
-
}
|
|
57
19
|
|
|
58
|
-
|
|
59
|
-
try {
|
|
60
|
-
const fs = require("node:fs");
|
|
61
|
-
console.log("Files in current directory:", fs.readdirSync(process.cwd()));
|
|
20
|
+
return await response.text();
|
|
62
21
|
} catch (error) {
|
|
63
|
-
console.error("Error
|
|
22
|
+
console.error("Error fetching changelog:", error);
|
|
23
|
+
return "# BSV MCP Server Changelog\n\nError: Could not load changelog content.\nPlease check the server logs for more details.";
|
|
64
24
|
}
|
|
65
|
-
|
|
66
|
-
// If we get here, we couldn't find the file
|
|
67
|
-
throw new Error("Could not locate CHANGELOG.md in any of the expected locations");
|
|
68
25
|
}
|
|
69
26
|
|
|
70
27
|
/**
|
|
@@ -80,27 +37,15 @@ export function registerChangelogResource(server: McpServer): void {
|
|
|
80
37
|
description: "Version history and changelog for the BSV MCP server",
|
|
81
38
|
},
|
|
82
39
|
async (uri) => {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
} catch (error) {
|
|
94
|
-
console.error("Failed to read CHANGELOG.md:", error);
|
|
95
|
-
return {
|
|
96
|
-
contents: [
|
|
97
|
-
{
|
|
98
|
-
uri: uri.href,
|
|
99
|
-
text: "# BSV MCP Server Changelog\n\nError: Could not load changelog content.\nPlease check the server logs for more details.",
|
|
100
|
-
},
|
|
101
|
-
],
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
|
-
}
|
|
40
|
+
const changelogContent = await fetchChangelog();
|
|
41
|
+
return {
|
|
42
|
+
contents: [
|
|
43
|
+
{
|
|
44
|
+
uri: uri.href,
|
|
45
|
+
text: changelogContent,
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
};
|
|
49
|
+
},
|
|
105
50
|
);
|
|
106
51
|
}
|
package/tools/wallet/tools.ts
CHANGED
|
@@ -133,7 +133,7 @@ export function registerWalletTools(
|
|
|
133
133
|
// registerA2bPublishAgentTool(server, wallet);
|
|
134
134
|
|
|
135
135
|
// Register the wallet_a2bPublishMcp tool
|
|
136
|
-
registerA2bPublishMcpTool(server, wallet);
|
|
136
|
+
// registerA2bPublishMcpTool(server, wallet);
|
|
137
137
|
|
|
138
138
|
// Register only the minimal public-facing tools
|
|
139
139
|
// wallet_createAction, wallet_signAction and wallet_getHeight have been removed
|