- Home
- MCP servers
- Stacks Clarity
Stacks Clarity
- typescript
7
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"exponentlabshq-stacks-clarity-mcp": {
"command": "npx",
"args": [
"-y",
"@stacks/stacks-clarity-mcp"
],
"env": {
"HIRO_API_KEY": "YOUR_API_KEY_PLACEHOLDER",
"STACKS_NETWORK": "testnet"
}
}
}
}You have a complete MCP server for Stacks development that exposes a wide toolkit of Clarity, SIPs, security post-conditions, and performance optimizations. Use it to explore SIP standards, generate compliant contracts, enforce security patterns, analyze performance, and integrate with your frontend or development workflow.
How to use
You use the MCP server by connecting to it from an MCP client or development environment. Start an MCP agent that runs locally and point your client to the configured stdio or http endpoint. The server provides 32+ tools covering SIP standards, token development, security post-conditions, performance optimization, account management, testing, and frontend integration. To start working, launch the local MCP server using the commands shown in your configuration and verify the agent mode in your MCP client so you can issue tool requests like listing SIP standards, generating token templates, or running security tests.
How to install
Prerequisites you need on your machine include Node.js and npm, and tooling for Solidity/Clarity development as applicable (Clarinet CLI for contract development). Ensure your environment has a Stacks-compatible wallet for frontend integration. These steps assume you are using a local development setup with an MCP client that runs an MCP server script via npx.
# Install dependencies for the MCP server project
npm install
# Build the MCP server project (if applicable)
npm run build
# Start or connect to the MCP server via your MCP client configuration
Additional setup and configuration
The MCP server supports local development with a stdio-based startup. You can run the server using npx to execute the built or source server script, including environment variables for API keys and network settings. The following examples show how to configure the local MCP client to start the server. Use absolute paths where required by your tooling.
Production readiness and checks
Before you start using the MCP server in production or a test environment, verify SIP compliance, post-conditions, and performance analysis tools. Ensure all generated tests pass and that frontend integration works with wallet connections. Maintain a security-first posture by validating post-conditions for token transfers and reviewing analysis results from the performance tools.
Troubleshooting
If the MCP server does not appear in your client, confirm the configuration, restart the client, and ensure the agent mode is active in the MCP chat. Check that the server script runs (or that the remote endpoint is reachable) and review any error logs shown by the MCP client. If you encounter module or build issues, ensure dependencies are installed and that you are invoking the correct runtime (for example, using tsx to run from source).
Notes on security and SIP compliance
Security is prioritized through mandatory post-conditions for token transfers and automatic SIP-009 and SIP-010 compliance checks. When you generate transfers, always include post-conditions and use the provided post-condition templates to prevent unauthorized asset movements. The server enforces proper error handling and authorization patterns to help you maintain robust contract behavior.
Available tools
list_sips
Discover all available SIP standards and related documentation
get_sip
Retrieve specific SIP content such as SIP-009 or SIP-010
get_clarity_book
Access the complete Clarity language reference
get_token_standards
Obtain essential SIP-009 and SIP-010 token standards
search_sips
Search SIPs by topic or keyword
get_sip010_info
Token contract information and metadata for SIP-010
get_sip010_balance
Check fungible token balances for addresses
generate_sip010_transfer
Create transfer transactions with post-conditions for SIP-010
generate_sip010_template
Generate a complete SIP-010 compliant contract
get_sip009_token_info
NFT information and metadata for SIP-009
get_sip009_collection_info
Collection-level information for SIP-009
generate_sip009_transfer
Create NFT transfers with post-conditions
generate_sip009_template
Generate SIP-009 compliant NFT contracts
generate_fungible_post_condition
Create mandatory post-conditions for fungible transfers
generate_nonfungible_post_condition
Create mandatory post-conditions for NFT transfers
generate_stx_post_condition
Create mandatory post-conditions for STX transfers
analyze_transaction_post_conditions
Validate transaction security post-conditions
generate_post_condition_template
Provide security post-condition templates
analyze_contract_performance
Analyze contract performance and costs
estimate_operation_cost
Estimate Clarity operation costs for optimization
generate_optimization_recommendations
Generate SIP-012 optimization recommendations
get_stacks_account_info
Fetch comprehensive account information on the Stacks network
check_stx_balance
Check STX and token balances for an address
get_transaction_history
Retrieve account transaction history with pagination
validate_stacks_address
Validate address formats and network compatibility
generate_clarinet_project
Create a complete Clarinet project setup
generate_clarity_contract
Generate SIP-compliant Clarity contracts
generate_contract_tests
Generate unit, integration, and security tests
configure_clarinet_project
Configure network and environment for Clarinet
build_clarity_smart_contract
Guidance to build and optimize Clarity contracts
build_stacks_frontend
Frontend integration guidance with @stacks/connect
build_stacks_dapp
End-to-end development guide for Stacks dApps