mcpField
C
CosmWasm MCP Server

CosmWasm MCP Server

Local
github.com/adairrrFinance0Updated 81w ago

About CosmWasm MCP Server

CosmWasm MCP Server is a Rust MCP server for AI agents that need to query and interact with CosmWasm smart contracts. It uses cw-orchestrator and includes example contract queries, increments, and balance checks.

Key features

  1. 01查询 CosmWasm 合约
  2. 02调用合约操作
  3. 03查询地址余额

Use cases

  1. 01读取合约计数值
  2. 02递增合约计数值
  3. 03查询链上地址余额

MCP support

作为 MCP 服务,向 MCP 客户端提供与 CosmWasm 智能合约交互的工具。

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.