Back to .md Directory

Pop MCP

Exposes Pop CLI as MCP tools so AI clients can create, deploy, and call ink! contracts and manage local networks.

May 2, 2026
0 downloads
1 views
ai rag prompt mcp claude workflow
View source

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

RustMCPPop CLIink!Substrate

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-server with the actual path to your built binary
  • Replace //Alice with 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