Aptos MCP & Claude Code
Esta página aún no está disponible en tu idioma.
Set up Claude Code with Aptos MCP
Section titled “Set up Claude Code with Aptos MCP”- Install the
claude-code
package
npm install -g @anthropic-ai/claude-code
- Locate where Claude Code stores its configuration, usually on Mac it is at
~/.claude.json
- Edit the
mcpServers
object in thejson
file with
{ "mcpServers": { "aptos-mcp": { "command": "npx", "args": ["-y", "@aptos-labs/aptos-mcp"], "type": "stdio", "env": { "APTOS_BOT_KEY": "<bot_api_key>" } } }}
- Obtain your
APTOS_BOT_KEY
:
- Visit the Aptos Developer Portal and log in with your account.
- Navigate to the API Keys section and create a new key.
- Copy the generated key for use in the next step.
-
Make sure to update the
APTOS_BOT_KEY
with the key you generated in the previous step. -
Navigate to your project
cd your-awesome-project
- In a new terminal window type:
claude
- You can now use Claude Code to interact with the Aptos MCP. Prompt the agent with
what aptos mcp version are you using?
to verify the connection. The agent should reply with something like:
I'm using Aptos MCP version 0.0.2.