# Aptoscan MCP

> Aptoscan connects your AI agent directly to the Aptos blockchain explorer, letting you read real-time data on any smart contract. You can track account balances, inspect every resource and module an address owns, trace complex transaction histories by hash or version, and list all attached tokens, including NFTs.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** aptos, blockchain-explorer, web3, smart-contracts, nft-tracking

## Description

You don't need to open a browser tab, copy a wallet address, and navigate through multiple dashboards just to check what happened on the Aptos blockchain. This MCP lets your AI client query account states—balances, resources, modules—and track transaction history without leaving your chat interface. Need to know if an NFT was transferred? You can list all tokens held by any account. Want to audit smart contract logic? You access raw Move module data directly from the ledger. The Vinkius catalog makes this powerful connection simple: just subscribe and start asking questions in natural conversation. Your agent handles the complex queries, giving you immediate insights into everything from block heights to specific token metadata.

## Tools

### get_account_balance
Checks the current native currency balance for any specified Aptos account.

### get_account_modules
Retrieves a list of all smart contract modules published under an address.

### get_account_resources
Lists every unique resource owned by the specified account, giving deep insight into its structure.

### get_account_tokens
Generates a comprehensive list of all NFTs and fungible assets held by an account address.

### get_account_transactions
Gathers the full history, listing recent transactions tied to a particular account.

### get_block_by_height
Provides detailed data for a specific block identified by its sequential height number.

### get_block_by_version
Gets block details based on the transaction version included in that block.

### get_token_data
Looks up metadata and supply information for any specific token ID or address.

### get_transaction_by_hash
Retrieves all details of a transaction using its unique cryptographic hash.

### get_transaction_by_version
Gets transaction details based on the ledger version number it was processed at.

## Prompt Examples

**Prompt:** 
```
What is the current balance of the Aptos account 0x1?
```

**Response:** 
```
I'll check that for you. Using `get_account_balance` for address 0x1... The current balance is 100,000,000 APT.
```

**Prompt:** 
```
List the last few transactions for address 0xeeff...8899.
```

**Response:** 
```
Fetching transaction history using `get_account_transactions`... I found 10 recent transactions. The most recent was a 'User Transaction' at version 123456789.
```

**Prompt:** 
```
Get block details for height 5000000.
```

**Response:** 
```
Querying block data with `get_block_by_height`... Block 5000000 was proposed at timestamp 1690000000 and contains 45 transactions.
```

## Capabilities

### Audit account holdings
Fetch a full picture of an address by retrieving its current balance, all owned resources, and published smart contract modules.

### Trace transaction history
Get detailed records for any specific transaction using either its unique hash or the ledger version number.

### Analyze assets and tokens
List every token, including both NFTs and fungible assets, associated with an account, and retrieve metadata for specific tokens.

### Inspect network activity
Pull block details by either its sequential height or a specific transaction version to audit the overall chain state.

## Use Cases

### Checking for asset ownership
A user wants to verify if an address holds specific digital collectibles. They prompt their agent, and the tool executes `get_account_tokens`, giving them a precise list of all NFTs and fungible assets without ever visiting the explorer website.

### Investigating suspicious activity
A security analyst suspects unauthorized resource movement. They ask their agent to run `get_account_resources` on the target account, immediately showing which specific system resources were accessed or modified.

### Building an event timeline
A data scientist needs to understand a complex multi-step transaction. They ask for details using `get_transaction_by_hash`, getting the full payload, and then use `get_account_transactions` to see what happened immediately before and after.

### Verifying smart contract deployment
A developer needs proof of a module's existence. They run `get_account_modules`, confirming that the correct, published smart contract logic is attached to the desired address for debugging purposes.

## Benefits

- You avoid jumping between explorer tabs. Instead of manually cross-referencing data, your AI agent pulls account balances using `get_account_balance` directly into your chat stream.
- Debugging smart contracts gets faster. Need to see what code is running? Use `get_account_resources` and `get_account_modules` to inspect the actual deployed contract logic without leaving your terminal.
- Tracking assets becomes simple. Instead of guessing if an address holds an NFT, use `get_account_tokens` to get a definitive list of all NFTs and fungible tokens associated with it.
- Understanding network flow is easier. You can audit specific periods by calling `get_block_by_height` or pinpoint critical events using `get_transaction_by_hash` for immediate context.
- Analyzing complex transactions doesn't require multiple calls. Use `get_account_transactions` to get a full history, then dive deeper into any single event with `get_transaction_by_version`.

## How It Works

The bottom line is that you get live, on-chain data feeds pushed directly into your workflow via simple conversation prompts.

1. First, you subscribe to this MCP and enter your personal Aptoscan API Key.
2. Next, you tell your AI agent exactly what data you need; for instance, 'What are the resources owned by address X?'
3. The system executes the necessary query against the blockchain ledger and returns structured data right into your chat.

## Frequently Asked Questions

**How do I check if a contract module exists using Aptoscan (Aptos Blockchain Explorer API)?**
Use `get_account_modules` to list all deployed smart contracts associated with an address. This is the best way to confirm that specific modules are published and active on the chain.

**Can Aptoscan (Aptos Blockchain Explorer API) show me transaction details by hash?**
Yes, you can use `get_transaction_by_hash` to retrieve all information for a specific transaction using its unique ID. This is the most reliable way to trace one single event.

**What does get_account_resources do?**
It retrieves every resource owned by an address, which includes more than just tokens; it captures core system resources and modules that define the account's function on the blockchain.

**How many transaction types can I track with Aptoscan (Aptos Blockchain Explorer API)?**
You can track transactions by three methods: using `get_account_transactions` for a history list, or getting precise details via `get_transaction_by_hash` or `get_transaction_by_version`.

**Is Aptoscan (Aptos Blockchain Explorer API) useful for debugging?**
Absolutely. Developers use it to debug by calling tools like `get_account_resources` and inspecting the raw Move module data directly, eliminating the need to switch to external developer environments.