The Aptos MCP Server enables interaction with Aptos documentation and assists in creating full-stack Aptos blockchain applications through the Model Context Protocol. This tool helps you browse documentation, create projects, generate components, test Move contracts, and create TypeScript interfaces from Move contracts.
Before installing the Aptos MCP Server, ensure you have:
First, install the MCP package using either UV or pip:
uv add "mcp[cli]"
# or
pip install "mcp[cli]"
Clone the repository and install the required dependencies:
git clone https://github.com/yourusername/aptos-mcp-server.git
cd aptos-mcp-server
uv add httpx
# or
pip install httpx
For increased API rate limits, set your GitHub token:
export GITHUB_TOKEN=your_github_token
Download and install Claude Desktop from claude.ai/download.
You can add the Aptos MCP Server to Claude Desktop in two ways:
Option 1: Use the MCP command:
mcp install aptos_mcp_server.py
Option 2: Manually edit the configuration file:
For macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
For Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"aptos-dev": {
"command": "uv",
"args": [
"--directory",
"/path/to/aptos-mcp-server",
"run",
"aptos_mcp_server.py"
]
}
}
}
After configuration, restart Claude Desktop for changes to take effect.
You can ask Claude to browse and search through Aptos documentation:
Set up new Aptos projects by asking Claude:
Create components for your Aptos projects by asking:
Test your contracts and generate TypeScript interfaces:
Here are some example queries you can use with the Aptos MCP Server:
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "aptos-dev" '{"command":"uv","args":["--directory","/path/to/aptos-mcp-server","run","aptos_mcp_server.py"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"aptos-dev": {
"command": "uv",
"args": [
"--directory",
"/path/to/aptos-mcp-server",
"run",
"aptos_mcp_server.py"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"aptos-dev": {
"command": "uv",
"args": [
"--directory",
"/path/to/aptos-mcp-server",
"run",
"aptos_mcp_server.py"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect