
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A Rust MCP server template that exposes CosmWasm contract query and execute entry points as JSON schemas and message builders for AI agents.
CosmWasm MCP Server Template is cataloged as an MCP server attributed to drewstaylor. A Rust MCP server template that exposes CosmWasm contract query and execute entry points as JSON schemas and message builders for AI agents. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
能力定义尚未审核。未核验的采集内容不会作为可信接口展示。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
暂无可展示的已审核记录。这不表示上游不支持此能力。
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for CosmWasm MCP Server Template are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
Yes; the README describes a straightforward multi-contract strategy using namespaced contracts and pattern matching with tool parameters for switching between contracts.
Doc comments are embedded into generated schemas as description metadata by schemars, helping LLM agents interpret query entry points.
Building requires the nightly Rust toolchain to use edition 2024 of rustc.
README.md · 8e1e0bd574c4 · 采集于 2026-11-13 10:55:09 UTC
保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。
当前显示最后一次成功采集的文档快照,请以来源页面为准。
MCP server in Rust, for wrapping query and execute entry point messages to be broadcast by a signer. This project template should work with any CosmWasm contract.
To build this project requires the nightly build of Rust, this will allow using edition 2024 of rustc.
# Switch rustc to `nightly` channel
rustup default nightly
# Build for development
cargo build
# Build for deployment
cargo build --release
This project is an MCP server template that can be used with any CosmWasm contract, but to use this template with your own contracts, you'll need to make a few small changes.
To use this template with your own contract, implement the following mandatory changes:
Cargo.tomlRemove the following line from Cargo.toml and replace it with the dependency for your contract:
cw20-wrap = { git = "https://github.com/archway-network/cw20-wrap.git", version = "1.0.0", features = ["library"] }
Cargo.toml does not export cosmwasm_std::entry_point, query and execute.For example, your contract should not import entry_point, query and execute (and so on for instantiate, reply, migrate, etc. as is relevant to your project) like this:
use cosmwasm_std::{
entry_point, to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult,
Uint128,
};
// ...
pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> Result<Response, ContractError> {
// ...
}
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
// ...
}
Instead, you should feature gate your contract entry points like this:
#[cfg(not(feature = "library"))]
use cosmwasm_std::entry_point;
use cosmwasm_std::{
to_json_binary, Binary, Deps, DepsMut, Env, MessageInfo, Response, StdResult,
Uint128,
};
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn execute(deps: DepsMut, env: Env, info: MessageInfo, msg: ExecuteMsg) -> Result<Response, ContractError> {
// ...
}
#[cfg_attr(not(feature = "library"), entry_point)]
pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult<Binary> {
// ...
}
src/server.rsAt the top of the src/server.rs file (see code), remove the default cw20-wrap dependency, and replace it with the corresponding dependency to your contract. Your contract must publicly export msg::QueryMsg and msg::Execute for the MCP server to be able to create JSON schemas that AI agents can understand.
/// Replace the below import with the contract you want the MCP server to support
use cw20_wrap::msg::{ExecuteMsg, QueryMsg};
At the bottom of src/contract.rs (see code), update the deployed contract addresses for the mainnet and testnet deployments of your contract. Or, if you want to remove one of the entries, so there's only a testnet or only a mainnet entry, you'll need to remove the entry from the contracts array in the CwMcp::new() function (see code).
/// Replace with your deployed contract addresses.
/// This helps the query msg and tx msg builders wrap
/// your query and tx messages to the contract into
/// CosmWasm's `QueryRequest` and `CosmosMessage` types
/// that can be broadcast by a rpc enabled wallet tool
pub static CONTRACT_MAINNET: &str =
"archway1gaf9nw7n8v5lpjz9caxjpps006kxfcrzcuc8y5qp4clslhven2ns2g0ule";
pub static CONTRACT_TESTNET: &str =
"archway1r8kepegwhldwqanuurc769l2g0qxlsm2sm6t5rhqjzcerxsgshls267f7a";
src/server.rs)./// (Optionally) if your contract provides any custom query response types
/// configure this tool so the MCP agent can access them. Allowing the MCP
/// agent to access the custom query responses enables it to provide smarter
/// advice, and summaries, about exacly what data can be fetched when making
/// a query to the contract.
/// @see: src/query.rs
#[tool(description = LIST_QUERY_RESPONSE_DESCR)]
async fn list_query_responses(&self) -> Result<CallToolResult, Error> {
let schema = schema_for!(AllQueryResponse);
let serialized: String = serde_json::to_string(&schema).unwrap_or("".to_string());
Ok(CallToolResult::success(vec![Content::text(serialized)]))
}
src/instruction.rs.src/instruction.rs are basic, working examples. When working with complex contracts, and/or multi-contract systems, you'll likely want to improve the tool and server descriptions to provide more detailed context to the LLM.Adding doc comments in your is important for schema generation
Even after expanding your server instructions, tool descriptions and tool parameter descriptions, you may find the AI continues to provide inaccurate or misleading data, or few details about the contract entry points. Normally, this happens due to lack of doc comments (e.g. triple slash comments '///') in your contract source code for msg::QueryMsg and msg::ExecuteMsg
This happens because schemars embeds doc comments directly into the schema as a description metadata field.
Here's an example of a well commented msg::QueryMsg that will help guide the LLM Agent:
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
/// Get all swaps (enumerable)
/// Return type: ListResponse
List {
start_after: Option<String>,
limit: Option<u32>,
},
/// Get all Collection Offers (enumerable)
/// Return type: ListResponse
ListCollectionOffers {
start_after: Option<String>,
limit: Option<u32>,
},
// ...
}
The above 2 variants of QueryMsg will generate the following embedded descriptions into the generated schemas, which can be very helpful for LLMs that need to interpret your query entry points:
[
{
"description": "Get all swaps (enumerable) Return type: ListResponse",
"type": "object",
"required": [
"list"
],
// ...
},
{
"description": "Get all Collection Offers (enumerable) Return type: ListResponse",
"type": "object",
"required": [
"list_collection_offers"
],
// ...
},
]
By default, this MCP server provides the following 6 tools and functionality.
list_contract_deployments - Lists Ambur core contract addresses (mainnet and testnet)list_nft_collections - Lists Ambur NFTs (mainnet and testnet contract addresses, collection name, and collection description)list_query_entry_points - Lists the queries that can be made to the core Ambur marketplace contractbuild_query_msg - Build a query to the core Ambur marketplace contract, that can be broadcast by an RPC connected walletlist_tx_entry_points - Lists the transactions that can be made to the core Ambur marketplace contractbuild_execute_msg - Build a transaction to the core Ambur marketplace contract, that can be signed and broadcast by an RPC connected walletThe below instructions assume the MCP server is being built in stdio mode (which is the easiest mode to configure for Claude desktop).
Build a release binary and point the mcp server's command to its path. No run arguments (args) are required:
// claude_desktop_config.json
{
"mcpServers": {
"ambur": {
"command": "/your-computer-path/cosmwasm-mcp-template/target/release/cosmwasm-mcp-template",
"args": []
}
}
}
For Virtual Machine setups and WSL users, execute the VM as the command and use run arguments (args) to point the VM where to run the binary:
// claude_desktop_config.json
{
"mcpServers": {
"ambur": {
"command": "wsl.exe",
"args": [
"bash",
"-ic",
"/your-vm-path/cosmwasm-mcp-template/target/release/cosmwasm-mcp-template",
]
}
}
}
@langchain/mcp-adapters must be installed in the graph project. This package will convert the MCP endpoints into Graph tools.
// graph.ts
import { MultiServerMCPClient } from "@langchain/mcp-adapters";
// ...
// Create client and connect to server
const client = new MultiServerMCPClient({
throwOnLoadError: true,
prefixToolNameWithServerName: true,
additionalToolNamePrefix: "mcp",
mcpServers: {
cosmwasm_contract: {
transport: "sse",
url: "http://localhost:8000", // Or, URL + IP of a remote host
useNodeEventSource: true,
reconnect: {
enabled: true,
maxAttempts: 5,
delayMs: 2000,
},
// Or, uncomment to use transport mode `http-streamable`:
// url: "http://localhost:8000",
// headers: {},
// automaticSSEFallback: false
},
},
});
const tools = await client.getTools();
// ...
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for CosmWasm MCP Server Template from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/cosmwasm-mcp-template)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。
尚无已审核的包 / 镜像标识,暂不展示下载统计。
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.