pop-mcp

Crates.iopop-mcp
lib.rspop-mcp
version0.1.0
created_at2025-11-11 11:09:58.877108+00
updated_at2025-11-11 11:09:58.877108+00
descriptionMCP Server for Polkadot ink! smart contract development with Pop CLI integration
homepagehttps://github.com/r0gue-io/pop-mcp
repositoryhttps://github.com/r0gue-io/pop-mcp
max_upload_size
id1926994
size2,816,741
Daan van der Plas (Daanvdplas)

documentation

README

Pop MCP Server

Model Context Protocol server that wires Pop CLI straight into your AI assistant so you can scaffold, build, and operate Polkadot projects through natural language.

Prerequisites

  • Pop CLI must be installed and available in your PATH
  • Rust toolchain (install via rustup)

Install

Clone the repository and build locally:

git clone https://github.com/r0gue-io/pop-mcp.git
cd pop-mcp
cargo build --release

The binary will be available at target/release/pop-mcp.

Configuration

Register the MCP server with your AI client:

Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "pop-cli": {
      "command": "/path/to/pop-mcp/target/release/pop-mcp"
    }
  }
}

Claude Code:

/mcp add pop-cli

When prompted, enter the full path to your binary: /path/to/pop-mcp/target/release/pop-mcp

Other MCP Clients: Use the same JSON structure with the full path to your target/release/pop-mcp binary.

Verify Installation

After configuration, restart your AI client and verify the installation:

  1. Ask your AI assistant: "Can you check if Pop CLI is installed?"
  2. The assistant should be able to run the check_pop_installation tool
  3. Try creating a simple contract: "Create a new ink! smart contract called my-token using the erc20 template"

⚠️ Caution
Do not add keys with mainnet funds. Even though the code uses it safely, LLMs can hallucinate and send malicious transactions. Use it only for testing/development purposes. DO NOT trust the LLM!!

Smart Contract Flow

  1. Check readiness – run check_pop_installation (or install_pop_instructions) so the assistant can confirm Pop CLI is available.
  2. Scaffoldcreate_contract with a template (standard, erc20, erc721, etc.) and optional --path.
  3. Build & test – use build_contract --path <dir> [--release] and test_contract --path <dir> to compile and verify.
  4. Deploydeploy_contract --path <dir> [--constructor ... --args ... --url wss://testnet-passet-hub.polkadot.io --suri //Alice]. The tool parses the output and surfaces addresses/code hashes.
  5. Interact & inspectcall_contract for messages, get_contract_info for metadata, and hash_data/convert_address for utilities. Use search_documentation scope=ink whenever extra context from the embedded guides is needed.

Chain Flow

  1. Template selectioncreate_chain --name my-chain [--template contracts|assets|evm --path /work] scaffolds the Pop CLI chain project.
  2. Configure runtime – edit pallets or configuration as needed; lean on search_documentation scope=pop for command references.
  3. Buildbuild_chain --path /work/my-chain [--para-id 1111 --release] produces the node and runtime artifacts.
  4. Benchmark & tune – run benchmark_pallet --path /work/my-chain --pallet <name> [--runtime wasm] to update weights before launch.
  5. Launch locallylaunch_chain --path /work/my-chain starts the network via pop up parachain.
  6. Operate – call extrinsics or query state through call_chain --pallet ... --function ... [--args ... --url ws://127.0.0.1:9944]. When you are ready to deploy contracts onto the chain, reuse the smart-contract flow against the chain’s RPC endpoint.

Stay within this flow, keep credentials test-only, and let the assistant orchestrate Pop CLI end-to-end.

Commit count: 0

cargo fmt