Skip to content

Setting up Aptos MCP with Cursor

Cursor reads MCP servers from mcp.json. Use a project file at .cursor/mcp.json or a user-wide file at ~/.cursor/mcp.json.

  1. Open the Cursor IDE
  2. On the project root folder, create a .cursor folder
  3. In the .cursor folder, create a mcp.json file
  4. Paste this content
{
"mcpServers": {
"aptos-mcp": {
"command": "npx",
"args": ["-y", "@aptos-labs/aptos-mcp"],
"env": {
"APTOS_BOT_KEY": "${env:APTOS_BOT_KEY}"
}
}
}
}
  1. Obtain your APTOS_BOT_KEY:

    • Visit Geomi and log in with your account.
    • Open the account menu in the bottom left, then Bot Keys, and create a new key.
    • Export the key in your shell (export APTOS_BOT_KEY=...) or replace ${env:APTOS_BOT_KEY} with the value locally. Do not commit the secret.
  2. Save the file. Cursor merges project and user mcp.json files; a project entry with the same name wins.

  1. Open Cursor Settings: Cursor SettingsTools & MCP (the panel is also under CustomizeMCP).
  2. Confirm aptos-mcp is enabled and showing a green indicator.

Make sure it is enabled and showing a green color indicator

  1. Click the “refresh” icon if the server does not connect on the first try.

  2. Make sure the Cursor chat is in Agent mode.

Make sure the Cursor AI window dropdown is set to Agent

  1. Prompt the agent with what aptos mcp version are you using? to verify the connection. It should report the currently published @aptos-labs/aptos-mcp version from the MCP Server Card.

Prompt the agent with what aptos mcp version are you using? to verify the connection.