Pop MCP
Exposes Pop CLI as MCP tools so AI clients can create, deploy, and call ink! contracts and manage local networks.
What this file does
Exposes Pop CLI as MCP tools so AI clients can create, deploy, and call ink! contracts and manage local networks.
When to use it
- You want an AI assistant to run Pop CLI commands for you
- You are building a contract workflow that should be scriptable via MCP
- You need to start and stop local Substrate networks through an AI client
Assumes this stack
layout: width: default title: visible: true description: visible: true tableOfContents: visible: true outline: visible: true pagination: visible: false
Pop MCP
Pop MCP is an MCP server that exposes Pop CLI as structured tools for AI clients (contract + chain workflows).
Prerequisites
- Pop CLI installed and working:
pop --version
If needed: Install Pop CLI
Install
Build from source:
git clone https://github.com/r0gue-io/pop-mcp.git
cd pop-mcp
cargo build --release
Server binary:
target/release/pop-mcp-server
Connect A Client
Pop MCP runs over stdio. You do not run the server manually. Your AI client launches it.
Pop MCP can sign transactions via PRIVATE_KEY. Read-only calls work without it. Use dev keys like //Alice and //Bob for local networks only.
Claude Code (CLI)
Project scope (writes .mcp.json in the repo):
claude mcp add pop-mcp --scope project --env PRIVATE_KEY=//Alice -- /absolute/path/to/pop-mcp/target/release/pop-mcp-server
Verify:
claude mcp get pop-mcp
Codex CLI
Config is stored in ~/.codex/config.toml (or project .codex/config.toml).
codex mcp add pop-mcp --env PRIVATE_KEY=//Alice -- /absolute/path/to/pop-mcp/target/release/pop-mcp-server
Verify:
codex mcp list
Try It (Prompt Workflows)
Once Pop MCP is configured, ask your AI client to do real work. You should see it call tools like create_contract, up_ink_node, deploy_contract, and call_contract on your behalf.
Example 1: Contract quickstart (local node)
Ask:
Create a new ink! contract project, start a local ink node, build and deploy the contract, then call a read method to show its initial state. After that, call a write method to change state and read it back.
Example 2: Local network quickstart (relay + Asset Hub)
Ask:
Start a local Paseo network with Asset Hub, query a couple of storage values (like balances constants and system events), then submit a small balance transfer and show the resulting events.
Example 3: Clean shutdown
Ask:
Clean up any nodes and networks you started.
References
- Pop MCP repo:
https://github.com/r0gue-io/pop-mcp - MCP spec:
https://modelcontextprotocol.io
What's inside
3 sections (prerequisites, install, client connection), 2 prompt examples, 2 client configs, 3 code blocks
Change this for your project
- Replace
/absolute/path/to/pop-mcp/target/release/pop-mcp-serverwith the actual path to your built binary - Replace
//Alicewith your own private key or dev seed
Where it goes
A prompt collection. Copy the individual prompts you need rather than the whole file.
Related Documents
You must use artifacts for
Defines when to use artifacts and provides detailed instructions for creating code, documents, HTML, SVG, Mermaid diagrams, and React components.
starProject
Lists 120+ starred open-source projects across AI, DevOps, Flutter, and web development for discovery and inspiration.
midjourney-expert
Serves as a reference for Midjourney V7/Niji 7 prompting, covering parameters, reference systems, editing tools, and moderation workarounds.
Daily Agent Tasks Framework
Gives you a daily structure for assigning strategic work to Claude and development work to Codex, organized by project priority and current sprint.