stacks-clarity
MCP server for Stacks blockchain development with 32+ tools for Clarity smart contracts, SIP compliance, security, and performance optimization
claude mcp add --transport stdio exponentlabshq-stacks-clarity-mcp npx -y @stacks/stacks-clarity-mcp \ --env HIRO_API_KEY="" \ --env STACKS_NETWORK="testnet"
How to use
Stacks Clarity MCP Server provides a comprehensive toolkit for Stacks development, focused on Clarity smart contracts, SIP compliance, security post-conditions, and performance optimization. It exposes a suite of 32 tools spanning SIP standards discovery, token (FT/NFT) development, security post-conditions, SIP-012 performance guidance, account management, testing helpers, Clarinet project support, and frontend development guidance. Users can query available SIPs, inspect token information, generate compliant transfer templates, analyze post-conditions, and obtain performance recommendations. Integration with Cursor or Claude Code allows you to run these tools directly from your development environment, enabling rapid prototyping and secure contract deployments. The server is designed to assist both token authors and dApp developers by providing ready-made templates, validation utilities, and guidance aligned with SIP standards and security best practices.
How to install
Prerequisites:
- Node.js and npm (npm ≥ 5.2.0)
- Clarinet CLI for contract development
- Stacks wallet for frontend integration
- Cursor IDE or Claude Code for MCP integration (optional but recommended)
Install and set up:
- Clone the repository and install dependencies
git clone https://github.com/YOUR_USERNAME/stacks-clarity-mcp.git
cd stacks-clarity-mcp
npm install
- Build the project (required before running the MCP server)
npm run build
- Run or integrate with MCP tooling
- If using the published package, you can reference it via npx as shown in the Quick Setup example.
- If developing locally, ensure your build artifacts are accessible to the runtime (the dist/ output is generated by the build step).
- Optional: Set up Cursor/Claude Code integration
- Create a Cursor MCP config at .cursor/mcp.json with the appropriate command and environment variables as described in the integration guides.
Note: After cloning, you should run npm install and npm run build before attempting to run the MCP server.
Additional notes
Environment and configuration tips:
- STACKS_NETWORK can be mainnet, testnet, or devnet depending on your environment.
- HIRO_API_KEY is optional but can unlock higher rate limits and enhanced features; obtain it from platform.hiro.so and add it to your config.
- The MCP config uses the server key stacks-clarity-mcp; you can customize the key to match your project naming conventions in your Cursor config.
- Ensure you build before running to generate dist/ assets; runtime tools expect the built output when invoking the MCP server.
- If you encounter issues, verify Node.js version compatibility with the MCP package and confirm that environment variables are properly passed to the runtime.
- Refer to integration_guides/ for Cursor, Claude Code, and development setup specifics.
Related MCP Servers
evm
MCP server that provides LLMs with tools for interacting with EVM networks
mcp-klever-vm
MCP server for Klever blockchain smart contract development
ton-blockchain
A Model Context Protocol (MCP) server written in Python for natural language interaction with the TON blockchain 💎
midnight
Midnight MCP server giving AI assistants access to Midnight blockchain — search contracts, analyze code, explore docs
nodit
A Model Context Protocol (MCP) server for AI agents to interact with blockchain data via Nodit’s Web3 Data and Node APIs. Enables LLMs to access structured, multi-chain blockchain context with zero blockchain-specific logic.
MCPChain
MCPChain brings the Model Context Protocol to Web3 by anchoring agent tools, trust registries, and attestable executions on-chain.