@manifest-network/manifest-mcp-browser 0.1.0
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/.claude/settings.local.json +17 -0
- package/.github/workflows/ci.yml +37 -0
- package/.github/workflows/publish.yml +51 -0
- package/CLAUDE.md +104 -0
- package/LICENSE +21 -0
- package/README.md +298 -0
- package/dist/browser.d.ts.map +1 -0
- package/dist/browser.js.map +1 -0
- package/dist/client.d.ts +44 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +131 -0
- package/dist/client.js.map +1 -0
- package/dist/config.d.ts +21 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +98 -0
- package/dist/config.js.map +1 -0
- package/dist/config.test.d.ts +2 -0
- package/dist/config.test.d.ts.map +1 -0
- package/dist/config.test.js +123 -0
- package/dist/config.test.js.map +1 -0
- package/dist/cosmos.d.ts +11 -0
- package/dist/cosmos.d.ts.map +1 -0
- package/dist/cosmos.js +112 -0
- package/dist/cosmos.js.map +1 -0
- package/dist/index.d.ts +70 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +382 -0
- package/dist/index.js.map +1 -0
- package/dist/modules.d.ts +30 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/modules.js +221 -0
- package/dist/modules.js.map +1 -0
- package/dist/modules.test.d.ts +2 -0
- package/dist/modules.test.d.ts.map +1 -0
- package/dist/modules.test.js +100 -0
- package/dist/modules.test.js.map +1 -0
- package/dist/queries/auth.d.ts +6 -0
- package/dist/queries/auth.d.ts.map +1 -0
- package/dist/queries/auth.js +93 -0
- package/dist/queries/auth.js.map +1 -0
- package/dist/queries/bank.d.ts +6 -0
- package/dist/queries/bank.d.ts.map +1 -0
- package/dist/queries/bank.js +83 -0
- package/dist/queries/bank.js.map +1 -0
- package/dist/queries/billing.d.ts +6 -0
- package/dist/queries/billing.d.ts.map +1 -0
- package/dist/queries/billing.js +115 -0
- package/dist/queries/billing.js.map +1 -0
- package/dist/queries/distribution.d.ts +6 -0
- package/dist/queries/distribution.d.ts.map +1 -0
- package/dist/queries/distribution.js +102 -0
- package/dist/queries/distribution.js.map +1 -0
- package/dist/queries/gov.d.ts +6 -0
- package/dist/queries/gov.d.ts.map +1 -0
- package/dist/queries/gov.js +92 -0
- package/dist/queries/gov.js.map +1 -0
- package/dist/queries/index.d.ts +8 -0
- package/dist/queries/index.d.ts.map +1 -0
- package/dist/queries/index.js +8 -0
- package/dist/queries/index.js.map +1 -0
- package/dist/queries/manifest.d.ts +10 -0
- package/dist/queries/manifest.d.ts.map +1 -0
- package/dist/queries/manifest.js +14 -0
- package/dist/queries/manifest.js.map +1 -0
- package/dist/queries/staking.d.ts +6 -0
- package/dist/queries/staking.d.ts.map +1 -0
- package/dist/queries/staking.js +141 -0
- package/dist/queries/staking.js.map +1 -0
- package/dist/queries/utils.d.ts +22 -0
- package/dist/queries/utils.d.ts.map +1 -0
- package/dist/queries/utils.js +32 -0
- package/dist/queries/utils.js.map +1 -0
- package/dist/queries/utils.test.d.ts +2 -0
- package/dist/queries/utils.test.d.ts.map +1 -0
- package/dist/queries/utils.test.js +57 -0
- package/dist/queries/utils.test.js.map +1 -0
- package/dist/transactions/bank.d.ts +7 -0
- package/dist/transactions/bank.d.ts.map +1 -0
- package/dist/transactions/bank.js +76 -0
- package/dist/transactions/bank.js.map +1 -0
- package/dist/transactions/billing.d.ts +7 -0
- package/dist/transactions/billing.d.ts.map +1 -0
- package/dist/transactions/billing.js +108 -0
- package/dist/transactions/billing.js.map +1 -0
- package/dist/transactions/distribution.d.ts +7 -0
- package/dist/transactions/distribution.d.ts.map +1 -0
- package/dist/transactions/distribution.js +63 -0
- package/dist/transactions/distribution.js.map +1 -0
- package/dist/transactions/gov.d.ts +7 -0
- package/dist/transactions/gov.d.ts.map +1 -0
- package/dist/transactions/gov.js +132 -0
- package/dist/transactions/gov.js.map +1 -0
- package/dist/transactions/index.d.ts +8 -0
- package/dist/transactions/index.d.ts.map +1 -0
- package/dist/transactions/index.js +8 -0
- package/dist/transactions/index.js.map +1 -0
- package/dist/transactions/manifest.d.ts +7 -0
- package/dist/transactions/manifest.d.ts.map +1 -0
- package/dist/transactions/manifest.js +58 -0
- package/dist/transactions/manifest.js.map +1 -0
- package/dist/transactions/staking.d.ts +7 -0
- package/dist/transactions/staking.d.ts.map +1 -0
- package/dist/transactions/staking.js +72 -0
- package/dist/transactions/staking.js.map +1 -0
- package/dist/transactions/utils.d.ts +40 -0
- package/dist/transactions/utils.d.ts.map +1 -0
- package/dist/transactions/utils.js +114 -0
- package/dist/transactions/utils.js.map +1 -0
- package/dist/transactions/utils.test.d.ts +2 -0
- package/dist/transactions/utils.test.d.ts.map +1 -0
- package/dist/transactions/utils.test.js +121 -0
- package/dist/transactions/utils.test.js.map +1 -0
- package/dist/types.d.ts +110 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +55 -0
- package/dist/types.js.map +1 -0
- package/dist/wallet/index.d.ts +3 -0
- package/dist/wallet/index.d.ts.map +1 -0
- package/dist/wallet/index.js +2 -0
- package/dist/wallet/index.js.map +1 -0
- package/dist/wallet/keplr.d.ts.map +1 -0
- package/dist/wallet/keplr.js.map +1 -0
- package/dist/wallet/mnemonic.d.ts +40 -0
- package/dist/wallet/mnemonic.d.ts.map +1 -0
- package/dist/wallet/mnemonic.js +87 -0
- package/dist/wallet/mnemonic.js.map +1 -0
- package/package.json +40 -0
- package/src/client.ts +178 -0
- package/src/config.test.ts +143 -0
- package/src/config.ts +122 -0
- package/src/cosmos.ts +196 -0
- package/src/index.ts +484 -0
- package/src/modules.test.ts +127 -0
- package/src/modules.ts +278 -0
- package/src/queries/auth.ts +136 -0
- package/src/queries/bank.ts +117 -0
- package/src/queries/billing.ts +164 -0
- package/src/queries/distribution.ts +138 -0
- package/src/queries/gov.ts +128 -0
- package/src/queries/index.ts +7 -0
- package/src/queries/staking.ts +190 -0
- package/src/queries/utils.test.ts +61 -0
- package/src/queries/utils.ts +38 -0
- package/src/transactions/bank.ts +110 -0
- package/src/transactions/billing.ts +160 -0
- package/src/transactions/distribution.ts +98 -0
- package/src/transactions/gov.ts +185 -0
- package/src/transactions/index.ts +7 -0
- package/src/transactions/manifest.ts +89 -0
- package/src/transactions/staking.ts +107 -0
- package/src/transactions/utils.test.ts +129 -0
- package/src/transactions/utils.ts +156 -0
- package/src/types.ts +152 -0
- package/src/wallet/index.ts +2 -0
- package/src/wallet/mnemonic.ts +122 -0
- package/tsconfig.json +23 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,382 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { ListToolsRequestSchema, CallToolRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { CosmosClientManager } from './client.js';
|
|
4
|
+
import { cosmosQuery, cosmosTx } from './cosmos.js';
|
|
5
|
+
import { getAvailableModules, getModuleSubcommands } from './modules.js';
|
|
6
|
+
import { ManifestMCPError, ManifestMCPErrorCode, } from './types.js';
|
|
7
|
+
import { createValidatedConfig } from './config.js';
|
|
8
|
+
/**
|
|
9
|
+
* Sensitive field names that should be redacted from error responses
|
|
10
|
+
*/
|
|
11
|
+
const SENSITIVE_FIELDS = new Set([
|
|
12
|
+
'mnemonic',
|
|
13
|
+
'privatekey',
|
|
14
|
+
'private_key',
|
|
15
|
+
'secret',
|
|
16
|
+
'password',
|
|
17
|
+
'seed',
|
|
18
|
+
'key',
|
|
19
|
+
'token',
|
|
20
|
+
'apikey',
|
|
21
|
+
'api_key',
|
|
22
|
+
]);
|
|
23
|
+
/**
|
|
24
|
+
* Recursively sanitize an object by redacting sensitive fields
|
|
25
|
+
*/
|
|
26
|
+
function sanitizeForLogging(obj, depth = 0) {
|
|
27
|
+
// Prevent infinite recursion
|
|
28
|
+
if (depth > 10) {
|
|
29
|
+
return '[max depth exceeded]';
|
|
30
|
+
}
|
|
31
|
+
if (obj === null || obj === undefined) {
|
|
32
|
+
return obj;
|
|
33
|
+
}
|
|
34
|
+
if (typeof obj === 'string') {
|
|
35
|
+
// Redact strings that look like mnemonics (12 or 24 words)
|
|
36
|
+
const wordCount = obj.trim().split(/\s+/).length;
|
|
37
|
+
if (wordCount === 12 || wordCount === 24) {
|
|
38
|
+
return '[REDACTED - possible mnemonic]';
|
|
39
|
+
}
|
|
40
|
+
return obj;
|
|
41
|
+
}
|
|
42
|
+
if (Array.isArray(obj)) {
|
|
43
|
+
return obj.map(item => sanitizeForLogging(item, depth + 1));
|
|
44
|
+
}
|
|
45
|
+
if (typeof obj === 'object') {
|
|
46
|
+
const sanitized = {};
|
|
47
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
48
|
+
const lowerKey = key.toLowerCase();
|
|
49
|
+
if (SENSITIVE_FIELDS.has(lowerKey)) {
|
|
50
|
+
sanitized[key] = '[REDACTED]';
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
sanitized[key] = sanitizeForLogging(value, depth + 1);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return sanitized;
|
|
57
|
+
}
|
|
58
|
+
return obj;
|
|
59
|
+
}
|
|
60
|
+
// Re-export types and utilities
|
|
61
|
+
export * from './types.js';
|
|
62
|
+
export { createConfig, createValidatedConfig, validateConfig } from './config.js';
|
|
63
|
+
export { CosmosClientManager } from './client.js';
|
|
64
|
+
export { cosmosQuery, cosmosTx } from './cosmos.js';
|
|
65
|
+
export { getAvailableModules, getModuleSubcommands, getSubcommandUsage, getSupportedModules, isSubcommandSupported } from './modules.js';
|
|
66
|
+
export { MnemonicWalletProvider } from './wallet/index.js';
|
|
67
|
+
/**
|
|
68
|
+
* Tool definitions for the MCP server
|
|
69
|
+
*/
|
|
70
|
+
const tools = [
|
|
71
|
+
{
|
|
72
|
+
name: 'get_account_info',
|
|
73
|
+
description: 'Get account address and key name for the configured key',
|
|
74
|
+
inputSchema: {
|
|
75
|
+
type: 'object',
|
|
76
|
+
properties: {},
|
|
77
|
+
required: [],
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: 'cosmos_query',
|
|
82
|
+
description: 'Execute any Cosmos SDK query command. Use list_modules and list_module_subcommands to discover available options.',
|
|
83
|
+
inputSchema: {
|
|
84
|
+
type: 'object',
|
|
85
|
+
properties: {
|
|
86
|
+
module: {
|
|
87
|
+
type: 'string',
|
|
88
|
+
description: 'The module name (e.g., "bank", "staking", "distribution", "gov", "auth")',
|
|
89
|
+
},
|
|
90
|
+
subcommand: {
|
|
91
|
+
type: 'string',
|
|
92
|
+
description: 'The subcommand (e.g., "balance", "balances", "delegations", "rewards", "proposals")',
|
|
93
|
+
},
|
|
94
|
+
args: {
|
|
95
|
+
type: 'array',
|
|
96
|
+
items: { type: 'string' },
|
|
97
|
+
description: 'Additional arguments as an array of strings (e.g., ["<address>", "umfx"] for bank balance). Use array to preserve arguments with spaces.',
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
required: ['module', 'subcommand'],
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'cosmos_tx',
|
|
105
|
+
description: 'Execute any Cosmos SDK transaction. Automatically signs with the configured key and estimates gas. Use list_modules and list_module_subcommands to discover available options.',
|
|
106
|
+
inputSchema: {
|
|
107
|
+
type: 'object',
|
|
108
|
+
properties: {
|
|
109
|
+
module: {
|
|
110
|
+
type: 'string',
|
|
111
|
+
description: 'The module name (e.g., "bank", "staking", "gov")',
|
|
112
|
+
},
|
|
113
|
+
subcommand: {
|
|
114
|
+
type: 'string',
|
|
115
|
+
description: 'The subcommand (e.g., "send", "delegate", "unbond", "vote")',
|
|
116
|
+
},
|
|
117
|
+
args: {
|
|
118
|
+
type: 'array',
|
|
119
|
+
items: { type: 'string' },
|
|
120
|
+
description: 'Arguments to the transaction as an array of strings (e.g., ["<to_address>", "1000umfx"] for bank send). Use array to preserve arguments with spaces.',
|
|
121
|
+
},
|
|
122
|
+
wait_for_confirmation: {
|
|
123
|
+
type: 'boolean',
|
|
124
|
+
description: 'If true, wait for the transaction to be included in a block before returning. Defaults to false (broadcast only).',
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
required: ['module', 'subcommand', 'args'],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'list_modules',
|
|
132
|
+
description: 'List all available query and transaction modules supported by the chain',
|
|
133
|
+
inputSchema: {
|
|
134
|
+
type: 'object',
|
|
135
|
+
properties: {},
|
|
136
|
+
required: [],
|
|
137
|
+
},
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
name: 'list_module_subcommands',
|
|
141
|
+
description: 'List all available subcommands for a specific module (query or tx)',
|
|
142
|
+
inputSchema: {
|
|
143
|
+
type: 'object',
|
|
144
|
+
properties: {
|
|
145
|
+
type: {
|
|
146
|
+
type: 'string',
|
|
147
|
+
enum: ['query', 'tx'],
|
|
148
|
+
description: 'Whether to list query or transaction subcommands',
|
|
149
|
+
},
|
|
150
|
+
module: {
|
|
151
|
+
type: 'string',
|
|
152
|
+
description: 'The module name (e.g., "bank", "staking")',
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
required: ['type', 'module'],
|
|
156
|
+
},
|
|
157
|
+
},
|
|
158
|
+
];
|
|
159
|
+
/**
|
|
160
|
+
* ManifestMCPServer class for browser-compatible MCP server
|
|
161
|
+
*/
|
|
162
|
+
export class ManifestMCPServer {
|
|
163
|
+
constructor(options) {
|
|
164
|
+
this.config = createValidatedConfig(options.config);
|
|
165
|
+
this.walletProvider = options.walletProvider;
|
|
166
|
+
this.clientManager = CosmosClientManager.getInstance(this.config, this.walletProvider);
|
|
167
|
+
// Note: Keep version in sync with package.json
|
|
168
|
+
this.server = new Server({
|
|
169
|
+
name: '@manifest-network/manifest-mcp-browser',
|
|
170
|
+
version: '0.1.0',
|
|
171
|
+
}, {
|
|
172
|
+
capabilities: {
|
|
173
|
+
tools: {},
|
|
174
|
+
},
|
|
175
|
+
});
|
|
176
|
+
this.setupHandlers();
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Set up the MCP request handlers
|
|
180
|
+
*/
|
|
181
|
+
setupHandlers() {
|
|
182
|
+
this.server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
183
|
+
tools,
|
|
184
|
+
}));
|
|
185
|
+
this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
|
186
|
+
const toolName = request.params.name;
|
|
187
|
+
const toolInput = request.params.arguments || {};
|
|
188
|
+
try {
|
|
189
|
+
return await this.handleToolCall(toolName, toolInput);
|
|
190
|
+
}
|
|
191
|
+
catch (error) {
|
|
192
|
+
// Build detailed error response with sanitized inputs
|
|
193
|
+
let errorResponse = {
|
|
194
|
+
error: true,
|
|
195
|
+
tool: toolName,
|
|
196
|
+
input: sanitizeForLogging(toolInput),
|
|
197
|
+
};
|
|
198
|
+
if (error instanceof ManifestMCPError) {
|
|
199
|
+
errorResponse = {
|
|
200
|
+
...errorResponse,
|
|
201
|
+
code: error.code,
|
|
202
|
+
message: error.message,
|
|
203
|
+
details: sanitizeForLogging(error.details),
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
else {
|
|
207
|
+
errorResponse = {
|
|
208
|
+
...errorResponse,
|
|
209
|
+
message: error instanceof Error ? error.message : String(error),
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
return {
|
|
213
|
+
content: [
|
|
214
|
+
{
|
|
215
|
+
type: 'text',
|
|
216
|
+
text: JSON.stringify(errorResponse, null, 2),
|
|
217
|
+
},
|
|
218
|
+
],
|
|
219
|
+
isError: true,
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
/**
|
|
225
|
+
* Handle a tool call
|
|
226
|
+
*/
|
|
227
|
+
async handleToolCall(toolName, toolInput) {
|
|
228
|
+
switch (toolName) {
|
|
229
|
+
case 'get_account_info': {
|
|
230
|
+
const address = await this.walletProvider.getAddress();
|
|
231
|
+
const accountInfo = {
|
|
232
|
+
address,
|
|
233
|
+
};
|
|
234
|
+
return {
|
|
235
|
+
content: [
|
|
236
|
+
{
|
|
237
|
+
type: 'text',
|
|
238
|
+
text: JSON.stringify(accountInfo, null, 2),
|
|
239
|
+
},
|
|
240
|
+
],
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
case 'cosmos_query': {
|
|
244
|
+
const module = toolInput.module;
|
|
245
|
+
const subcommand = toolInput.subcommand;
|
|
246
|
+
const rawArgs = toolInput.args;
|
|
247
|
+
// Handle both array and string inputs for args
|
|
248
|
+
let args;
|
|
249
|
+
if (Array.isArray(rawArgs)) {
|
|
250
|
+
args = rawArgs.map(String);
|
|
251
|
+
}
|
|
252
|
+
else if (typeof rawArgs === 'string' && rawArgs.length > 0) {
|
|
253
|
+
args = rawArgs.split(/\s+/);
|
|
254
|
+
}
|
|
255
|
+
else {
|
|
256
|
+
args = [];
|
|
257
|
+
}
|
|
258
|
+
if (!module || !subcommand) {
|
|
259
|
+
throw new ManifestMCPError(ManifestMCPErrorCode.QUERY_FAILED, 'module and subcommand are required');
|
|
260
|
+
}
|
|
261
|
+
const result = await cosmosQuery(this.clientManager, module, subcommand, args);
|
|
262
|
+
return {
|
|
263
|
+
content: [
|
|
264
|
+
{
|
|
265
|
+
type: 'text',
|
|
266
|
+
text: JSON.stringify(result, null, 2),
|
|
267
|
+
},
|
|
268
|
+
],
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
case 'cosmos_tx': {
|
|
272
|
+
const module = toolInput.module;
|
|
273
|
+
const subcommand = toolInput.subcommand;
|
|
274
|
+
const rawArgs = toolInput.args;
|
|
275
|
+
const waitForConfirmation = toolInput.wait_for_confirmation || false;
|
|
276
|
+
// Handle both array and string inputs for args
|
|
277
|
+
let args;
|
|
278
|
+
if (Array.isArray(rawArgs)) {
|
|
279
|
+
args = rawArgs.map(String);
|
|
280
|
+
}
|
|
281
|
+
else if (typeof rawArgs === 'string' && rawArgs.length > 0) {
|
|
282
|
+
args = rawArgs.split(/\s+/);
|
|
283
|
+
}
|
|
284
|
+
else {
|
|
285
|
+
args = [];
|
|
286
|
+
}
|
|
287
|
+
if (!module || !subcommand || args.length === 0) {
|
|
288
|
+
throw new ManifestMCPError(ManifestMCPErrorCode.TX_FAILED, 'module, subcommand, and args are required');
|
|
289
|
+
}
|
|
290
|
+
const result = await cosmosTx(this.clientManager, module, subcommand, args, waitForConfirmation);
|
|
291
|
+
return {
|
|
292
|
+
content: [
|
|
293
|
+
{
|
|
294
|
+
type: 'text',
|
|
295
|
+
text: JSON.stringify(result, null, 2),
|
|
296
|
+
},
|
|
297
|
+
],
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
case 'list_modules': {
|
|
301
|
+
const modules = getAvailableModules();
|
|
302
|
+
return {
|
|
303
|
+
content: [
|
|
304
|
+
{
|
|
305
|
+
type: 'text',
|
|
306
|
+
text: JSON.stringify(modules, null, 2),
|
|
307
|
+
},
|
|
308
|
+
],
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
case 'list_module_subcommands': {
|
|
312
|
+
const type = toolInput.type;
|
|
313
|
+
const module = toolInput.module;
|
|
314
|
+
if (!type || !module) {
|
|
315
|
+
throw new ManifestMCPError(ManifestMCPErrorCode.QUERY_FAILED, 'type and module are required');
|
|
316
|
+
}
|
|
317
|
+
if (type !== 'query' && type !== 'tx') {
|
|
318
|
+
throw new ManifestMCPError(ManifestMCPErrorCode.QUERY_FAILED, 'type must be either "query" or "tx"');
|
|
319
|
+
}
|
|
320
|
+
const subcommands = getModuleSubcommands(type, module);
|
|
321
|
+
return {
|
|
322
|
+
content: [
|
|
323
|
+
{
|
|
324
|
+
type: 'text',
|
|
325
|
+
text: JSON.stringify({
|
|
326
|
+
type,
|
|
327
|
+
module,
|
|
328
|
+
subcommands,
|
|
329
|
+
}, null, 2),
|
|
330
|
+
},
|
|
331
|
+
],
|
|
332
|
+
};
|
|
333
|
+
}
|
|
334
|
+
default:
|
|
335
|
+
throw new ManifestMCPError(ManifestMCPErrorCode.UNKNOWN_ERROR, `Unknown tool: ${toolName}`);
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
/**
|
|
339
|
+
* Get the underlying MCP server instance
|
|
340
|
+
*/
|
|
341
|
+
getServer() {
|
|
342
|
+
return this.server;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Get the client manager
|
|
346
|
+
*/
|
|
347
|
+
getClientManager() {
|
|
348
|
+
return this.clientManager;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Disconnect and clean up resources
|
|
352
|
+
*/
|
|
353
|
+
disconnect() {
|
|
354
|
+
this.clientManager.disconnect();
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Create a ManifestMCPServer with mnemonic wallet (for testing or non-interactive use)
|
|
359
|
+
*
|
|
360
|
+
* @example
|
|
361
|
+
* ```typescript
|
|
362
|
+
* import { createMnemonicServer } from '@manifest-network/manifest-mcp-browser';
|
|
363
|
+
*
|
|
364
|
+
* const server = await createMnemonicServer({
|
|
365
|
+
* chainId: 'manifest-ledger-testnet',
|
|
366
|
+
* rpcUrl: 'https://nodes.chandrastation.com/rpc/manifest/',
|
|
367
|
+
* gasPrice: '1.0umfx',
|
|
368
|
+
* mnemonic: 'your twelve word mnemonic phrase here...',
|
|
369
|
+
* });
|
|
370
|
+
* ```
|
|
371
|
+
*/
|
|
372
|
+
export async function createMnemonicServer(config) {
|
|
373
|
+
const { MnemonicWalletProvider } = await import('./wallet/mnemonic.js');
|
|
374
|
+
const { mnemonic, ...mcpConfig } = config;
|
|
375
|
+
const walletProvider = new MnemonicWalletProvider(mcpConfig, mnemonic);
|
|
376
|
+
await walletProvider.connect();
|
|
377
|
+
return new ManifestMCPServer({
|
|
378
|
+
config: mcpConfig,
|
|
379
|
+
walletProvider,
|
|
380
|
+
});
|
|
381
|
+
}
|
|
382
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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ED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;IAClC,CAAC;CACF;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,MAO1C;IACC,MAAM,EAAE,sBAAsB,EAAE,GAAG,MAAM,MAAM,CAAC,sBAAsB,CAAC,CAAC;IAExE,MAAM,EAAE,QAAQ,EAAE,GAAG,SAAS,EAAE,GAAG,MAAM,CAAC;IAC1C,MAAM,cAAc,GAAG,IAAI,sBAAsB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACvE,MAAM,cAAc,CAAC,OAAO,EAAE,CAAC;IAE/B,OAAO,IAAI,iBAAiB,CAAC;QAC3B,MAAM,EAAE,SAAS;QACjB,cAAc;KACf,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ModuleInfo, AvailableModules } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Get all available query and transaction modules
|
|
4
|
+
*/
|
|
5
|
+
export declare function getAvailableModules(): AvailableModules;
|
|
6
|
+
/**
|
|
7
|
+
* Get available subcommands for a specific module
|
|
8
|
+
*/
|
|
9
|
+
export declare function getModuleSubcommands(type: 'query' | 'tx', module: string): ModuleInfo[];
|
|
10
|
+
/**
|
|
11
|
+
* Check if a module/subcommand combination is supported
|
|
12
|
+
*/
|
|
13
|
+
export declare function isSubcommandSupported(type: 'query' | 'tx', module: string, subcommand: string): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Get usage help for a specific subcommand
|
|
16
|
+
* Returns the args string if available, or undefined
|
|
17
|
+
*/
|
|
18
|
+
export declare function getSubcommandUsage(type: 'query' | 'tx', module: string, subcommand: string): string | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Get supported modules list
|
|
21
|
+
*/
|
|
22
|
+
export declare function getSupportedModules(): {
|
|
23
|
+
query: {
|
|
24
|
+
[module: string]: string[];
|
|
25
|
+
};
|
|
26
|
+
tx: {
|
|
27
|
+
[module: string]: string[];
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=modules.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.d.ts","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAA0C,MAAM,YAAY,CAAC;AAyKlG;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,gBAAgB,CAmBtD;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,MAAM,EAAE,MAAM,GACb,UAAU,EAAE,CAiBd;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,OAAO,CAST;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,OAAO,GAAG,IAAI,EACpB,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,GACjB,MAAM,GAAG,SAAS,CAUpB;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI;IACrC,KAAK,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;IACtC,EAAE,EAAE;QAAE,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;KAAE,CAAC;CACpC,CAeA"}
|
package/dist/modules.js
ADDED
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import { ManifestMCPError, ManifestMCPErrorCode } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Query modules registry
|
|
4
|
+
*/
|
|
5
|
+
const QUERY_MODULES = {
|
|
6
|
+
bank: {
|
|
7
|
+
description: 'Querying commands for the bank module',
|
|
8
|
+
subcommands: [
|
|
9
|
+
{ name: 'balance', description: 'Query account balance for a specific denom' },
|
|
10
|
+
{ name: 'balances', description: 'Query all balances for an account' },
|
|
11
|
+
{ name: 'spendable-balances', description: 'Query spendable balances for an account' },
|
|
12
|
+
{ name: 'total-supply', description: 'Query total supply of all tokens' },
|
|
13
|
+
{ name: 'total', description: 'Query total supply of all tokens (alias for total-supply)' },
|
|
14
|
+
{ name: 'supply-of', description: 'Query supply of a specific denom' },
|
|
15
|
+
{ name: 'params', description: 'Query bank parameters' },
|
|
16
|
+
{ name: 'denom-metadata', description: 'Query metadata for a specific denom' },
|
|
17
|
+
{ name: 'denoms-metadata', description: 'Query metadata for all denoms' },
|
|
18
|
+
{ name: 'send-enabled', description: 'Query send enabled status for denoms' },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
staking: {
|
|
22
|
+
description: 'Querying commands for the staking module',
|
|
23
|
+
subcommands: [
|
|
24
|
+
{ name: 'delegation', description: 'Query a delegation' },
|
|
25
|
+
{ name: 'delegations', description: 'Query all delegations for a delegator' },
|
|
26
|
+
{ name: 'unbonding-delegation', description: 'Query an unbonding delegation' },
|
|
27
|
+
{ name: 'unbonding-delegations', description: 'Query all unbonding delegations for a delegator' },
|
|
28
|
+
{ name: 'redelegations', description: 'Query redelegations' },
|
|
29
|
+
{ name: 'validator', description: 'Query a validator' },
|
|
30
|
+
{ name: 'validators', description: 'Query all validators' },
|
|
31
|
+
{ name: 'validator-delegations', description: 'Query all delegations to a validator' },
|
|
32
|
+
{ name: 'validator-unbonding-delegations', description: 'Query all unbonding delegations from a validator' },
|
|
33
|
+
{ name: 'pool', description: 'Query staking pool' },
|
|
34
|
+
{ name: 'params', description: 'Query staking parameters' },
|
|
35
|
+
{ name: 'historical-info', description: 'Query historical info at a height' },
|
|
36
|
+
],
|
|
37
|
+
},
|
|
38
|
+
distribution: {
|
|
39
|
+
description: 'Querying commands for the distribution module',
|
|
40
|
+
subcommands: [
|
|
41
|
+
{ name: 'rewards', description: 'Query distribution rewards for a delegator' },
|
|
42
|
+
{ name: 'commission', description: 'Query validator commission' },
|
|
43
|
+
{ name: 'community-pool', description: 'Query community pool coins' },
|
|
44
|
+
{ name: 'params', description: 'Query distribution parameters' },
|
|
45
|
+
{ name: 'validator-outstanding-rewards', description: 'Query validator outstanding rewards' },
|
|
46
|
+
{ name: 'slashes', description: 'Query slashes for a validator' },
|
|
47
|
+
{ name: 'delegator-validators', description: 'Query validators for a delegator' },
|
|
48
|
+
{ name: 'delegator-withdraw-address', description: 'Query delegator withdraw address' },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
gov: {
|
|
52
|
+
description: 'Querying commands for the governance module',
|
|
53
|
+
subcommands: [
|
|
54
|
+
{ name: 'proposal', description: 'Query a proposal by ID' },
|
|
55
|
+
{ name: 'proposals', description: 'Query all proposals' },
|
|
56
|
+
{ name: 'vote', description: 'Query a vote on a proposal' },
|
|
57
|
+
{ name: 'votes', description: 'Query all votes on a proposal' },
|
|
58
|
+
{ name: 'deposit', description: 'Query a deposit on a proposal' },
|
|
59
|
+
{ name: 'deposits', description: 'Query all deposits on a proposal' },
|
|
60
|
+
{ name: 'tally', description: 'Query tally of a proposal' },
|
|
61
|
+
{ name: 'params', description: 'Query governance parameters' },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
auth: {
|
|
65
|
+
description: 'Querying commands for the auth module',
|
|
66
|
+
subcommands: [
|
|
67
|
+
{ name: 'account', description: 'Query account by address' },
|
|
68
|
+
{ name: 'accounts', description: 'Query all accounts' },
|
|
69
|
+
{ name: 'params', description: 'Query auth parameters' },
|
|
70
|
+
{ name: 'module-accounts', description: 'Query all module accounts' },
|
|
71
|
+
{ name: 'module-account-by-name', description: 'Query module account by name' },
|
|
72
|
+
{ name: 'address-bytes-to-string', description: 'Convert address bytes to string' },
|
|
73
|
+
{ name: 'address-string-to-bytes', description: 'Convert address string to bytes' },
|
|
74
|
+
{ name: 'bech32-prefix', description: 'Query bech32 prefix' },
|
|
75
|
+
{ name: 'account-info', description: 'Query account info' },
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
billing: {
|
|
79
|
+
description: 'Querying commands for the Manifest billing module',
|
|
80
|
+
subcommands: [
|
|
81
|
+
{ name: 'params', description: 'Query billing parameters' },
|
|
82
|
+
{ name: 'lease', description: 'Query a lease by UUID' },
|
|
83
|
+
{ name: 'leases', description: 'Query all leases' },
|
|
84
|
+
{ name: 'leases-by-tenant', description: 'Query leases by tenant address' },
|
|
85
|
+
{ name: 'leases-by-provider', description: 'Query leases by provider' },
|
|
86
|
+
{ name: 'leases-by-sku', description: 'Query leases by SKU UUID' },
|
|
87
|
+
{ name: 'credit-account', description: 'Query credit account for a tenant' },
|
|
88
|
+
{ name: 'credit-accounts', description: 'Query all credit accounts' },
|
|
89
|
+
{ name: 'credit-address', description: 'Query credit address for a tenant' },
|
|
90
|
+
{ name: 'withdrawable-amount', description: 'Query withdrawable amount for a lease' },
|
|
91
|
+
{ name: 'provider-withdrawable', description: 'Query withdrawable amount for a provider' },
|
|
92
|
+
{ name: 'credit-estimate', description: 'Query credit estimate for a tenant' },
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Transaction modules registry
|
|
98
|
+
*/
|
|
99
|
+
const TX_MODULES = {
|
|
100
|
+
bank: {
|
|
101
|
+
description: 'Bank transaction subcommands',
|
|
102
|
+
subcommands: [
|
|
103
|
+
{ name: 'send', description: 'Send tokens to another account', args: '<to-address> <amount> (e.g., manifest1abc... 1000000umfx)' },
|
|
104
|
+
{ name: 'multi-send', description: 'Send tokens to multiple accounts', args: '<to-address:amount>... (e.g., manifest1a:1000umfx manifest1b:2000umfx)' },
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
staking: {
|
|
108
|
+
description: 'Staking transaction subcommands',
|
|
109
|
+
subcommands: [
|
|
110
|
+
{ name: 'delegate', description: 'Delegate tokens to a validator' },
|
|
111
|
+
{ name: 'unbond', description: 'Unbond tokens from a validator' },
|
|
112
|
+
{ name: 'undelegate', description: 'Unbond tokens from a validator (alias for unbond)' },
|
|
113
|
+
{ name: 'redelegate', description: 'Redelegate tokens from one validator to another' },
|
|
114
|
+
],
|
|
115
|
+
},
|
|
116
|
+
distribution: {
|
|
117
|
+
description: 'Distribution transaction subcommands',
|
|
118
|
+
subcommands: [
|
|
119
|
+
{ name: 'withdraw-rewards', description: 'Withdraw rewards from a validator' },
|
|
120
|
+
{ name: 'set-withdraw-addr', description: 'Set withdraw address' },
|
|
121
|
+
{ name: 'fund-community-pool', description: 'Fund the community pool' },
|
|
122
|
+
],
|
|
123
|
+
},
|
|
124
|
+
gov: {
|
|
125
|
+
description: 'Governance transaction subcommands',
|
|
126
|
+
subcommands: [
|
|
127
|
+
{ name: 'vote', description: 'Vote on a proposal' },
|
|
128
|
+
{ name: 'weighted-vote', description: 'Weighted vote on a proposal' },
|
|
129
|
+
{ name: 'deposit', description: 'Deposit tokens for a proposal' },
|
|
130
|
+
],
|
|
131
|
+
},
|
|
132
|
+
billing: {
|
|
133
|
+
description: 'Manifest billing transaction subcommands',
|
|
134
|
+
subcommands: [
|
|
135
|
+
{ name: 'fund-credit', description: 'Fund credit for a tenant', args: '<tenant-address> <amount> (e.g., manifest1abc... 1000000umfx)' },
|
|
136
|
+
{ name: 'create-lease', description: 'Create a new lease', args: '<sku-uuid:quantity>... (e.g., sku-123:1 sku-456:2)' },
|
|
137
|
+
{ name: 'close-lease', description: 'Close one or more leases', args: '<lease-uuid>... (e.g., lease-123 lease-456)' },
|
|
138
|
+
{ name: 'withdraw', description: 'Withdraw earnings from leases', args: '<lease-uuid>... OR --provider <provider-uuid>' },
|
|
139
|
+
],
|
|
140
|
+
},
|
|
141
|
+
manifest: {
|
|
142
|
+
description: 'Manifest module transaction subcommands',
|
|
143
|
+
subcommands: [
|
|
144
|
+
{ name: 'payout', description: 'Execute a payout to multiple addresses' },
|
|
145
|
+
{ name: 'burn-held-balance', description: 'Burn held balance' },
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Get all available query and transaction modules
|
|
151
|
+
*/
|
|
152
|
+
export function getAvailableModules() {
|
|
153
|
+
const queryModules = Object.entries(QUERY_MODULES).map(([name, info]) => ({
|
|
154
|
+
name,
|
|
155
|
+
description: info.description,
|
|
156
|
+
}));
|
|
157
|
+
const txModules = Object.entries(TX_MODULES).map(([name, info]) => ({
|
|
158
|
+
name,
|
|
159
|
+
description: info.description,
|
|
160
|
+
}));
|
|
161
|
+
return {
|
|
162
|
+
queryModules,
|
|
163
|
+
txModules,
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Get available subcommands for a specific module
|
|
168
|
+
*/
|
|
169
|
+
export function getModuleSubcommands(type, module) {
|
|
170
|
+
const registry = type === 'query' ? QUERY_MODULES : TX_MODULES;
|
|
171
|
+
const moduleInfo = registry[module];
|
|
172
|
+
if (!moduleInfo) {
|
|
173
|
+
throw new ManifestMCPError(ManifestMCPErrorCode.UNKNOWN_MODULE, `Unknown ${type} module: ${module}`, { availableModules: Object.keys(registry) });
|
|
174
|
+
}
|
|
175
|
+
return moduleInfo.subcommands.map((sub) => ({
|
|
176
|
+
name: sub.name,
|
|
177
|
+
description: sub.description,
|
|
178
|
+
args: sub.args,
|
|
179
|
+
}));
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Check if a module/subcommand combination is supported
|
|
183
|
+
*/
|
|
184
|
+
export function isSubcommandSupported(type, module, subcommand) {
|
|
185
|
+
const registry = type === 'query' ? QUERY_MODULES : TX_MODULES;
|
|
186
|
+
const moduleInfo = registry[module];
|
|
187
|
+
if (!moduleInfo) {
|
|
188
|
+
return false;
|
|
189
|
+
}
|
|
190
|
+
return moduleInfo.subcommands.some((s) => s.name === subcommand);
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Get usage help for a specific subcommand
|
|
194
|
+
* Returns the args string if available, or undefined
|
|
195
|
+
*/
|
|
196
|
+
export function getSubcommandUsage(type, module, subcommand) {
|
|
197
|
+
const registry = type === 'query' ? QUERY_MODULES : TX_MODULES;
|
|
198
|
+
const moduleInfo = registry[module];
|
|
199
|
+
if (!moduleInfo) {
|
|
200
|
+
return undefined;
|
|
201
|
+
}
|
|
202
|
+
const sub = moduleInfo.subcommands.find((s) => s.name === subcommand);
|
|
203
|
+
return sub?.args;
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Get supported modules list
|
|
207
|
+
*/
|
|
208
|
+
export function getSupportedModules() {
|
|
209
|
+
const result = {
|
|
210
|
+
query: {},
|
|
211
|
+
tx: {},
|
|
212
|
+
};
|
|
213
|
+
for (const [module, info] of Object.entries(QUERY_MODULES)) {
|
|
214
|
+
result.query[module] = info.subcommands.map((s) => s.name);
|
|
215
|
+
}
|
|
216
|
+
for (const [module, info] of Object.entries(TX_MODULES)) {
|
|
217
|
+
result.tx[module] = info.subcommands.map((s) => s.name);
|
|
218
|
+
}
|
|
219
|
+
return result;
|
|
220
|
+
}
|
|
221
|
+
//# sourceMappingURL=modules.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modules.js","sourceRoot":"","sources":["../src/modules.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAoBlG;;GAEG;AACH,MAAM,aAAa,GAAmB;IACpC,IAAI,EAAE;QACJ,WAAW,EAAE,uCAAuC;QACpD,WAAW,EAAE;YACX,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,4CAA4C,EAAE;YAC9E,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,mCAAmC,EAAE;YACtE,EAAE,IAAI,EAAE,oBAAoB,EAAE,WAAW,EAAE,yCAAyC,EAAE;YACtF,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,kCAAkC,EAAE;YACzE,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,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