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.
- Open the Cursor IDE
- On the project root folder, create a
.cursorfolder - In the
.cursorfolder, create amcp.jsonfile - Paste this content
{ "mcpServers": { "aptos-mcp": { "command": "npx", "args": ["-y", "@aptos-labs/aptos-mcp"], "env": { "APTOS_BOT_KEY": "${env:APTOS_BOT_KEY}" } } }}-
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.
-
Save the file. Cursor merges project and user
mcp.jsonfiles; a project entry with the same name wins.
Verify Cursor runs your MCP
Section titled “Verify Cursor runs your MCP”- Open Cursor Settings: Cursor Settings → Tools & MCP (the panel is also under Customize → MCP).
- Confirm
aptos-mcpis enabled and showing a green indicator.

-
Click the “refresh” icon if the server does not connect on the first try.
-
Make sure the Cursor chat is in Agent mode.

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