aptos-mcp
The Aptos MCP Server enables developers to interact with Aptos documentation and build full-stack Aptos blockchain applications.
Create Aptos Projects: Set up new projects (fullstack, contract, or client) using the Aptos CLI
Generate Components: Create new components for Aptos projects
Test Contracts: Test Aptos Move contracts with function-specific testing
Create Indexers: Build indexer projects for transaction/event processing
Create Gas Stations: Develop fee sponsorship projects
Generate ABIs: Produce TypeScript or JSON ABI interfaces for Move contracts
Browse Documentation: Search and navigate Aptos documentation
Develop with Claude Desktop: Integrate with Claude Desktop for streamlined workflows
Enables access to Aptos documentation repositories with optional GitHub token support for increased API rate limits.
Supports creating Aptos client projects that use Node.js for blockchain interaction.
Supports generating React components for Aptos blockchain applications, such as wallet connection interfaces.
Provides tools for generating TypeScript ABI interfaces and bindings from Move contracts to facilitate frontend integration.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@aptos-mcpcreate a new Aptos fullstack project called 'nft-marketplace'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Aptos MCP Server
A Model Context Protocol (MCP) server for interacting with Aptos documentation and creating full-stack Aptos blockchain applications.
Features
🔍 Browse and search Aptos documentation
🔧 Create new Aptos projects (fullstack, contract, or client)
🧩 Generate components for Aptos projects
🧪 Test Aptos Move contracts
📜 Generate TypeScript ABI interfaces for Move contracts
Related MCP server: Dedalus MCP Documentation Server
Installation
Prerequisites
Python 3.10 or later
Node.js and npm
Aptos CLI (for some tooling features)
Setup
Install the mcp package:
uv add "mcp[cli]"
# or
pip install "mcp[cli]"Clone this repository:
git clone https://github.com/yourusername/aptos-mcp-server.git
cd aptos-mcp-serverInstall dependencies:
uv add httpx
# or
pip install httpx(Optional) Set GitHub token for increased API rate limits:
export GITHUB_TOKEN=your_github_tokenUsing with Claude Desktop
Install Claude Desktop from claude.ai/download
Add the Aptos MCP Server to your Claude Desktop configuration:
mcp install aptos_mcp_server.pyOr manually edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"aptos-dev": {
"command": "uv",
"args": [
"--directory",
"/path/to/aptos-mcp-server",
"run",
"aptos_mcp_server.py"
]
}
}
}Restart Claude Desktop
Development
Run the server in development mode with the MCP Inspector:
mcp dev aptos_mcp_server.pyUsage
Once connected to Claude Desktop, you can:
Browse Aptos Documentation
Ask Claude to browse through the Aptos documentation repository:
"Show me the Aptos documentation structure"
"Find information about Move modules in the Aptos docs"
"Get me the Table implementation documentation"
Create New Projects
Ask Claude to set up new Aptos projects:
"Create a new Aptos full-stack project called 'my-first-dapp'"
"Generate a Move smart contract for a marketplace"
"Set up a client-only Aptos project"
Generate Components
Ask Claude to generate components for your Aptos projects:
"Generate a React component for connecting to Aptos wallet"
"Create a Move table for storing user profiles"
"Make a client function for querying contract data"
Test and Generate ABIs
Ask Claude to test contracts and generate interfaces:
"Test my Aptos contract at ~/projects/my-dapp/move"
"Generate TypeScript bindings for my Move contract"
Example Queries
"Browse through the Aptos documentation"
"Search the Aptos docs for 'table'"
"Create a new Aptos fullstack project called 'nft-marketplace'"
"Generate a Move module for a token contract"
"Create a React component for wallet connection"
"Generate TypeScript ABI for my contract"
"Test my contract's withdraw function"
License
MIT
Available Tools
6 toolsaptos_abi_generateC
Generate ABI for an Aptos contract.
Args:
contract_path: Path to the contract directory
output_format: Format of the output (ts, json)
| Name | Required | Description | Default |
|---|---|---|---|
| contract_path | Yes | ||
| output_format | No | ts |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Generate ABI') but fails to describe key traits: it doesn't mention if this is a read-only operation, what permissions are required, potential side effects (e.g., file creation), or error handling. This leaves significant gaps in understanding the tool's behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the main purpose, followed by a brief 'Args' section listing parameters. It's efficient with minimal waste, though the structure could be slightly improved by integrating parameter details more seamlessly. Overall, it's appropriately sized for its content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (a code generation tool with 2 parameters), no annotations, and no output schema, the description is incomplete. It doesn't explain what the ABI output entails, how it's delivered (e.g., file path or direct return), or error cases. This inadequacy could hinder effective tool use by an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds basic semantics for both parameters: 'contract_path' is explained as 'Path to the contract directory' and 'output_format' as 'Format of the output (ts, json)'. Since schema description coverage is 0%, this compensates somewhat by clarifying parameter meanings. However, it lacks details like format specifics or path requirements, keeping it at a baseline level.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate ABI for an Aptos contract.' It specifies the verb ('Generate') and resource ('ABI for an Aptos contract'), making the function unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'generate_aptos_component' or 'test_aptos_contract', which may also involve contract-related operations, so it doesn't reach the highest score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It lacks context about prerequisites (e.g., needing a compiled contract), exclusions, or comparisons to sibling tools such as 'generate_aptos_component'. This absence leaves the agent without clear usage direction.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_aptos_indexerC
Creates a new Aptos indexer project based on the example processor.
Args:
project_name: Name of the indexer project
processor_type: Type of processor (transaction, event)
| Name | Required | Description | Default |
|---|---|---|---|
| project_name | Yes | ||
| processor_type | No | transaction |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Creates' implies a write operation, it doesn't specify permissions required, whether the creation is reversible, what happens on failure, or any rate limits. The mention of 'based on the example processor' adds some context but falls short of describing key behavioral traits like side effects or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized with two sentences: one stating the purpose and another listing parameters. It's front-loaded with the main action, and each sentence adds value. There's no redundant information, though it could be slightly more structured (e.g., bullet points for parameters).
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations, 0% schema description coverage, and no output schema, the description is incomplete. It covers basic purpose and parameters but lacks details on behavioral traits, error cases, return values, and differentiation from siblings. For a creation tool with two parameters, this leaves significant gaps for an agent to use it effectively.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, so the description must compensate. It lists both parameters ('project_name' and 'processor_type') and provides brief meanings, which adds value beyond the bare schema. However, it doesn't explain constraints (e.g., format for 'project_name', valid values for 'processor_type' beyond 'transaction' and 'event'), leaving gaps in parameter understanding.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Creates a new Aptos indexer project') and specifies the resource ('based on the example processor'), which provides a specific verb+resource combination. However, it doesn't differentiate from sibling tools like 'create_aptos_project' or 'aptos_abi_generate', leaving some ambiguity about when to use this specific tool versus alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'create_aptos_project' and 'aptos_abi_generate' available, there's no indication of context, prerequisites, or exclusions. The agent must infer usage from the tool name alone, which is insufficient for clear decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_aptos_projectC
Create a new Aptos project using the Aptos CLI.
Args:
project_name: Name of the project
project_type: Type of project (fullstack, contract, client)
| Name | Required | Description | Default |
|---|---|---|---|
| project_name | Yes | ||
| project_type | No | fullstack |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'Create' which implies a write operation, but lacks details on permissions, side effects, error handling, or output format. This is insufficient for a mutation tool with zero annotation coverage.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose, followed by a clear parameter breakdown in a structured format. Every sentence earns its place with no wasted words, making it highly efficient and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (a mutation operation with 2 parameters), lack of annotations, and no output schema, the description is incomplete. It fails to address critical aspects like behavioral traits, usage context, or return values, leaving significant gaps for an AI agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds value by explaining the semantics of both parameters (project_name and project_type with its allowed values), which compensates for the 0% schema description coverage. However, it doesn't provide deeper context like format constraints or examples, keeping it at a baseline level.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Create' and the resource 'new Aptos project using the Aptos CLI', which is specific and actionable. However, it doesn't explicitly distinguish this tool from its siblings (e.g., create_aptos_indexer, create_gas_station), which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it mention prerequisites or context for usage. It simply states what the tool does without indicating appropriate scenarios or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
create_gas_stationB
Creates a new Aptos gas station (fee sponsorship) project.
Args:
project_name: Name of the gas station project
| Name | Required | Description | Default |
|---|---|---|---|
| project_name | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool creates a new project, implying a mutation operation, but lacks details on permissions, side effects, error handling, or response format. For a creation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior and implications.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured, with a clear purpose statement followed by a brief parameter explanation in two sentences. It avoids unnecessary details and is front-loaded with the main action. Minor improvements could include integrating the parameter info more seamlessly, but overall it is efficient and readable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (a creation operation with one parameter), lack of annotations, and no output schema, the description is minimally adequate. It covers the basic purpose and parameter semantics but misses behavioral details, usage guidelines, and output information. This leaves users with incomplete context for effective tool invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds meaningful context for the single parameter 'project_name' by explaining it as the 'Name of the gas station project'. With schema description coverage at 0% (the schema only provides a title 'Project Name'), this compensates well by clarifying the parameter's role. However, it does not detail constraints like length or format, keeping it from a perfect score.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Creates a new Aptos gas station (fee sponsorship) project.' It specifies the verb ('creates') and resource ('gas station project'), with additional clarifying context ('fee sponsorship'). However, it does not explicitly differentiate from sibling tools like 'create_aptos_project' or 'create_aptos_indexer', which also involve creation operations in the Aptos ecosystem, leaving some ambiguity about when to use this specific tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It does not mention prerequisites, exclusions, or compare it to sibling tools such as 'create_aptos_project' or 'create_aptos_indexer'. Without this context, users must infer usage based on the tool name and description alone, which is insufficient for clear decision-making.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_aptos_componentC
Generate a new component for an Aptos project.
Args:
component_type: Type of component (table, module, etc.)
component_name: Name of the component
project_dir: Project directory path
options: Additional options as a string
| Name | Required | Description | Default |
|---|---|---|---|
| component_type | Yes | ||
| component_name | Yes | ||
| project_dir | Yes | ||
| options | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool generates a component but doesn't describe what that entails—whether it creates files, modifies existing ones, requires specific permissions, or has side effects like initializing dependencies. For a tool with potential file system impacts, this lack of detail is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is concise and well-structured: a clear purpose statement followed by a bullet-point list of parameters. Each sentence earns its place by defining the tool and its inputs. It could be slightly more front-loaded with key behavioral details, but overall it's efficient without unnecessary verbiage.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (generating components in a development environment), lack of annotations, no output schema, and 0% schema description coverage, the description is incomplete. It doesn't cover behavioral traits, output format, error handling, or dependencies on sibling tools. For a tool that likely interacts with file systems and project structures, more context is needed for safe and effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description lists all four parameters with brief explanations, but schema description coverage is 0%, meaning the schema provides no additional details. The description adds basic semantics (e.g., 'Type of component (table, module, etc.)'), which compensates somewhat. However, it doesn't elaborate on allowed values for 'component_type' or format for 'options', leaving ambiguity. Baseline is adjusted upward from 1 due to parameter listing.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Generate a new component for an Aptos project.' It specifies the verb ('generate') and resource ('component for an Aptos project'), which is clear. However, it doesn't explicitly differentiate from sibling tools like 'create_aptos_project' or 'aptos_abi_generate', leaving some ambiguity about scope boundaries.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether an Aptos project must exist), compare to siblings like 'create_aptos_project' (which might handle project setup), or specify scenarios where this tool is appropriate. Usage is implied but not explicitly defined.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
test_aptos_contractC
Test an Aptos Move contract using the Aptos CLI.
Args:
contract_path: Path to the contract directory or file
function_name: Optional function to test specifically
args: Optional list of arguments for the function
| Name | Required | Description | Default |
|---|---|---|---|
| contract_path | Yes | ||
| function_name | No | ||
| args | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions using 'Aptos CLI' which provides some context about execution method, but doesn't describe what 'test' means operationally (e.g., runs unit tests, validates bytecode, requires compilation), expected outputs, error conditions, or resource requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized with a clear purpose statement followed by parameter explanations. The structure is front-loaded with the main purpose first. It could be slightly more concise by integrating the Args section more naturally, but overall it's efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 3-parameter tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'testing' entails, what results to expect, error handling, or how this integrates with the Aptos development workflow. The minimal parameter explanations don't compensate for the lack of behavioral context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description provides brief explanations for all three parameters in the Args section, adding meaning beyond the schema which has 0% description coverage. However, these explanations are minimal ('Path to the contract directory or file', 'Optional function to test specifically') and lack details about format, constraints, or examples.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Test an Aptos Move contract') and resource ('Aptos Move contract'), making the purpose immediately understandable. However, it doesn't differentiate this tool from sibling tools like 'aptos_abi_generate' or 'create_aptos_project', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of prerequisites, when testing is appropriate, or how this differs from sibling tools like 'create_aptos_project' or 'generate_aptos_component'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
- First observed
aptos_abi_generate - First observed
create_aptos_indexer - First observed
create_aptos_project - First observed
create_gas_station - First observed
generate_aptos_component - First observed
test_aptos_contract
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap: generating ABI, creating indexers, creating projects, creating gas stations, generating components, and testing contracts. The descriptions specify different resources and actions, making misselection unlikely.
The naming follows a consistent verb_noun pattern with 'aptos' as a prefix (e.g., create_aptos_project, generate_aptos_component), except for 'aptos_abi_generate' which uses noun_verb order. This minor deviation slightly breaks the pattern but maintains overall readability.
With 6 tools, the count is well-scoped for an Aptos development server, covering key operations like project setup, component generation, and testing. Each tool earns its place without feeling excessive or insufficient for the domain.
The toolset covers creation and testing aspects well but has notable gaps in lifecycle management, such as updating or deleting projects/components, and lacks deployment or interaction tools (e.g., deploy_contract, call_function). This limits full workflow coverage for Aptos development.
Maintenance
Related MCP Connectors
MCP server for agentverse documentation, generated by doc2mcp.
MCP server for Klever blockchain smart contract development.
The official MCP server for Capawesome documentation and Capawesome Cloud.
Related MCP Servers
AlicenseBqualityBmaintenanceEnables users to manage API keys and perform Aptos Build actions through MCP-compatible interfaces like Claude and Cursor. This server facilitates development workflows on the Aptos blockchain by integrating directly with the Aptos Build platform.221513Apache 2.0- AlicenseAqualityDmaintenanceAn MCP server that serves documentation and enables AI-powered search, Q\&A, and document analysis for developer tools and guides.54MIT
- AlicenseAqualityDmaintenanceMCP server for Shelby Protocol that enables AI agents to read, write, and manage files on decentralized storage (Aptos) through tools like upload, download, list, delete, and account info.51MIT
- AlicenseNot gradedqualityDmaintenanceAptos MCP is a comprehensive Model Context Protocol (MCP) server implementation for the Aptos blockchain, compatible with MCP clients like Claude Desktop or Cursor.ai. It provides a complete DeFi toolkit covering major Aptos protocols including pool discovery, lending, DEX operations, perpetual trading, liquid staking, and cross-protocol portfolio management.18MIT