aptos-mcp
Aptos MCP 服务器
用于与 Aptos 文档交互并创建全栈 Aptos 区块链应用程序的模型上下文协议 (MCP) 服务器。
特征
🔍 浏览和搜索 Aptos 文档
🔧 创建新的 Aptos 项目(全栈、合同或客户端)
🧩 为 Aptos 项目生成组件
🧪 测试 Aptos Move 合约
📜 为 Move 合约生成 TypeScript ABI 接口
Related MCP server: Dedalus MCP Documentation Server
安装
先决条件
Python 3.10 或更高版本
Node.js 和 npm
Aptos CLI(用于某些工具功能)
设置
安装 mcp 包:
uv add "mcp[cli]"
# or
pip install "mcp[cli]"克隆此存储库:
git clone https://github.com/yourusername/aptos-mcp-server.git
cd aptos-mcp-server安装依赖项:
uv add httpx
# or
pip install httpx(可选)设置 GitHub 令牌以增加 API 速率限制:
export GITHUB_TOKEN=your_github_token与 Claude Desktop 一起使用
从claude.ai/download安装 Claude Desktop
将 Aptos MCP 服务器添加到您的 Claude Desktop 配置中:
mcp install aptos_mcp_server.py或者手动编辑~/Library/Application Support/Claude/claude_desktop_config.json (macOS) 或%APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"aptos-dev": {
"command": "uv",
"args": [
"--directory",
"/path/to/aptos-mcp-server",
"run",
"aptos_mcp_server.py"
]
}
}
}重启Claude桌面
发展
使用 MCP Inspector 以开发模式运行服务器:
mcp dev aptos_mcp_server.py用法
一旦连接到 Claude Desktop,您可以:
浏览 Aptos 文档
让 Claude 浏览 Aptos 文档库:
“向我展示 Aptos 文档结构”
“在 Aptos 文档中查找有关 Move 模块的信息”
“获取表格实现文档”
创建新项目
要求 Claude 设置新的 Aptos 项目:
“创建一个名为‘my-first-dapp’的 Aptos 全栈项目”
“为市场生成 Move 智能合约”
“设置仅限客户端的 Aptos 项目”
生成组件
要求 Claude 为您的 Aptos 项目生成组件:
“生成用于连接 Aptos 钱包的 React 组件”
“创建一个移动表来存储用户配置文件”
“制作一个查询合约数据的客户端函数”
测试并生成 ABI
要求Claude测试契约并生成接口:
“在 ~/projects/my-dapp/move 测试我的 Aptos 合约”
“为我的 Move 合约生成 TypeScript 绑定”
示例查询
“浏览 Aptos 文档”
“在 Aptos 文档中搜索‘table’”
“创建一个名为‘nft-marketplace’的 Aptos 全栈项目”
“为代币合约生成 Move 模块”
“创建用于钱包连接的 React 组件”
“为我的合约生成 TypeScript ABI”
“测试我的合约的提现功能”
执照
麻省理工学院
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)
Inputs: contract_path (required), output_format.
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)
Inputs: project_name (required), processor_type.
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)
Inputs: project_name (required), project_type.
create_gas_stationB
Creates a new Aptos gas station (fee sponsorship) project.
Args:
project_name: Name of the gas station project
Inputs: project_name (required).
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
Inputs: component_type (required), component_name (required), project_dir (required), options.
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
Inputs: contract_path (required), function_name, args.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
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.
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
AlicenseBqualityDmaintenanceEnables 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.2273 npm13Apache 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.33 npmMIT