-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-to-mcp.yml
More file actions
387 lines (387 loc) · 16.1 KB
/
api-to-mcp.yml
File metadata and controls
387 lines (387 loc) · 16.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
server:
name: blockscout-mcp-server
config:
baseUrl: "https://mcp.blockscout.com/v1"
tools:
- name: __get_instructions__
description: |
This tool MUST be called BEFORE any other tool.
Without calling it, the MCP server will not work as expected.
It MUST be called once in a session.
args: []
requestTemplate:
url: "{{.config.baseUrl}}/get_instructions"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_block_info
description: |
Get block information like timestamp, gas used, burnt fees, transaction count etc.
Can optionally include the list of transaction hashes contained in the block. Transaction hashes are omitted by default; request them only when you truly need them, because on high-traffic chains the list may exhaust the context.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: number_or_hash
description: "Block number or hash"
type: string
required: true
- name: include_transactions
description: "If true, includes a list of transaction hashes from the block."
type: boolean
required: false
default: false
requestTemplate:
url: "{{.config.baseUrl}}/get_block_info"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_latest_block
description: |
Get the latest indexed block number and timestamp, which represents the most recent state of the blockchain.
No transactions or token transfers can exist beyond this point, making it useful as a reference timestamp for other API calls.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
requestTemplate:
url: "{{.config.baseUrl}}/get_latest_block"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_address_by_ens_name
description: |
Useful for when you need to convert an ENS domain name (e.g. "blockscout.eth")
to its corresponding Ethereum address.
args:
- name: name
description: "ENS domain name to resolve"
type: string
required: true
requestTemplate:
url: "{{.config.baseUrl}}/get_address_by_ens_name"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_transactions_by_address
description: |
Retrieves native currency transfers and smart contract interactions (calls, internal txs) for an address.
**EXCLUDES TOKEN TRANSFERS**: Filters out direct token balance changes (ERC-20, etc.). You'll see calls *to* token contracts, but not the `Transfer` events. For token history, use `get_token_transfers_by_address`.
A single tx can have multiple records from internal calls; use `internal_transaction_index` for execution order.
Use cases:
- `get_transactions_by_address(address, age_from)` - get all txs to/from the address since a given date.
- `get_transactions_by_address(address, age_from, age_to)` - get all txs to/from the address between given dates.
- `get_transactions_by_address(address, age_from, age_to, methods)` - get all txs to/from the address between given dates, filtered by method.
**SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get additional pages.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: address
description: "Address which either sender or receiver of the transaction"
type: string
required: true
- name: age_from
description: "Start date and time (e.g 2025-05-22T23:00:00.00Z)."
type: string
required: false
- name: age_to
description: "End date and time (e.g 2025-05-22T22:30:00.00Z)."
type: string
required: false
- name: methods
description: "A method signature to filter transactions by (e.g 0x304e6ade)"
type: string
required: false
- name: cursor
description: "The pagination cursor from a previous response to get the next page of results."
type: string
required: false
requestTemplate:
url: "{{.config.baseUrl}}/get_transactions_by_address"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_token_transfers_by_address
description: |
Get ERC-20 token transfers for an address within a specific time range.
Use cases:
- `get_token_transfers_by_address(address, age_from)` - get all transfers of any ERC-20 token to/from the address since the given date up to the current time
- `get_token_transfers_by_address(address, age_from, age_to)` - get all transfers of any ERC-20 token to/from the address between the given dates
- `get_token_transfers_by_address(address, age_from, age_to, token)` - get all transfers of the given ERC-20 token to/from the address between the given dates
**SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get additional pages.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: address
description: "Address which either transfer initiator or transfer receiver"
type: string
required: true
- name: age_from
description: "Start date and time (e.g 2025-05-22T23:00:00.00Z). This parameter should be provided in most cases to limit transfers and avoid heavy database queries. Omit only if you absolutely need the full history."
type: string
required: false
- name: age_to
description: "End date and time (e.g 2025-05-22T22:30:00.00Z). Can be omitted to get all transfers up to the current time."
type: string
required: false
- name: token
description: "An ERC-20 token contract address to filter transfers by a specific token. If omitted, returns transfers of all tokens."
type: string
required: false
- name: cursor
description: "The pagination cursor from a previous response to get the next page of results."
type: string
required: false
requestTemplate:
url: "{{.config.baseUrl}}/get_token_transfers_by_address"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: lookup_token_by_symbol
description: |
Search for token addresses by symbol or name. Returns multiple potential matches based on symbol or token name similarity. Only the first 7 matches from the Blockscout API are returned.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: symbol
description: "Token symbol or name to search for"
type: string
required: true
requestTemplate:
url: "{{.config.baseUrl}}/lookup_token_by_symbol"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_contract_abi
description: |
Get smart contract ABI (Application Binary Interface).
An ABI defines all functions, events, their parameters, and return types. The ABI is required to format function calls or interpret contract data.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: address
description: "Smart contract address"
type: string
required: true
requestTemplate:
url: "{{.config.baseUrl}}/get_contract_abi"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_address_info
description: |
Get comprehensive information about an address, including:
- Address existence check
- Native token (ETH) balance (provided as is, without adjusting by decimals)
- ENS name association (if any)
- Contract status (whether the address is a contract, whether it is verified)
- Proxy contract information (if applicable): determines if a smart contract is a proxy contract (which forwards calls to implementation contracts), including proxy type and implementation addresses
- Token details (if the contract is a token): name, symbol, decimals, total supply, etc.
Essential for address analysis, contract investigation, token research, and DeFi protocol analysis.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: address
description: "Address to get information about"
type: string
required: true
requestTemplate:
url: "{{.config.baseUrl}}/get_address_info"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_tokens_by_address
description: |
Get comprehensive ERC20 token holdings for an address with enriched metadata and market data.
Returns detailed token information including contract details (name, symbol, decimals), market metrics (exchange rate, market cap, volume), holders count, and actual balance (provided as is, without adjusting by decimals).
Essential for portfolio analysis, wallet auditing, and DeFi position tracking.
**SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get additional pages.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: address
description: "Wallet address"
type: string
required: true
- name: cursor
description: "The pagination cursor from a previous response to get the next page of results."
type: string
required: false
requestTemplate:
url: "{{.config.baseUrl}}/get_tokens_by_address"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: transaction_summary
description: |
Get human-readable transaction summaries from Blockscout Transaction Interpreter.
Automatically classifies transactions into natural language descriptions (transfers, swaps, NFT sales, DeFi operations)
Essential for rapid transaction comprehension, dashboard displays, and initial analysis.
Note: Not all transactions can be summarized and accuracy is not guaranteed for complex patterns.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: transaction_hash
description: "Transaction hash"
type: string
required: true
requestTemplate:
url: "{{.config.baseUrl}}/transaction_summary"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: nft_tokens_by_address
description: |
Retrieve NFT tokens (ERC-721, ERC-404, ERC-1155) owned by an address, grouped by collection.
Provides collection details (type, address, name, symbol, total supply, holder count) and individual token instance data (ID, name, description, external URL, metadata attributes).
Essential for a detailed overview of an address's digital collectibles and their associated collection data.
**SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get additional pages.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: address
description: "NFT owner address"
type: string
required: true
- name: cursor
description: "The pagination cursor from a previous response to get the next page of results."
type: string
required: false
requestTemplate:
url: "{{.config.baseUrl}}/nft_tokens_by_address"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_transaction_info
description: |
Get comprehensive transaction information.
Unlike standard eth_getTransactionByHash, this tool returns enriched data including decoded input parameters, detailed token transfers with token metadata, transaction fee breakdown (priority fees, burnt fees) and categorized transaction types.
By default, the raw transaction input is omitted if a decoded version is available to save context; request it with `include_raw_input=True` only when you truly need the raw hex data.
Essential for transaction analysis, debugging smart contract interactions, tracking DeFi operations.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: transaction_hash
description: "Transaction hash"
type: string
required: true
- name: include_raw_input
description: "If true, includes the raw transaction input data."
type: boolean
required: false
default: false
requestTemplate:
url: "{{.config.baseUrl}}/get_transaction_info"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_transaction_logs
description: |
Get comprehensive transaction logs.
Unlike standard eth_getLogs, this tool returns enriched logs, primarily focusing on decoded event parameters with their types and values (if event decoding is applicable).
Essential for analyzing smart contract events, tracking token transfers, monitoring DeFi protocol interactions, debugging event emissions, and understanding complex multi-contract transaction flows.
**SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get additional pages.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: transaction_hash
description: "Transaction hash"
type: string
required: true
- name: cursor
description: "The pagination cursor from a previous response to get the next page of results."
type: string
required: false
requestTemplate:
url: "{{.config.baseUrl}}/get_transaction_logs"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_address_logs
description: |
Get comprehensive logs emitted by a specific address.
Returns enriched logs, primarily focusing on decoded event parameters with their types and values (if event decoding is applicable).
Essential for analyzing smart contract events emitted by specific addresses, monitoring token contract activities, tracking DeFi protocol state changes, debugging contract event emissions, and understanding address-specific event history flows.
**SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get additional pages.
args:
- name: chain_id
description: "The ID of the blockchain"
type: string
required: true
- name: address
description: "Account address"
type: string
required: true
- name: cursor
description: "The pagination cursor from a previous response to get the next page of results."
type: string
required: false
requestTemplate:
url: "{{.config.baseUrl}}/get_address_logs"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}
- name: get_chains_list
description: |
Get the list of known blockchain chains with their IDs.
Useful for getting a chain ID when the chain name is known. This information can be used in other tools that require a chain ID to request information.
args: []
requestTemplate:
url: "{{.config.baseUrl}}/get_chains_list"
method: GET
argsToUrlParam: true
responseTemplate:
body: |
{{ . }}