@covalenthq/goldrush-mcp-server 0.0.1 → 0.0.2
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/README.md +18 -14
- package/dist/example-client.js +16 -3
- package/dist/example-client.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -1
- package/dist/server.js.map +1 -1
- package/dist/services/PricingService.d.ts.map +1 -1
- package/dist/services/PricingService.js +30 -0
- package/dist/services/PricingService.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -180,7 +180,7 @@ const result = await client.callTool({
|
|
|
180
180
|
name: "token_balances",
|
|
181
181
|
arguments: {
|
|
182
182
|
chainName: "eth-mainnet",
|
|
183
|
-
address: "
|
|
183
|
+
address: "0xfC43f5F9dd45258b3AFf31Bdbe6561D97e8B71de",
|
|
184
184
|
quoteCurrency: "USD",
|
|
185
185
|
nft: false,
|
|
186
186
|
},
|
|
@@ -268,41 +268,45 @@ Tools are designed to be model-controlled, meaning that tools are exposed from s
|
|
|
268
268
|
|
|
269
269
|
- Get the native token balance (ETH, BNB, MATIC, etc.) for a specified wallet address on a blockchain. Required: chainName (blockchain network) and walletAddress. Optional: quoteCurrency for value conversion and blockHeight for historical queries. Returns detailed balance information including formatted amounts and USD values.
|
|
270
270
|
|
|
271
|
-
17. `
|
|
271
|
+
17. `nft_check_ownership`
|
|
272
|
+
|
|
273
|
+
- Commonly used to verify ownership of NFTs (including ERC-721 and ERC-1155) within a collection. Required: chainName (blockchain network), walletAddress (wallet address), collectionContract (NFT collection). Optional: traitsFilter (filter by trait types), valuesFilter (filter by trait values). Returns ownership status and matching NFTs if owned.
|
|
274
|
+
|
|
275
|
+
18. `nft_for_address`
|
|
272
276
|
|
|
273
277
|
- Commonly used to get all NFTs owned by a specific wallet address on a blockchain. Useful for NFT portfolio viewers. Required: chainName (blockchain network), walletAddress (wallet address). Optional: noSpam (exclude spam NFTs, default true), noNftAssetMetadata (exclude detailed metadata, default false), withUncached (include uncached items, default false). Returns a comprehensive list of all NFTs owned by the specified wallet.
|
|
274
278
|
|
|
275
|
-
|
|
279
|
+
19. `pool_spot_prices`
|
|
276
280
|
|
|
277
|
-
-
|
|
281
|
+
- Get the spot token pair prices for a specified pool contract address. Supports pools on Uniswap V2, V3 and their forks. Required: chainName (blockchain network), contractAddress (pool contract address). Optional: quoteCurrency (price currency) for value conversion. Returns spot token pair prices with pool details and token metadata.
|
|
278
282
|
|
|
279
|
-
|
|
283
|
+
20. `token_approvals`
|
|
280
284
|
|
|
281
285
|
- Commonly used to get a list of approvals across all token contracts categorized by spenders for a wallet's assets. Required: chainName (blockchain network, e.g. eth-mainnet or 1), walletAddress (wallet address, supports ENS, RNS, Lens Handle, or Unstoppable Domain). Returns a list of ERC20 token approvals and their associated security risk levels.
|
|
282
286
|
|
|
283
|
-
|
|
287
|
+
21. `token_balances`
|
|
284
288
|
|
|
285
289
|
- Commonly used to fetch the native and fungible (ERC20) tokens held by an address. Required: chainName (blockchain network), address (wallet address). Optional: quoteCurrency for value conversion, nft (include NFTs, default false), noNftFetch, noSpam, and noNftAssetMetadata (all default true) to control data returned. Returns detailed token balance information including spot prices and metadata.
|
|
286
290
|
|
|
287
|
-
|
|
291
|
+
22. `token_holders`
|
|
288
292
|
|
|
289
293
|
- Used to get a paginated list of current or historical token holders for a specified ERC20 or ERC721 token. Required: chainName (blockchain network), tokenAddress (token contract address). Optional: blockHeight or date for historical data, pageSize and pageNumber for pagination. Returns list of addresses holding the token with balance amounts and ownership percentages.
|
|
290
294
|
|
|
291
|
-
|
|
295
|
+
23. `transaction`
|
|
292
296
|
|
|
293
297
|
- Commonly used to fetch and render a single transaction including its decoded log events. Required: chainName (blockchain network), txHash (transaction hash). Optional: quoteCurrency (currency to convert to, USD by default), noLogs (exclude event logs, true by default), withInternal (include internal transactions, false by default), withState (include state changes, false by default), withInputData (include input data, false by default). Tracing features (withInternal, withState, withInputData) supported on the following chains: eth-mainnet. Returns comprehensive details about the specified transaction.
|
|
294
298
|
|
|
295
|
-
|
|
299
|
+
24. `transaction_summary`
|
|
296
300
|
|
|
297
|
-
- Commonly used to fetch and
|
|
301
|
+
- Commonly used to fetch the earliest and latest transactions, and the transaction count for a wallet. Required: chainName (blockchain network), walletAddress (wallet address). Optional: quoteCurrency, withGas (include gas usage statistics). Returns summary of transaction activity for the specified wallet.
|
|
298
302
|
|
|
299
|
-
|
|
303
|
+
25. `transactions_for_address`
|
|
300
304
|
|
|
301
|
-
- Commonly used to fetch
|
|
305
|
+
- Commonly used to fetch and render the most recent transactions involving an address. Required: chainName (blockchain network), walletAddress (wallet address), page (page number). Optional: quoteCurrency, noLogs, blockSignedAtAsc (chronological order). Returns transactions for the specified page of results.
|
|
302
306
|
|
|
303
|
-
|
|
307
|
+
26. `transactions_for_block`
|
|
304
308
|
|
|
305
|
-
- Commonly used to fetch
|
|
309
|
+
- Commonly used to fetch all transactions including their decoded log events in a block and further flag interesting wallets or transactions. Required: chainName (blockchain network), blockHeight (block number or latest). Optional: quoteCurrency, noLogs (exclude event logs). Returns all transactions from the specified block.
|
|
306
310
|
|
|
307
311
|
---
|
|
308
312
|
|
package/dist/example-client.js
CHANGED
|
@@ -7,7 +7,7 @@ async function tokenBalancesExample(client) {
|
|
|
7
7
|
name: "token_balances",
|
|
8
8
|
arguments: {
|
|
9
9
|
chainName: "eth-mainnet",
|
|
10
|
-
address: "
|
|
10
|
+
address: "0xfC43f5F9dd45258b3AFf31Bdbe6561D97e8B71de",
|
|
11
11
|
quoteCurrency: "USD",
|
|
12
12
|
nft: false,
|
|
13
13
|
},
|
|
@@ -20,7 +20,7 @@ async function historicalBalancesExample(client) {
|
|
|
20
20
|
name: "historical_token_balances",
|
|
21
21
|
arguments: {
|
|
22
22
|
chainName: "eth-mainnet",
|
|
23
|
-
address: "
|
|
23
|
+
address: "0xfC43f5F9dd45258b3AFf31Bdbe6561D97e8B71de",
|
|
24
24
|
quoteCurrency: "USD",
|
|
25
25
|
date: "2024-01-01",
|
|
26
26
|
},
|
|
@@ -33,7 +33,7 @@ async function transactionsExample(client) {
|
|
|
33
33
|
name: "transactions_for_address",
|
|
34
34
|
arguments: {
|
|
35
35
|
chainName: "eth-mainnet",
|
|
36
|
-
walletAddress: "
|
|
36
|
+
walletAddress: "0xfC43f5F9dd45258b3AFf31Bdbe6561D97e8B71de",
|
|
37
37
|
page: 0,
|
|
38
38
|
quoteCurrency: "USD",
|
|
39
39
|
noLogs: true,
|
|
@@ -52,6 +52,18 @@ async function specificTransactionExample(client) {
|
|
|
52
52
|
});
|
|
53
53
|
console.log("Transaction details:", result.content);
|
|
54
54
|
}
|
|
55
|
+
async function poolSpotPricesExample(client) {
|
|
56
|
+
console.log("\n=== pool_spot_prices Example ===");
|
|
57
|
+
const result = await client.callTool({
|
|
58
|
+
name: "pool_spot_prices",
|
|
59
|
+
arguments: {
|
|
60
|
+
chainName: "eth-mainnet",
|
|
61
|
+
contractAddress: "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8",
|
|
62
|
+
quoteCurrency: "USD",
|
|
63
|
+
},
|
|
64
|
+
});
|
|
65
|
+
console.log("Pool spot prices:", result.content);
|
|
66
|
+
}
|
|
55
67
|
async function getSupportedChainsResourceExample(client) {
|
|
56
68
|
console.log("\n=== supported-chains Resource Example ===");
|
|
57
69
|
const result = await client.readResource({
|
|
@@ -108,6 +120,7 @@ async function main() {
|
|
|
108
120
|
await historicalBalancesExample(client);
|
|
109
121
|
await transactionsExample(client);
|
|
110
122
|
await specificTransactionExample(client);
|
|
123
|
+
await poolSpotPricesExample(client);
|
|
111
124
|
await getSupportedChainsResourceExample(client);
|
|
112
125
|
await getQuoteCurrenciesResourceExample(client);
|
|
113
126
|
console.log("\nAll examples completed successfully");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"example-client.js","sourceRoot":"","sources":["../src/example-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACn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,MAAM,iCAAiC,CAAC,MAAM,CAAC,CAAC;QAChD,MAAM,iCAAiC,CAAC,MAAM,CAAC,CAAC;QAEhD,OAAO,CAAC,GAAG,CAAC,uCAAuC,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;YAAS,CAAC;QAEP,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;IACrC,CAAC;AACL,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAapE,wBAAgB,oBAAoB,mBAOnC;AAKD,wBAAgB,YAAY,cAqB3B;AAKD,wBAAsB,WAAW,kBAShC"}
|
package/dist/server.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import packageJson from "../package.json" with { type: "json" };
|
|
1
2
|
import { addRealTimeChainStatusResources } from "./resources/dynamicResources.js";
|
|
2
3
|
import { addStaticResources } from "./resources/staticResources.js";
|
|
3
4
|
import { addAllChainsServiceTools } from "./services/AllChainsService.js";
|
|
@@ -12,6 +13,7 @@ import { GoldRushClient } from "@covalenthq/client-sdk";
|
|
|
12
13
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
13
14
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
14
15
|
import dotenv from "dotenv";
|
|
16
|
+
const { version } = packageJson;
|
|
15
17
|
dotenv.config();
|
|
16
18
|
export function createGoldRushClient() {
|
|
17
19
|
const apiKey = process.env["GOLDRUSH_API_KEY"];
|
|
@@ -25,7 +27,7 @@ export function createServer() {
|
|
|
25
27
|
const goldRushClient = createGoldRushClient();
|
|
26
28
|
const server = new McpServer({
|
|
27
29
|
name: "GoldRush MCP Server",
|
|
28
|
-
version:
|
|
30
|
+
version: version,
|
|
29
31
|
});
|
|
30
32
|
addStaticResources(server);
|
|
31
33
|
addRealTimeChainStatusResources(server, goldRushClient);
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,+BAA+B,EAAE,MAAM,iCAAiC,CAAC;AAClF,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAC1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,0BAA0B,EAAE,MAAM,kCAAkC,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,MAAM,MAAM,QAAQ,CAAC;AAG5B,MAAM,CAAC,MAAM,EAAE,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OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PricingService.d.ts","sourceRoot":"","sources":["../../src/services/PricingService.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,cAAc,EAEtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"PricingService.d.ts","sourceRoot":"","sources":["../../src/services/PricingService.ts"],"names":[],"mappings":"AAEA,OAAO,EAGH,KAAK,cAAc,EAEtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAezE,wBAAgB,sBAAsB,CAClC,MAAM,EAAE,SAAS,EACjB,cAAc,EAAE,cAAc,QA2FjC"}
|
|
@@ -36,5 +36,35 @@ export function addPricingServiceTools(server, goldRushClient) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
});
|
|
39
|
+
server.tool("pool_spot_prices", "Get the spot token pair prices for a specified pool contract address. Supports pools on Uniswap V2, V3 and their forks.\n" +
|
|
40
|
+
"Required: chainName (blockchain network), contractAddress (pool contract address).\n" +
|
|
41
|
+
"Optional: quoteCurrency (price currency) for value conversion.\n" +
|
|
42
|
+
"Returns spot token pair prices with pool details and token metadata.", {
|
|
43
|
+
chainName: z.enum(Object.values(ChainName)),
|
|
44
|
+
contractAddress: z.string(),
|
|
45
|
+
quoteCurrency: z
|
|
46
|
+
.enum(Object.values(validQuoteValues))
|
|
47
|
+
.optional(),
|
|
48
|
+
}, async (params) => {
|
|
49
|
+
try {
|
|
50
|
+
const response = await goldRushClient.PricingService.getPoolSpotPrices(params.chainName, params.contractAddress, {
|
|
51
|
+
quoteCurrency: params.quoteCurrency,
|
|
52
|
+
});
|
|
53
|
+
return {
|
|
54
|
+
content: [
|
|
55
|
+
{
|
|
56
|
+
type: "text",
|
|
57
|
+
text: stringifyWithBigInt(response.data),
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
catch (error) {
|
|
63
|
+
return {
|
|
64
|
+
content: [{ type: "text", text: `Error: ${error}` }],
|
|
65
|
+
isError: true,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
});
|
|
39
69
|
}
|
|
40
70
|
//# sourceMappingURL=PricingService.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PricingService.js","sourceRoot":"","sources":["../../src/services/PricingService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAEH,SAAS,GAGZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"PricingService.js","sourceRoot":"","sources":["../../src/services/PricingService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAEH,SAAS,GAGZ,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,MAAM,UAAU,sBAAsB,CAClC,MAAiB,EACjB,cAA8B;IAE9B,MAAM,CAAC,IAAI,CACP,yBAAyB,EACzB,gGAAgG;QAC5F,uKAAuK;QACvK,iHAAiH;QACjH,+DAA+D,EACnE;QACI,SAAS,EAAE,CAAC,CAAC,IAAI,CACb,MAAM,CAAC,MAAM,CAAC,SAAS,CAA0B,CACpD;QACD,aAAa,EAAE,CAAC,CAAC,IAAI,CACjB,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAA0B,CAC3D;QACD,eAAe,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AAE,EAAE;QACb,IAAI,CAAC;YACD,MAAM,QAAQ,GACV,MAAM,cAAc,CAAC,cAAc,CAAC,iBAAiB,CACjD,MAAM,CAAC,SAAkB,EACzB,MAAM,CAAC,eAAe,EACtB;gBACI,aAAa,EAAE,MAAM,CAAC,aAAsB;aAC/C,CACJ,CAAC;YACN,OAAO;gBACH,OAAO,EAAE;oBACL;wBACI,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC,IAAI,CAAC;qBAC3C;iBACJ;aACJ,CAAC;QACN,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO;gBACH,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,KAAK,EAAE,EAAE,CAAC;gBACpD,OAAO,EAAE,IAAI;aAChB,CAAC;QACN,CAAC;IACL,CAAC,CACJ,CAAC;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@covalenthq/goldrush-mcp-server",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"description": "GoldRush MCP Server for interacting with Covalent GoldRush API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"license": "MIT",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@covalenthq/client-sdk": "^2.2.
|
|
50
|
+
"@covalenthq/client-sdk": "^2.2.6",
|
|
51
51
|
"@modelcontextprotocol/sdk": "^1.7.0",
|
|
52
52
|
"dotenv": "^16.4.7",
|
|
53
53
|
"zod": "^3.24.2"
|