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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # BSV MCP Server Changelog
2
2
 
3
- ## v0.0.30 - Reliability Improvements
3
+ ## v0.0.32 - Reliability Improvements
4
4
 
5
5
  ### Bug Fixes
6
6
  - **Changelog Loading**: Improved changelog loading mechanism with multiple path resolution strategies
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.30" },
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
@@ -2,7 +2,7 @@
2
2
  "name": "bsv-mcp",
3
3
  "module": "index.ts",
4
4
  "type": "module",
5
- "version": "0.0.30",
5
+ "version": "0.0.32",
6
6
  "license": "MIT",
7
7
  "author": "satchmo",
8
8
  "description": "A collection of Bitcoin SV (BSV) tools for the Model Context Protocol (MCP) framework",
@@ -1,70 +1,27 @@
1
1
  import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { readFileSync, existsSync } from "node:fs";
3
- import { join, dirname } from "node:path";
4
- import { fileURLToPath } from "node:url";
2
+
3
+ const CHANGELOG_URL =
4
+ "https://raw.githubusercontent.com/b-open-io/bsv-mcp/master/CHANGELOG.md";
5
5
 
6
6
  /**
7
- * Try multiple strategies to find the CHANGELOG.md file
8
- * Returns the content of the file or throws an error if not found
7
+ * Fetches the changelog from GitHub
8
+ * @returns Promise that resolves to the changelog content
9
9
  */
10
- function findAndReadChangelog(): string {
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 changelogPath = join(process.cwd(), "node_modules", "bsv-mcp", "CHANGELOG.md");
48
- console.log(`Checking path: ${changelogPath}`);
49
-
50
- if (existsSync(changelogPath)) {
51
- console.log(`Found CHANGELOG.md at: ${changelogPath}`);
52
- return readFileSync(changelogPath, "utf-8");
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
- // List all files in current directory to help with debugging
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 listing directory contents:", 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
- try {
84
- const changelogContent = findAndReadChangelog();
85
- return {
86
- contents: [
87
- {
88
- uri: uri.href,
89
- text: changelogContent,
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
  }
@@ -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