cosmwasm-mcp

cosmwasm-mcp is a framework developed in Rust for smart contracts. It operates on the CosmWasm platform, making it easier to develop blockchain applications. With a focus on usability and extensibility, it supports developers in quickly prototyping their projects.

GitHub Stars

0

User Rating

Not Rated

Favorites

0

Views

24

Forks

0

Issues

0

README
CosmWasm MCP Server

A Model Context Protocol (MCP) server that provides tools for interacting with CosmWasm smart contracts, enabling AI agents to manage and interact with blockchain-based contracts programmatically. Learn more at Model Context Protocol.

This MCP server is written in Rust and uses cw-orchestrator to interact with CosmWasm smart contracts.

Get started
  1. Build the Server (Counter Example)
cargo build --release

This builds a standard input/output MCP server binary.

  1. Add or update this section in your PATH-TO/claude_desktop_config.json

Windows

{
  "mcpServers": {
    "cosmwasm-mcp": {
      "command": "PATH-TO/rust-sdk/target/release/examples/cw-orch-mcp.exe",
      "args": [],
      "env": {
        "TEST_MNEMONIC": "<24 word mnemonic>",
        "RUST_LOG": "info"
      }
    }
  }
}

MacOS/Linux (~/Library/Application\ Support/Claude/claude_desktop_config.json)

{
  "mcpServers": {
    "cosmwasm-mcp": {
      "command": "PATH-TO/rust-sdk/target/release/examples/cw-orch-mcp",
      "args": [],
      "env": {
        "TEST_MNEMONIC": "<24 word mnemonic>",
        "RUST_LOG": "info"
      }
    }
  }
}
  1. Ensure that the MCP UI elements appear in Claude Desktop
    The MCP UI elements will only show up in Claude for Desktop if at least one server is properly configured. It may require to restart Claude for Desktop.

  2. Once Claude Desktop is running, try chatting:

Please query `neutron14kjnjnmeyz2pzaa9ga50dnsu5dwr39q0jhnz50nwr6yyqdkg6ayqwfsur2` for `get_count`.
Please increment `neutron14kjnjnmeyz2pzaa9ga50dnsu5dwr39q0jhnz50nwr6yyqdkg6ayqwfsur2`
Please get the balance of neutron14kjnjnmeyz2pzaa9ga50dnsu5dwr39q0jhnz50nwr6yyqdkg6ayqwfsur2
TODO
  • Don't hardcode chain, allow to be passed in by env or into any command
  • Instantiate a contract