@goplausible/algorand-mcp 4.2.4 → 4.2.5
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/networkConfig.js +3 -3
- package/dist/tools/apiManager/indexer/account.js +5 -5
- package/dist/tools/apiManager/indexer/application.js +5 -5
- package/dist/tools/apiManager/indexer/asset.js +4 -4
- package/dist/tools/apiManager/indexer/transaction.js +3 -3
- package/dist/tools/commonParams.js +1 -1
- package/dist/tools/utilityManager.js +1 -1
- package/package.json +1 -1
package/dist/networkConfig.js
CHANGED
|
@@ -28,7 +28,7 @@ function getEndpoints(network) {
|
|
|
28
28
|
// Memoization caches
|
|
29
29
|
const algodClients = new Map();
|
|
30
30
|
const indexerClients = new Map();
|
|
31
|
-
export function getAlgodClient(network = '
|
|
31
|
+
export function getAlgodClient(network = 'testnet') {
|
|
32
32
|
const key = `${network}:${ALGORAND_TOKEN}`;
|
|
33
33
|
let client = algodClients.get(key);
|
|
34
34
|
if (!client) {
|
|
@@ -38,7 +38,7 @@ export function getAlgodClient(network = 'mainnet') {
|
|
|
38
38
|
}
|
|
39
39
|
return client;
|
|
40
40
|
}
|
|
41
|
-
export function getIndexerClient(network = '
|
|
41
|
+
export function getIndexerClient(network = 'testnet') {
|
|
42
42
|
const key = `${network}:${ALGORAND_TOKEN}`;
|
|
43
43
|
let client = indexerClients.get(key);
|
|
44
44
|
if (!client) {
|
|
@@ -53,5 +53,5 @@ export function extractNetwork(args) {
|
|
|
53
53
|
if (network && !['mainnet', 'testnet', 'localnet'].includes(network)) {
|
|
54
54
|
throw new Error(`Invalid network: ${network}. Must be mainnet, testnet, or localnet.`);
|
|
55
55
|
}
|
|
56
|
-
return (network || '
|
|
56
|
+
return (network || 'testnet');
|
|
57
57
|
}
|
|
@@ -109,7 +109,7 @@ export const accountTools = [
|
|
|
109
109
|
})
|
|
110
110
|
}
|
|
111
111
|
];
|
|
112
|
-
export async function lookupAccountByID(address, network = '
|
|
112
|
+
export async function lookupAccountByID(address, network = 'testnet') {
|
|
113
113
|
try {
|
|
114
114
|
const indexerClient = getIndexerClient(network);
|
|
115
115
|
console.error(`Looking up account info for address ${address}`);
|
|
@@ -125,7 +125,7 @@ export async function lookupAccountByID(address, network = 'mainnet') {
|
|
|
125
125
|
throw new McpError(ErrorCode.InternalError, `Failed to get account info: ${error instanceof Error ? error.message : String(error)}`);
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
export async function lookupAccountAssets(address, params, network = '
|
|
128
|
+
export async function lookupAccountAssets(address, params, network = 'testnet') {
|
|
129
129
|
try {
|
|
130
130
|
const indexerClient = getIndexerClient(network);
|
|
131
131
|
console.error(`Looking up assets for address ${address}`);
|
|
@@ -151,7 +151,7 @@ export async function lookupAccountAssets(address, params, network = 'mainnet')
|
|
|
151
151
|
throw new McpError(ErrorCode.InternalError, `Failed to get account assets: ${error instanceof Error ? error.message : String(error)}`);
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
|
-
export async function lookupAccountAppLocalStates(address, network = '
|
|
154
|
+
export async function lookupAccountAppLocalStates(address, network = 'testnet') {
|
|
155
155
|
try {
|
|
156
156
|
const indexerClient = getIndexerClient(network);
|
|
157
157
|
console.error(`Looking up app local states for address ${address}`);
|
|
@@ -167,7 +167,7 @@ export async function lookupAccountAppLocalStates(address, network = 'mainnet')
|
|
|
167
167
|
throw new McpError(ErrorCode.InternalError, `Failed to get account application local states: ${error instanceof Error ? error.message : String(error)}`);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
export async function lookupAccountCreatedApplications(address, network = '
|
|
170
|
+
export async function lookupAccountCreatedApplications(address, network = 'testnet') {
|
|
171
171
|
try {
|
|
172
172
|
const indexerClient = getIndexerClient(network);
|
|
173
173
|
console.error(`Looking up created applications for address ${address}`);
|
|
@@ -183,7 +183,7 @@ export async function lookupAccountCreatedApplications(address, network = 'mainn
|
|
|
183
183
|
throw new McpError(ErrorCode.InternalError, `Failed to get account created applications: ${error instanceof Error ? error.message : String(error)}`);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
export async function searchAccounts(params, network = '
|
|
186
|
+
export async function searchAccounts(params, network = 'testnet') {
|
|
187
187
|
try {
|
|
188
188
|
const indexerClient = getIndexerClient(network);
|
|
189
189
|
console.error('Searching accounts with params:', params);
|
|
@@ -118,7 +118,7 @@ export const applicationTools = [
|
|
|
118
118
|
// })
|
|
119
119
|
// }
|
|
120
120
|
];
|
|
121
|
-
export async function lookupApplications(appId, network = '
|
|
121
|
+
export async function lookupApplications(appId, network = 'testnet') {
|
|
122
122
|
try {
|
|
123
123
|
const indexerClient = getIndexerClient(network);
|
|
124
124
|
console.error(`Looking up application info for ID ${appId}`);
|
|
@@ -134,7 +134,7 @@ export async function lookupApplications(appId, network = 'mainnet') {
|
|
|
134
134
|
throw new McpError(ErrorCode.InternalError, `Failed to get application info: ${error instanceof Error ? error.message : String(error)}`);
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
export async function lookupApplicationLogs(appId, params, network = '
|
|
137
|
+
export async function lookupApplicationLogs(appId, params, network = 'testnet') {
|
|
138
138
|
try {
|
|
139
139
|
const indexerClient = getIndexerClient(network);
|
|
140
140
|
console.error(`Looking up logs for application ${appId}`);
|
|
@@ -169,7 +169,7 @@ export async function lookupApplicationLogs(appId, params, network = 'mainnet')
|
|
|
169
169
|
throw new McpError(ErrorCode.InternalError, `Failed to get application logs: ${error instanceof Error ? error.message : String(error)}`);
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
export async function searchForApplications(params, network = '
|
|
172
|
+
export async function searchForApplications(params, network = 'testnet') {
|
|
173
173
|
try {
|
|
174
174
|
const indexerClient = getIndexerClient(network);
|
|
175
175
|
console.error('Searching applications with params:', params);
|
|
@@ -195,7 +195,7 @@ export async function searchForApplications(params, network = 'mainnet') {
|
|
|
195
195
|
throw new McpError(ErrorCode.InternalError, `Failed to search applications: ${error instanceof Error ? error.message : String(error)}`);
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
export async function lookupApplicationBoxByIDandName(appId, boxName, network = '
|
|
198
|
+
export async function lookupApplicationBoxByIDandName(appId, boxName, network = 'testnet') {
|
|
199
199
|
try {
|
|
200
200
|
const indexerClient = getIndexerClient(network);
|
|
201
201
|
const encoder = new TextEncoder();
|
|
@@ -240,7 +240,7 @@ export async function lookupApplicationBoxByIDandName(appId, boxName, network =
|
|
|
240
240
|
throw new McpError(ErrorCode.InternalError, `Failed to get application box: ${error instanceof Error ? error.message : String(error)}`);
|
|
241
241
|
}
|
|
242
242
|
}
|
|
243
|
-
export async function searchForApplicationBoxes(appId, maxBoxes, network = '
|
|
243
|
+
export async function searchForApplicationBoxes(appId, maxBoxes, network = 'testnet') {
|
|
244
244
|
try {
|
|
245
245
|
const indexerClient = getIndexerClient(network);
|
|
246
246
|
console.error(`Searching boxes for application ${appId}`);
|
|
@@ -141,7 +141,7 @@ export const assetTools = [
|
|
|
141
141
|
})
|
|
142
142
|
}
|
|
143
143
|
];
|
|
144
|
-
export async function lookupAssetByID(assetId, network = '
|
|
144
|
+
export async function lookupAssetByID(assetId, network = 'testnet') {
|
|
145
145
|
try {
|
|
146
146
|
const indexerClient = getIndexerClient(network);
|
|
147
147
|
console.error(`Looking up asset info for ID ${assetId}`);
|
|
@@ -157,7 +157,7 @@ export async function lookupAssetByID(assetId, network = 'mainnet') {
|
|
|
157
157
|
throw new McpError(ErrorCode.InternalError, `Failed to get asset info: ${error instanceof Error ? error.message : String(error)}`);
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
|
-
export async function lookupAssetBalances(assetId, params, network = '
|
|
160
|
+
export async function lookupAssetBalances(assetId, params, network = 'testnet') {
|
|
161
161
|
try {
|
|
162
162
|
const indexerClient = getIndexerClient(network);
|
|
163
163
|
console.error(`Looking up balances for asset ${assetId}`);
|
|
@@ -186,7 +186,7 @@ export async function lookupAssetBalances(assetId, params, network = 'mainnet')
|
|
|
186
186
|
throw new McpError(ErrorCode.InternalError, `Failed to get asset balances: ${error instanceof Error ? error.message : String(error)}`);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
export async function lookupAssetTransactions(assetId, params, network = '
|
|
189
|
+
export async function lookupAssetTransactions(assetId, params, network = 'testnet') {
|
|
190
190
|
try {
|
|
191
191
|
const indexerClient = getIndexerClient(network);
|
|
192
192
|
console.error(`Looking up transactions for asset ${assetId}`);
|
|
@@ -230,7 +230,7 @@ export async function lookupAssetTransactions(assetId, params, network = 'mainne
|
|
|
230
230
|
throw new McpError(ErrorCode.InternalError, `Failed to get asset transactions: ${error instanceof Error ? error.message : String(error)}`);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
export async function searchForAssets(params, network = '
|
|
233
|
+
export async function searchForAssets(params, network = 'testnet') {
|
|
234
234
|
try {
|
|
235
235
|
const indexerClient = getIndexerClient(network);
|
|
236
236
|
console.error('Searching assets with params:', params);
|
|
@@ -125,7 +125,7 @@ export const transactionTools = [
|
|
|
125
125
|
})
|
|
126
126
|
}
|
|
127
127
|
];
|
|
128
|
-
export async function lookupTransactionByID(txId, network = '
|
|
128
|
+
export async function lookupTransactionByID(txId, network = 'testnet') {
|
|
129
129
|
try {
|
|
130
130
|
const indexerClient = getIndexerClient(network);
|
|
131
131
|
console.error(`Looking up transaction with ID ${txId}`);
|
|
@@ -145,7 +145,7 @@ export async function lookupTransactionByID(txId, network = 'mainnet') {
|
|
|
145
145
|
throw new McpError(ErrorCode.InternalError, `Failed to get transaction: ${error instanceof Error ? error.message : String(error)}`);
|
|
146
146
|
}
|
|
147
147
|
}
|
|
148
|
-
export async function lookupAccountTransactions(address, params, network = '
|
|
148
|
+
export async function lookupAccountTransactions(address, params, network = 'testnet') {
|
|
149
149
|
try {
|
|
150
150
|
const indexerClient = getIndexerClient(network);
|
|
151
151
|
console.error(`Looking up transactions for account ${address}`);
|
|
@@ -188,7 +188,7 @@ export async function lookupAccountTransactions(address, params, network = 'main
|
|
|
188
188
|
throw new McpError(ErrorCode.InternalError, `Failed to get account transactions: ${error instanceof Error ? error.message : String(error)}`);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
export async function searchForTransactions(params, network = '
|
|
191
|
+
export async function searchForTransactions(params, network = 'testnet') {
|
|
192
192
|
try {
|
|
193
193
|
const indexerClient = getIndexerClient(network);
|
|
194
194
|
console.error('Searching transactions with params:', params);
|
|
@@ -3,7 +3,7 @@ export const networkParam = {
|
|
|
3
3
|
network: {
|
|
4
4
|
type: 'string',
|
|
5
5
|
enum: ['mainnet', 'testnet', 'localnet'],
|
|
6
|
-
description: 'Algorand network to use (default:
|
|
6
|
+
description: 'Algorand network to use (default: testnet)',
|
|
7
7
|
},
|
|
8
8
|
};
|
|
9
9
|
export const itemsPerPageParam = {
|
|
@@ -86,7 +86,7 @@ export class UtilityManager {
|
|
|
86
86
|
type: 'text',
|
|
87
87
|
text: JSON.stringify({
|
|
88
88
|
name: 'Algorand MCP Server',
|
|
89
|
-
version: '4.2.
|
|
89
|
+
version: '4.2.5',
|
|
90
90
|
builder: 'GoPlausible',
|
|
91
91
|
description: 'A Model Context Protocol (MCP) server providing comprehensive access to the Algorand blockchain. Supports account management, transaction building and signing, smart contract interaction, asset operations, ARC-26 URI generation, and deep integration with Algorand ecosystem services including NFDomains, Tinyman, Vestige, and Ultrade.',
|
|
92
92
|
blockchain: 'Algorand — a carbon-negative, pure proof-of-stake Layer 1 blockchain delivering instant finality, low fees, and advanced smart contract capabilities via AVM (Algorand Virtual Machine).',
|