A comprehensive Model Context Protocol (MCP) server for complete Polkadot development, providing seamless integration with Pop CLI for smart contracts, parachains, pallets, and chain interaction.
Source Code: https://github.com/r0gue-io/pop-mcp
Build anything on Polkadot through natural conversation with your AI assistant:
- 🔷 Smart Contracts - Create, build, test, and deploy ink! contracts
- ⛓️ Parachains - Build and launch custom parachains/appchains
- 🧩 Pallets - Create custom runtime modules
- 🔗 Chain Interaction - Call extrinsics, query storage, read constants
- 📚 Documentation - Complete Polkadot, ink!, XCM, and Substrate guides
- 🛠️ Development Tools - Full lifecycle from idea to deployment
Access comprehensive guides directly through your AI assistant:
- ink! Comprehensive Guide - Complete smart contract language documentation
- ink! Technical Guide - Deep technical implementation details
- Pop CLI Guide - Complete tooling for contracts, parachains, and pallets
- XCM Comprehensive Guide - Cross-chain messaging theory and patterns
- XCM ink! Examples - Real-world XCM contract examples with code
Powerful tools for complete Polkadot development:
check_pop_installation- Verify Pop CLI installationinstall_pop_instructions- Platform-specific installation guides
list_templates- View contract templates (ERC20, ERC721, ERC1155, DNS, multisig, etc.)create_contract- Create contracts from templatesbuild_contract- Build contracts with optimizationtest_contract- Run unit and e2e testsdeploy_contract- Deploy to any networkcall_contract- Execute contract methodsget_contract_info- Inspect contract metadata
create_parachain- Create new parachain/appchain projectsbuild_parachain- Build parachain binaries and runtimelaunch_parachain- Launch local parachain networks
create_pallet- Create custom runtime palletsbenchmark_pallet- Run pallet benchmarks
call_chain- Execute extrinsics, query storage, read constantsquery_chain_storage- Read chain stateread_chain_constant- Read runtime constants
clean_project- Clean build artifactspop_help- Get help for any Pop CLI commandsearch_documentation- Search through all documentation for topics and keywords
Download the latest pre-built binary for your platform from the GitHub Releases:
# macOS ARM64 (Apple Silicon)
curl -L https://github.com/r0gue-io/pop-mcp/releases/latest/download/pop-mcp-server-aarch64-apple-darwin.tar.gz | tar xz
chmod +x pop-mcp-server-aarch64-apple-darwin
# macOS Intel
curl -L https://github.com/r0gue-io/pop-mcp/releases/latest/download/pop-mcp-server-x86_64-apple-darwin.tar.gz | tar xz
chmod +x pop-mcp-server-x86_64-apple-darwin
# Linux
curl -L https://github.com/r0gue-io/pop-mcp/releases/latest/download/pop-mcp-server-x86_64-unknown-linux-gnu.tar.gz | tar xz
chmod +x pop-mcp-server-x86_64-unknown-linux-gnuMove the binary to a location in your PATH (optional):
sudo mv pop-mcp-server-* /usr/local/bin/pop-mcp-serverTo build from source:
# Clone the repository
git clone https://github.com/r0gue-io/pop-mcp.git
cd pop-mcp
# Build with Rust
cargo build --release
# The binary will be at target/release/pop-mcp-serverAdd to your Claude Desktop configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"pop-cli": {
"type": "stdio",
"command": "/path/to/pop-mcp-server",
"args": [],
"env": {}
}
}
}Replace /path/to/pop-mcp-server with the actual path to your binary, or just pop-mcp-server if it's in your PATH.
Claude Code is available in VS Code! To use the Pop MCP Server:
Add the MCP server to your global Claude settings file at ~/.claude.json:
{
"mcpServers": {
"pop-cli": {
"type": "stdio",
"command": "/path/to/pop-mcp-server",
"args": [],
"env": {}
}
}
}Alternatively, add a .mcp.json file in your project directory:
{
"mcpServers": {
"pop-cli": {
"type": "stdio",
"command": "node",
"args": [
"/absolute/path/to/pop-mcp/build/index.js"
],
"env": {}
}
}
}- Restart Claude Code (or reload VS Code window)
- Verify the server is loaded with
/mcpcommand in Claude Code - You should see
pop-clilisted with available tools
Now you can develop Polkadot projects directly in your IDE with Claude's help!
For other MCP clients (Cline, Zed, etc.), refer to their documentation for adding MCP servers. Generally, you'll need to provide:
- Command:
node(orpop-mcp-serverif globally installed) - Args:
["/path/to/build/index.js"](if using local path)
User: Is Pop CLI installed?
Assistant: [Uses check_pop_installation tool]
User: Create an ERC20 token contract called MyToken
Assistant: [Uses create_contract with name="MyToken" and template="erc20"]
User: Build and test the contract in ./my-contract
Assistant: [Uses build_contract and test_contract tools]
User: Deploy the contract to my local node
Assistant: [Uses deploy_contract with appropriate parameters]
Documentation is automatically available - just ask questions:
User: How do I implement storage in ink!?
Assistant: [Claude reads from ink! documentation and explains storage implementation]
User: What are the best practices for XCM?
Assistant: [Claude accesses XCM comprehensive guide and provides best practices]
Use the search tool for specific queries:
User: Search for information about testing contracts
Assistant: [Uses search_documentation with query="testing" to find relevant sections]
User: Find examples of cross-contract calls in the ink! docs
Assistant: [Searches ink! documentation and returns relevant examples with context]
- standard - Basic flipper contract (boolean toggle)
- erc20 - Fungible token implementation
- erc721 - NFT implementation
- erc1155 - Multi-token standard
- dns - Domain Name Service example
- cross-contract-calls - Inter-contract communication
- multisig - Multi-signature wallet
Checks if Pop CLI is installed and returns version information.
// No parameters requiredProvides platform-specific installation instructions.
{
platform?: "macos" | "linux" | "source" // Optional, defaults to macos
}Lists all available ink! contract templates.
// No parameters requiredCreates a new contract from a template.
{
name: string, // Contract project name
template: string, // Template name (see Available Templates)
path?: string // Target directory (defaults to current)
}Builds a contract with optional optimizations.
{
path: string, // Contract directory path
release?: boolean // Build with optimizations (default: false)
}Runs contract tests (unit or e2e).
{
path: string, // Contract directory path
e2e?: boolean, // Run e2e tests (default: false)
node?: string // Custom node path for e2e (optional)
}Removes build artifacts.
{
path: string // Contract directory path
}Retrieves contract metadata and information.
{
path: string // Contract directory or .contract file path
}Deploys and instantiates a contract.
{
path: string, // Contract directory or .contract bundle
constructor?: string, // Constructor name (default: "new")
args?: string, // Constructor arguments (space-separated)
suri?: string, // Signing key URI (default: //Alice)
url?: string, // Node WebSocket URL (default: ws://localhost:9944)
dryRun?: boolean, // Dry run without submitting (default: false)
uploadOnly?: boolean // Only upload code, don't instantiate (default: false)
}Calls a method on a deployed contract.
{
contract: string, // Contract address
message: string, // Method name to call
args?: string, // Method arguments (space-separated)
suri?: string, // Signing key URI (default: //Alice)
url?: string, // Node WebSocket URL (default: ws://localhost:9944)
dryRun?: boolean // Dry run without submitting (default: false)
}Provides instructions for launching a local parachain network.
{
path?: string // Parachain directory (optional)
}Gets help for any Pop CLI command.
{
command?: string // Command to get help for (e.g., "new contract")
}Searches through all Polkadot documentation for specific topics or keywords.
{
query: string, // Search query (e.g., "storage", "testing", "XCM")
scope?: string // Optional: "ink", "pop", "xcm", or "all" (default: "all")
}The Pop MCP Server provides comprehensive Polkadot documentation that Claude can access in three ways:
Claude automatically has access to all documentation when the MCP server is loaded. Just ask questions naturally:
How do I define storage in an ink! contract?
Explain XCM and how to use it in contracts
What's the difference between contracts and parachains?
Show me how to implement cross-contract calls
Use the search_documentation tool to find specific information:
Search the documentation for "storage macros"
Find information about XCM in the docs
Look up testing patterns in ink!
Access specific documentation files via MCP resource protocol:
ink://docs/llm-guide- ink! comprehensive guide (complete language reference)ink://docs/technical-guide- ink! technical reference (deep implementation details)pop://docs/cli-guide- Pop CLI documentation (tooling and workflows)xcm://docs/comprehensive-guide- XCM theory and patterns (cross-chain messaging)xcm://docs/ink-examples- XCM contract examples (real-world code)
Your AI assistant has comprehensive knowledge about:
- ink! Smart Contracts: Language syntax, macros, storage, events, errors
- Contract Patterns: ERC20, ERC721, ERC1155, DNS, multisig, cross-contract calls
- Testing: Unit tests, e2e tests, test patterns and best practices
- XCM: Cross-chain messaging, integration patterns, real examples
- Pop CLI: All commands, workflows, and tooling
- Deployment: Local nodes, testnets, mainnet deployment strategies
- Optimization: Gas optimization, storage efficiency, best practices
pop-mcp/
├── src/
│ └── index.ts # Main MCP server implementation
├── build/ # Compiled JavaScript (generated)
├── .claude/
│ └── docs/ # Documentation resources
│ ├── ink-llms.txt
│ ├── ink-technical-guide.txt
│ ├── pop-cli-comprehensive-guide.txt
│ ├── xcm-comprehensive-guide.txt
│ └── xcm-ink-examples-guide.txt
├── package.json
├── tsconfig.json
└── README.md
npm run buildnpm run watchThe MCP Inspector provides a UI for testing your server:
npm run inspectorThis will open a web interface where you can:
- Test individual tools
- View available resources
- Inspect request/response payloads
- Debug server behavior
- Verify the build completed successfully:
npm run build - Check the path in your MCP client configuration
- Look for errors in the client's developer console or logs
- Restart your MCP client after configuration changes
- Verify Pop CLI is installed:
pop --version - Ensure you're in the correct directory for contract operations
- Check that paths provided to tools are absolute paths
- Review Pop CLI output for specific error messages
On macOS/Linux, ensure the build output is executable:
chmod +x build/index.jsThis MCP server is designed for hackathons and rapid development. Contributions are welcome!
- Add tool definition in
ListToolsRequestSchemahandler - Implement tool logic in
CallToolRequestSchemahandler - Update README documentation
- Test with MCP Inspector
- Place documentation files in
.claude/docs/ - Add resource definition to
DOCSarray - Rebuild the server
- Pop MCP Server GitHub - This repository
- Pop CLI Documentation
- Pop CLI GitHub
- ink! Documentation
- Model Context Protocol
- Polkadot Documentation
MIT
For issues and questions:
- Pop MCP Server: https://github.com/r0gue-io/pop-mcp/issues
- Pop CLI: https://github.com/r0gue-io/pop-cli/issues
- MCP Protocol: https://github.com/modelcontextprotocol/specification
Built for Polkadot hackathons and developers 🚀