@hashgraphonline/standards-sdk 0.0.125 → 0.0.126
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/dist/cjs/hcs-11/client.d.ts.map +1 -1
- package/dist/cjs/hcs-11/mcp-server-builder.d.ts +107 -2
- package/dist/cjs/hcs-11/mcp-server-builder.d.ts.map +1 -1
- package/dist/cjs/index-U-8_6nvw-CzeOzxnG.cjs +11 -0
- package/dist/cjs/{index-CHar8dVv-DHlTexOJ.cjs.map → index-U-8_6nvw-CzeOzxnG.cjs.map} +1 -1
- package/dist/cjs/index-w29ekq70.cjs +32 -0
- package/dist/cjs/index-w29ekq70.cjs.map +1 -0
- package/dist/cjs/standards-sdk.cjs +1 -1
- package/dist/cjs/{index-CHar8dVv-DHlTexOJ.cjs → standards-sdk.es34-ChBjKBbQ-Byois_9v.cjs} +2 -2
- package/dist/cjs/standards-sdk.es34-ChBjKBbQ-Byois_9v.cjs.map +1 -0
- package/dist/es/hcs-11/client.d.ts.map +1 -1
- package/dist/es/hcs-11/mcp-server-builder.d.ts +107 -2
- package/dist/es/hcs-11/mcp-server-builder.d.ts.map +1 -1
- package/dist/es/standards-sdk.es13.js +153 -8
- package/dist/es/standards-sdk.es13.js.map +1 -1
- package/dist/es/standards-sdk.es14.js +2 -1
- package/dist/es/standards-sdk.es14.js.map +1 -1
- package/dist/es/standards-sdk.es26.js +15225 -896
- package/dist/es/standards-sdk.es26.js.map +1 -1
- package/dist/es/standards-sdk.es27.js +1 -1
- package/dist/es/standards-sdk.es28.js +1 -1
- package/dist/es/standards-sdk.es29.js +1 -1
- package/dist/es/standards-sdk.es30.js +1 -1
- package/dist/es/standards-sdk.es31.js +1 -1
- package/dist/es/standards-sdk.es34.js +41 -7134
- package/dist/es/standards-sdk.es34.js.map +1 -1
- package/dist/es/standards-sdk.es35.js +7134 -41
- package/dist/es/standards-sdk.es35.js.map +1 -1
- package/dist/es/standards-sdk.es36.js +7138 -0
- package/dist/es/standards-sdk.es36.js.map +1 -0
- package/dist/umd/hcs-11/client.d.ts.map +1 -1
- package/dist/umd/hcs-11/mcp-server-builder.d.ts +107 -2
- package/dist/umd/hcs-11/mcp-server-builder.d.ts.map +1 -1
- package/dist/umd/standards-sdk.umd.js +54 -24
- package/dist/umd/standards-sdk.umd.js.map +1 -1
- package/package.json +2 -2
- package/dist/cjs/index-6LoriFtz.cjs +0 -11
- package/dist/cjs/index-6LoriFtz.cjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../src/hcs-11/client.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EAET,MAAM,EAIP,MAAM,gBAAgB,CAAC;AAaxB,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,cAAc,EACd,YAAY,EAEZ,iBAAiB,EACjB,iBAAiB,EACjB,uBAAuB,EACvB,qBAAqB,EACrB,aAAa,EACb,oBAAoB,EACpB,sBAAsB,EAEtB,gBAAgB,EAChB,gBAAgB,EAGjB,MAAM,SAAS,CAAC;AA0FjB,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,UAAU,CAAmB;IACrC,OAAO,CAAC,OAAO,CAAsB;IACrC,OAAO,CAAC,UAAU,CAAS;gBAEf,MAAM,EAAE,iBAAiB;IAuC9B,SAAS,IAAI,MAAM;IAInB,aAAa,IAAI,MAAM;IAIjB,kBAAkB;IAe/B,OAAO,CAAC,6BAA6B;IAa9B,qBAAqB,CAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,GAAG,CAAC,EAAE,MAA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;IAQrE;;;;;;OAMG;IACU,uBAAuB,CAClC,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC;QACT,OAAO,EAAE,OAAO,CAAC;QACjB,OAAO,CAAC,EAAE,YAAY,CAAC;QACvB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,SAAS,CAAC;KACvB,CAAC;CAiIH"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MCPServerConfig, MCPServerCapability, SocialPlatform } from './types';
|
|
1
|
+
import { MCPServerConfig, MCPServerVerification, MCPServerResource, MCPServerTool, MCPServerCapability, SocialPlatform, SocialLink } from './types';
|
|
2
2
|
import { NetworkType } from '../utils/types';
|
|
3
3
|
/**
|
|
4
4
|
* MCPServerBuilder is a builder class for creating MCP server configurations.
|
|
@@ -8,7 +8,7 @@ import { NetworkType } from '../utils/types';
|
|
|
8
8
|
* ```typescript
|
|
9
9
|
* const mcpBuilder = new MCPServerBuilder();
|
|
10
10
|
* mcpBuilder.setName('My MCP Server');
|
|
11
|
-
* mcpBuilder.
|
|
11
|
+
* mcpBuilder.setServerDescription('This is my MCP server for AI integration');
|
|
12
12
|
* mcpBuilder.setVersion('2024-06-01');
|
|
13
13
|
* mcpBuilder.setConnectionInfo('https://mcp.example.com', 'sse');
|
|
14
14
|
* mcpBuilder.setServices([MCPServerCapability.TOOL_PROVIDER, MCPServerCapability.API_INTEGRATION]);
|
|
@@ -24,14 +24,20 @@ export declare class MCPServerBuilder {
|
|
|
24
24
|
constructor();
|
|
25
25
|
/**
|
|
26
26
|
* Sets the display name of the MCP server
|
|
27
|
+
*
|
|
28
|
+
* @param name The display name for the MCP server profile
|
|
27
29
|
*/
|
|
28
30
|
setName(name: string): this;
|
|
29
31
|
/**
|
|
30
32
|
* Sets the alias for the MCP server
|
|
33
|
+
*
|
|
34
|
+
* @param alias Alternative identifier for the MCP server
|
|
31
35
|
*/
|
|
32
36
|
setAlias(alias: string): this;
|
|
33
37
|
/**
|
|
34
38
|
* Sets the bio/description for the MCP server profile
|
|
39
|
+
*
|
|
40
|
+
* @param bio Brief description or biography for the MCP server
|
|
35
41
|
*/
|
|
36
42
|
setBio(bio: string): this;
|
|
37
43
|
/**
|
|
@@ -40,82 +46,181 @@ export declare class MCPServerBuilder {
|
|
|
40
46
|
setDescription(description: string): this;
|
|
41
47
|
/**
|
|
42
48
|
* Sets the version of the MCP server
|
|
49
|
+
*
|
|
50
|
+
* @param version The MCP server version (e.g., "2024-06-01")
|
|
43
51
|
*/
|
|
44
52
|
setVersion(version: string): this;
|
|
45
53
|
/**
|
|
46
54
|
* Sets the connection information for the MCP server
|
|
55
|
+
*
|
|
56
|
+
* @param url Base URL for the MCP server (e.g., "https://mcp.example.com")
|
|
57
|
+
* @param transport Transport type ("stdio" or "sse")
|
|
47
58
|
*/
|
|
48
59
|
setConnectionInfo(url: string, transport: 'stdio' | 'sse'): this;
|
|
49
60
|
/**
|
|
50
61
|
* Sets the detailed description for the MCP server capabilities
|
|
62
|
+
*
|
|
63
|
+
* @param description Detailed description of server functionality
|
|
51
64
|
*/
|
|
52
65
|
setServerDescription(description: string): this;
|
|
53
66
|
/**
|
|
54
67
|
* Sets the services/capabilities provided by the MCP server
|
|
68
|
+
*
|
|
69
|
+
* @param services Array of service types offered by this MCP server
|
|
55
70
|
*/
|
|
56
71
|
setServices(services: MCPServerCapability[]): this;
|
|
57
72
|
/**
|
|
58
73
|
* Sets the minimum host version requirements
|
|
74
|
+
*
|
|
75
|
+
* @param minVersion Minimum host version required (e.g., "2024-11-05")
|
|
59
76
|
*/
|
|
60
77
|
setHostRequirements(minVersion?: string): this;
|
|
61
78
|
/**
|
|
62
79
|
* Sets the MCP capabilities supported by the server
|
|
80
|
+
*
|
|
81
|
+
* @param capabilities Array of capability strings (e.g., ["resources.get", "tools.invoke"])
|
|
63
82
|
*/
|
|
64
83
|
setCapabilities(capabilities: string[]): this;
|
|
65
84
|
/**
|
|
66
85
|
* Adds a resource that the MCP server exposes
|
|
86
|
+
*
|
|
87
|
+
* @param name Resource name identifier (e.g., "hcs_topics")
|
|
88
|
+
* @param description Human-readable description of the resource
|
|
67
89
|
*/
|
|
68
90
|
addResource(name: string, description: string): this;
|
|
91
|
+
/**
|
|
92
|
+
* Sets all resources the MCP server exposes (replaces existing resources)
|
|
93
|
+
*
|
|
94
|
+
* @param resources Array of resource objects with name and description
|
|
95
|
+
*/
|
|
96
|
+
setResources(resources: MCPServerResource[]): this;
|
|
69
97
|
/**
|
|
70
98
|
* Adds a tool that the MCP server provides
|
|
99
|
+
*
|
|
100
|
+
* @param name Tool name identifier (e.g., "topic_submit")
|
|
101
|
+
* @param description Human-readable description of what the tool does
|
|
71
102
|
*/
|
|
72
103
|
addTool(name: string, description: string): this;
|
|
104
|
+
/**
|
|
105
|
+
* Sets all tools the MCP server provides (replaces existing tools)
|
|
106
|
+
*
|
|
107
|
+
* @param tools Array of tool objects with name and description
|
|
108
|
+
*/
|
|
109
|
+
setTools(tools: MCPServerTool[]): this;
|
|
73
110
|
/**
|
|
74
111
|
* Sets information about who maintains the MCP server
|
|
112
|
+
*
|
|
113
|
+
* @param maintainer Organization or entity maintaining this MCP server
|
|
75
114
|
*/
|
|
76
115
|
setMaintainer(maintainer: string): this;
|
|
77
116
|
/**
|
|
78
117
|
* Sets the URL to the source code repository
|
|
118
|
+
*
|
|
119
|
+
* @param repository URL to source code repository
|
|
79
120
|
*/
|
|
80
121
|
setRepository(repository: string): this;
|
|
81
122
|
/**
|
|
82
123
|
* Sets the URL to the server documentation
|
|
124
|
+
*
|
|
125
|
+
* @param docs URL to server documentation
|
|
83
126
|
*/
|
|
84
127
|
setDocs(docs: string): this;
|
|
128
|
+
/**
|
|
129
|
+
* Sets the verification information for the MCP server
|
|
130
|
+
*
|
|
131
|
+
* @param verification Complete verification object
|
|
132
|
+
*/
|
|
133
|
+
setVerification(verification: MCPServerVerification): this;
|
|
85
134
|
/**
|
|
86
135
|
* Adds DNS-based verification of endpoint ownership
|
|
136
|
+
*
|
|
137
|
+
* For DNS verification, the MCP server owner must add a DNS TXT record to their domain with:
|
|
138
|
+
* - Name: By default, `_hedera` or a custom name specified in `dnsField` (automatically prefixed with `_`)
|
|
139
|
+
* - Value: Equal to their Hedera account ID (e.g., `0.0.12345678`)
|
|
140
|
+
*
|
|
141
|
+
* Example DNS record:
|
|
142
|
+
* ```
|
|
143
|
+
* _hedera.example.com. 3600 IN TXT "0.0.12345678"
|
|
144
|
+
* ```
|
|
145
|
+
*
|
|
146
|
+
* @param domain The fully qualified domain name to check (e.g., "example.com")
|
|
147
|
+
* @param dnsField Optional custom DNS TXT record name (defaults to "hedera")
|
|
87
148
|
*/
|
|
88
149
|
addVerificationDNS(domain: string, dnsField?: string): this;
|
|
89
150
|
/**
|
|
90
151
|
* Adds signature-based verification of endpoint ownership
|
|
152
|
+
*
|
|
153
|
+
* For signature verification:
|
|
154
|
+
* 1. The message to be signed must be the server URL exactly as it appears in the connectionInfo.url field
|
|
155
|
+
* 2. The signature must be created using the ED25519 key associated with the Hedera account
|
|
156
|
+
* 3. The signature must be encoded as a hexadecimal string with no `0x` prefix
|
|
157
|
+
*
|
|
158
|
+
* @param signature Hex-encoded ED25519 signature of the server URL
|
|
91
159
|
*/
|
|
92
160
|
addVerificationSignature(signature: string): this;
|
|
93
161
|
/**
|
|
94
162
|
* Adds challenge-based verification of endpoint ownership
|
|
163
|
+
*
|
|
164
|
+
* For challenge verification:
|
|
165
|
+
* 1. The MCP server must expose an endpoint that responds to HTTP GET requests
|
|
166
|
+
* 2. The endpoint path defaults to "/hedera-verification" or can be customized with challengePath
|
|
167
|
+
* 3. The server must respond with a JSON object containing:
|
|
168
|
+
* ```json
|
|
169
|
+
* {
|
|
170
|
+
* "accountId": "0.0.12345678",
|
|
171
|
+
* "timestamp": 1620000000000,
|
|
172
|
+
* "signature": "a1b2c3d4e5f6..."
|
|
173
|
+
* }
|
|
174
|
+
* ```
|
|
175
|
+
* 4. The signature must be an ED25519 signature of the UTF-8 encoded string `{accountId}:{timestamp}`
|
|
176
|
+
*
|
|
177
|
+
* @param challengePath Optional custom challenge endpoint path (defaults to "hedera-verification")
|
|
95
178
|
*/
|
|
96
179
|
addVerificationChallenge(challengePath?: string): this;
|
|
97
180
|
/**
|
|
98
181
|
* Adds a social media link to the profile
|
|
182
|
+
*
|
|
183
|
+
* @param platform Social media platform (e.g., "twitter", "github")
|
|
184
|
+
* @param handle Username on the platform (e.g., "@username", "username")
|
|
99
185
|
*/
|
|
100
186
|
addSocial(platform: SocialPlatform, handle: string): this;
|
|
187
|
+
/**
|
|
188
|
+
* Sets all social media links for the profile (replaces existing links)
|
|
189
|
+
*
|
|
190
|
+
* @param socials Array of social media links
|
|
191
|
+
*/
|
|
192
|
+
setSocials(socials: SocialLink[]): this;
|
|
101
193
|
/**
|
|
102
194
|
* Sets the profile picture for the MCP server
|
|
195
|
+
*
|
|
196
|
+
* @param pfpBuffer Buffer containing the profile picture data
|
|
197
|
+
* @param pfpFileName Filename for the profile picture including extension
|
|
103
198
|
*/
|
|
104
199
|
setProfilePicture(pfpBuffer: Buffer, pfpFileName: string): this;
|
|
105
200
|
/**
|
|
106
201
|
* Sets a reference to an existing profile picture
|
|
202
|
+
*
|
|
203
|
+
* @param pfpTopicId Topic ID containing the profile picture (for reuse)
|
|
107
204
|
*/
|
|
108
205
|
setExistingProfilePicture(pfpTopicId: string): this;
|
|
109
206
|
/**
|
|
110
207
|
* Sets the network type (mainnet or testnet)
|
|
208
|
+
*
|
|
209
|
+
* @param network Network type ("mainnet" or "testnet")
|
|
111
210
|
*/
|
|
112
211
|
setNetworkType(network: NetworkType): this;
|
|
113
212
|
/**
|
|
114
213
|
* Sets an existing account to use for the MCP server
|
|
214
|
+
*
|
|
215
|
+
* @param accountId Hedera account ID (e.g., "0.0.12345678")
|
|
216
|
+
* @param privateKey ED25519 private key as a string
|
|
115
217
|
*/
|
|
116
218
|
setExistingAccount(accountId: string, privateKey: string): this;
|
|
117
219
|
/**
|
|
118
220
|
* Builds and validates the MCP server configuration
|
|
221
|
+
*
|
|
222
|
+
* @returns Complete MCPServerConfig object ready for use
|
|
223
|
+
* @throws Error if required fields are missing
|
|
119
224
|
*/
|
|
120
225
|
build(): MCPServerConfig;
|
|
121
226
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp-server-builder.d.ts","sourceRoot":"","sources":["../../../src/hcs-11/mcp-server-builder.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"mcp-server-builder.d.ts","sourceRoot":"","sources":["../../../src/hcs-11/mcp-server-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAGf,qBAAqB,EAErB,iBAAiB,EACjB,aAAa,EACb,mBAAmB,EACnB,cAAc,EAEd,UAAU,EACX,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAEZ;IACF,OAAO,CAAC,OAAO,CAAoB;IACnC,OAAO,CAAC,MAAM,CAAS;;IAQvB;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAK3B;;;;OAIG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK7B;;;;OAIG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKzB;;OAEG;IACH,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAIzC;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAQjC;;;;;OAKG;IACH,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,GAAG,KAAK,GAAG,IAAI;IAchE;;;;OAIG;IACH,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI;IAQ/C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OAKG;IACH,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,IAAI;IAM/D;;;;OAIG;IACH,yBAAyB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;IAKnD;;;;OAIG;IACH,cAAc,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI;IAK1C;;;;;OAKG;IACH,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,IAAI;IAQ/D;;;;;OAKG;IACH,KAAK,IAAI,eAAe;CAkDzB"}
|
|
@@ -12,6 +12,8 @@ class MCPServerBuilder {
|
|
|
12
12
|
}
|
|
13
13
|
/**
|
|
14
14
|
* Sets the display name of the MCP server
|
|
15
|
+
*
|
|
16
|
+
* @param name The display name for the MCP server profile
|
|
15
17
|
*/
|
|
16
18
|
setName(name) {
|
|
17
19
|
this.config.name = name;
|
|
@@ -19,6 +21,8 @@ class MCPServerBuilder {
|
|
|
19
21
|
}
|
|
20
22
|
/**
|
|
21
23
|
* Sets the alias for the MCP server
|
|
24
|
+
*
|
|
25
|
+
* @param alias Alternative identifier for the MCP server
|
|
22
26
|
*/
|
|
23
27
|
setAlias(alias) {
|
|
24
28
|
this.config.alias = alias;
|
|
@@ -26,6 +30,8 @@ class MCPServerBuilder {
|
|
|
26
30
|
}
|
|
27
31
|
/**
|
|
28
32
|
* Sets the bio/description for the MCP server profile
|
|
33
|
+
*
|
|
34
|
+
* @param bio Brief description or biography for the MCP server
|
|
29
35
|
*/
|
|
30
36
|
setBio(bio) {
|
|
31
37
|
this.config.bio = bio;
|
|
@@ -39,6 +45,8 @@ class MCPServerBuilder {
|
|
|
39
45
|
}
|
|
40
46
|
/**
|
|
41
47
|
* Sets the version of the MCP server
|
|
48
|
+
*
|
|
49
|
+
* @param version The MCP server version (e.g., "2024-06-01")
|
|
42
50
|
*/
|
|
43
51
|
setVersion(version) {
|
|
44
52
|
if (!this.config.mcpServer) {
|
|
@@ -49,19 +57,25 @@ class MCPServerBuilder {
|
|
|
49
57
|
}
|
|
50
58
|
/**
|
|
51
59
|
* Sets the connection information for the MCP server
|
|
60
|
+
*
|
|
61
|
+
* @param url Base URL for the MCP server (e.g., "https://mcp.example.com")
|
|
62
|
+
* @param transport Transport type ("stdio" or "sse")
|
|
52
63
|
*/
|
|
53
64
|
setConnectionInfo(url, transport) {
|
|
54
65
|
if (!this.config.mcpServer) {
|
|
55
66
|
this.config.mcpServer = {};
|
|
56
67
|
}
|
|
57
|
-
|
|
68
|
+
const connectionInfo = {
|
|
58
69
|
url,
|
|
59
70
|
transport
|
|
60
71
|
};
|
|
72
|
+
this.config.mcpServer.connectionInfo = connectionInfo;
|
|
61
73
|
return this;
|
|
62
74
|
}
|
|
63
75
|
/**
|
|
64
76
|
* Sets the detailed description for the MCP server capabilities
|
|
77
|
+
*
|
|
78
|
+
* @param description Detailed description of server functionality
|
|
65
79
|
*/
|
|
66
80
|
setServerDescription(description) {
|
|
67
81
|
if (!this.config.mcpServer) {
|
|
@@ -72,6 +86,8 @@ class MCPServerBuilder {
|
|
|
72
86
|
}
|
|
73
87
|
/**
|
|
74
88
|
* Sets the services/capabilities provided by the MCP server
|
|
89
|
+
*
|
|
90
|
+
* @param services Array of service types offered by this MCP server
|
|
75
91
|
*/
|
|
76
92
|
setServices(services) {
|
|
77
93
|
if (!this.config.mcpServer) {
|
|
@@ -82,16 +98,23 @@ class MCPServerBuilder {
|
|
|
82
98
|
}
|
|
83
99
|
/**
|
|
84
100
|
* Sets the minimum host version requirements
|
|
101
|
+
*
|
|
102
|
+
* @param minVersion Minimum host version required (e.g., "2024-11-05")
|
|
85
103
|
*/
|
|
86
104
|
setHostRequirements(minVersion) {
|
|
87
105
|
if (!this.config.mcpServer) {
|
|
88
106
|
this.config.mcpServer = {};
|
|
89
107
|
}
|
|
90
|
-
|
|
108
|
+
const hostInfo = {
|
|
109
|
+
minVersion
|
|
110
|
+
};
|
|
111
|
+
this.config.mcpServer.host = hostInfo;
|
|
91
112
|
return this;
|
|
92
113
|
}
|
|
93
114
|
/**
|
|
94
115
|
* Sets the MCP capabilities supported by the server
|
|
116
|
+
*
|
|
117
|
+
* @param capabilities Array of capability strings (e.g., ["resources.get", "tools.invoke"])
|
|
95
118
|
*/
|
|
96
119
|
setCapabilities(capabilities) {
|
|
97
120
|
if (!this.config.mcpServer) {
|
|
@@ -102,6 +125,9 @@ class MCPServerBuilder {
|
|
|
102
125
|
}
|
|
103
126
|
/**
|
|
104
127
|
* Adds a resource that the MCP server exposes
|
|
128
|
+
*
|
|
129
|
+
* @param name Resource name identifier (e.g., "hcs_topics")
|
|
130
|
+
* @param description Human-readable description of the resource
|
|
105
131
|
*/
|
|
106
132
|
addResource(name, description) {
|
|
107
133
|
if (!this.config.mcpServer) {
|
|
@@ -110,11 +136,30 @@ class MCPServerBuilder {
|
|
|
110
136
|
if (!this.config.mcpServer.resources) {
|
|
111
137
|
this.config.mcpServer.resources = [];
|
|
112
138
|
}
|
|
113
|
-
|
|
139
|
+
const resource = {
|
|
140
|
+
name,
|
|
141
|
+
description
|
|
142
|
+
};
|
|
143
|
+
this.config.mcpServer.resources.push(resource);
|
|
144
|
+
return this;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Sets all resources the MCP server exposes (replaces existing resources)
|
|
148
|
+
*
|
|
149
|
+
* @param resources Array of resource objects with name and description
|
|
150
|
+
*/
|
|
151
|
+
setResources(resources) {
|
|
152
|
+
if (!this.config.mcpServer) {
|
|
153
|
+
this.config.mcpServer = {};
|
|
154
|
+
}
|
|
155
|
+
this.config.mcpServer.resources = resources;
|
|
114
156
|
return this;
|
|
115
157
|
}
|
|
116
158
|
/**
|
|
117
159
|
* Adds a tool that the MCP server provides
|
|
160
|
+
*
|
|
161
|
+
* @param name Tool name identifier (e.g., "topic_submit")
|
|
162
|
+
* @param description Human-readable description of what the tool does
|
|
118
163
|
*/
|
|
119
164
|
addTool(name, description) {
|
|
120
165
|
if (!this.config.mcpServer) {
|
|
@@ -123,11 +168,29 @@ class MCPServerBuilder {
|
|
|
123
168
|
if (!this.config.mcpServer.tools) {
|
|
124
169
|
this.config.mcpServer.tools = [];
|
|
125
170
|
}
|
|
126
|
-
|
|
171
|
+
const tool = {
|
|
172
|
+
name,
|
|
173
|
+
description
|
|
174
|
+
};
|
|
175
|
+
this.config.mcpServer.tools.push(tool);
|
|
176
|
+
return this;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Sets all tools the MCP server provides (replaces existing tools)
|
|
180
|
+
*
|
|
181
|
+
* @param tools Array of tool objects with name and description
|
|
182
|
+
*/
|
|
183
|
+
setTools(tools) {
|
|
184
|
+
if (!this.config.mcpServer) {
|
|
185
|
+
this.config.mcpServer = {};
|
|
186
|
+
}
|
|
187
|
+
this.config.mcpServer.tools = tools;
|
|
127
188
|
return this;
|
|
128
189
|
}
|
|
129
190
|
/**
|
|
130
191
|
* Sets information about who maintains the MCP server
|
|
192
|
+
*
|
|
193
|
+
* @param maintainer Organization or entity maintaining this MCP server
|
|
131
194
|
*/
|
|
132
195
|
setMaintainer(maintainer) {
|
|
133
196
|
if (!this.config.mcpServer) {
|
|
@@ -138,6 +201,8 @@ class MCPServerBuilder {
|
|
|
138
201
|
}
|
|
139
202
|
/**
|
|
140
203
|
* Sets the URL to the source code repository
|
|
204
|
+
*
|
|
205
|
+
* @param repository URL to source code repository
|
|
141
206
|
*/
|
|
142
207
|
setRepository(repository) {
|
|
143
208
|
if (!this.config.mcpServer) {
|
|
@@ -148,6 +213,8 @@ class MCPServerBuilder {
|
|
|
148
213
|
}
|
|
149
214
|
/**
|
|
150
215
|
* Sets the URL to the server documentation
|
|
216
|
+
*
|
|
217
|
+
* @param docs URL to server documentation
|
|
151
218
|
*/
|
|
152
219
|
setDocs(docs) {
|
|
153
220
|
if (!this.config.mcpServer) {
|
|
@@ -156,61 +223,129 @@ class MCPServerBuilder {
|
|
|
156
223
|
this.config.mcpServer.docs = docs;
|
|
157
224
|
return this;
|
|
158
225
|
}
|
|
226
|
+
/**
|
|
227
|
+
* Sets the verification information for the MCP server
|
|
228
|
+
*
|
|
229
|
+
* @param verification Complete verification object
|
|
230
|
+
*/
|
|
231
|
+
setVerification(verification) {
|
|
232
|
+
if (!this.config.mcpServer) {
|
|
233
|
+
this.config.mcpServer = {};
|
|
234
|
+
}
|
|
235
|
+
this.config.mcpServer.verification = verification;
|
|
236
|
+
return this;
|
|
237
|
+
}
|
|
159
238
|
/**
|
|
160
239
|
* Adds DNS-based verification of endpoint ownership
|
|
240
|
+
*
|
|
241
|
+
* For DNS verification, the MCP server owner must add a DNS TXT record to their domain with:
|
|
242
|
+
* - Name: By default, `_hedera` or a custom name specified in `dnsField` (automatically prefixed with `_`)
|
|
243
|
+
* - Value: Equal to their Hedera account ID (e.g., `0.0.12345678`)
|
|
244
|
+
*
|
|
245
|
+
* Example DNS record:
|
|
246
|
+
* ```
|
|
247
|
+
* _hedera.example.com. 3600 IN TXT "0.0.12345678"
|
|
248
|
+
* ```
|
|
249
|
+
*
|
|
250
|
+
* @param domain The fully qualified domain name to check (e.g., "example.com")
|
|
251
|
+
* @param dnsField Optional custom DNS TXT record name (defaults to "hedera")
|
|
161
252
|
*/
|
|
162
253
|
addVerificationDNS(domain, dnsField) {
|
|
163
254
|
if (!this.config.mcpServer) {
|
|
164
255
|
this.config.mcpServer = {};
|
|
165
256
|
}
|
|
166
|
-
|
|
257
|
+
const verification = {
|
|
167
258
|
type: VerificationType.DNS,
|
|
168
259
|
value: domain,
|
|
169
260
|
dns_field: dnsField
|
|
170
261
|
};
|
|
262
|
+
this.config.mcpServer.verification = verification;
|
|
171
263
|
return this;
|
|
172
264
|
}
|
|
173
265
|
/**
|
|
174
266
|
* Adds signature-based verification of endpoint ownership
|
|
267
|
+
*
|
|
268
|
+
* For signature verification:
|
|
269
|
+
* 1. The message to be signed must be the server URL exactly as it appears in the connectionInfo.url field
|
|
270
|
+
* 2. The signature must be created using the ED25519 key associated with the Hedera account
|
|
271
|
+
* 3. The signature must be encoded as a hexadecimal string with no `0x` prefix
|
|
272
|
+
*
|
|
273
|
+
* @param signature Hex-encoded ED25519 signature of the server URL
|
|
175
274
|
*/
|
|
176
275
|
addVerificationSignature(signature) {
|
|
177
276
|
if (!this.config.mcpServer) {
|
|
178
277
|
this.config.mcpServer = {};
|
|
179
278
|
}
|
|
180
|
-
|
|
279
|
+
const verification = {
|
|
181
280
|
type: VerificationType.SIGNATURE,
|
|
182
281
|
value: signature
|
|
183
282
|
};
|
|
283
|
+
this.config.mcpServer.verification = verification;
|
|
184
284
|
return this;
|
|
185
285
|
}
|
|
186
286
|
/**
|
|
187
287
|
* Adds challenge-based verification of endpoint ownership
|
|
288
|
+
*
|
|
289
|
+
* For challenge verification:
|
|
290
|
+
* 1. The MCP server must expose an endpoint that responds to HTTP GET requests
|
|
291
|
+
* 2. The endpoint path defaults to "/hedera-verification" or can be customized with challengePath
|
|
292
|
+
* 3. The server must respond with a JSON object containing:
|
|
293
|
+
* ```json
|
|
294
|
+
* {
|
|
295
|
+
* "accountId": "0.0.12345678",
|
|
296
|
+
* "timestamp": 1620000000000,
|
|
297
|
+
* "signature": "a1b2c3d4e5f6..."
|
|
298
|
+
* }
|
|
299
|
+
* ```
|
|
300
|
+
* 4. The signature must be an ED25519 signature of the UTF-8 encoded string `{accountId}:{timestamp}`
|
|
301
|
+
*
|
|
302
|
+
* @param challengePath Optional custom challenge endpoint path (defaults to "hedera-verification")
|
|
188
303
|
*/
|
|
189
304
|
addVerificationChallenge(challengePath) {
|
|
190
305
|
if (!this.config.mcpServer) {
|
|
191
306
|
this.config.mcpServer = {};
|
|
192
307
|
}
|
|
193
|
-
|
|
308
|
+
const verification = {
|
|
194
309
|
type: VerificationType.CHALLENGE,
|
|
195
310
|
value: "",
|
|
196
311
|
challenge_path: challengePath
|
|
197
312
|
};
|
|
313
|
+
this.config.mcpServer.verification = verification;
|
|
198
314
|
return this;
|
|
199
315
|
}
|
|
200
316
|
/**
|
|
201
317
|
* Adds a social media link to the profile
|
|
318
|
+
*
|
|
319
|
+
* @param platform Social media platform (e.g., "twitter", "github")
|
|
320
|
+
* @param handle Username on the platform (e.g., "@username", "username")
|
|
202
321
|
*/
|
|
203
322
|
addSocial(platform, handle) {
|
|
204
323
|
const existingSocial = this.socials.find((s) => s.platform === platform);
|
|
205
324
|
if (!existingSocial) {
|
|
206
|
-
|
|
325
|
+
const socialLink = {
|
|
326
|
+
platform,
|
|
327
|
+
handle
|
|
328
|
+
};
|
|
329
|
+
this.socials.push(socialLink);
|
|
207
330
|
} else {
|
|
208
331
|
existingSocial.handle = handle;
|
|
209
332
|
}
|
|
210
333
|
return this;
|
|
211
334
|
}
|
|
335
|
+
/**
|
|
336
|
+
* Sets all social media links for the profile (replaces existing links)
|
|
337
|
+
*
|
|
338
|
+
* @param socials Array of social media links
|
|
339
|
+
*/
|
|
340
|
+
setSocials(socials) {
|
|
341
|
+
this.socials = socials;
|
|
342
|
+
return this;
|
|
343
|
+
}
|
|
212
344
|
/**
|
|
213
345
|
* Sets the profile picture for the MCP server
|
|
346
|
+
*
|
|
347
|
+
* @param pfpBuffer Buffer containing the profile picture data
|
|
348
|
+
* @param pfpFileName Filename for the profile picture including extension
|
|
214
349
|
*/
|
|
215
350
|
setProfilePicture(pfpBuffer, pfpFileName) {
|
|
216
351
|
this.config.pfpBuffer = pfpBuffer;
|
|
@@ -219,6 +354,8 @@ class MCPServerBuilder {
|
|
|
219
354
|
}
|
|
220
355
|
/**
|
|
221
356
|
* Sets a reference to an existing profile picture
|
|
357
|
+
*
|
|
358
|
+
* @param pfpTopicId Topic ID containing the profile picture (for reuse)
|
|
222
359
|
*/
|
|
223
360
|
setExistingProfilePicture(pfpTopicId) {
|
|
224
361
|
this.config.existingPfpTopicId = pfpTopicId;
|
|
@@ -226,6 +363,8 @@ class MCPServerBuilder {
|
|
|
226
363
|
}
|
|
227
364
|
/**
|
|
228
365
|
* Sets the network type (mainnet or testnet)
|
|
366
|
+
*
|
|
367
|
+
* @param network Network type ("mainnet" or "testnet")
|
|
229
368
|
*/
|
|
230
369
|
setNetworkType(network) {
|
|
231
370
|
this.config.network = network;
|
|
@@ -233,6 +372,9 @@ class MCPServerBuilder {
|
|
|
233
372
|
}
|
|
234
373
|
/**
|
|
235
374
|
* Sets an existing account to use for the MCP server
|
|
375
|
+
*
|
|
376
|
+
* @param accountId Hedera account ID (e.g., "0.0.12345678")
|
|
377
|
+
* @param privateKey ED25519 private key as a string
|
|
236
378
|
*/
|
|
237
379
|
setExistingAccount(accountId, privateKey) {
|
|
238
380
|
this.config.existingAccount = {
|
|
@@ -243,6 +385,9 @@ class MCPServerBuilder {
|
|
|
243
385
|
}
|
|
244
386
|
/**
|
|
245
387
|
* Builds and validates the MCP server configuration
|
|
388
|
+
*
|
|
389
|
+
* @returns Complete MCPServerConfig object ready for use
|
|
390
|
+
* @throws Error if required fields are missing
|
|
246
391
|
*/
|
|
247
392
|
build() {
|
|
248
393
|
if (!this.config.name) {
|