ambur-mcp
Ambur MCP server is a Rust-based server to streamline the use of Ambur query and execute entry point messages. It supports various tools for interaction with Ambur contracts, including NFTs and marketplace capabilities, ensuring seamless connectivity and transaction execution.
Ambur MCP server
MCP server in Rust, for wrapping Ambur query and execute entry point messages to be broadcast by a signer.
Configuring dependencies
Some dependencies in Cargo.toml
are provided by GitHub repositories. Public repositories will require no extra configuration, but private repositories must be cloned into the ./packages
folder. This project will not compile unless all GitHub dependencies from private repositories are cloned into ./packages
.
Building this project
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
Tools provided by this MCP server
This MCP server provides the following 15 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 contractlist_query_responses
- Lists the detailed response data that can be fetched from 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 walletlist_token_query_entry_points
- Lists the queries that can be made to an NFT token that can be traded on Ambur (e.g. Archies, Derpies, Foresight and Ghouls)build_token_query_msg
- Build a query to an NFT token that can be traded on Ambur (e.g. Archies, Derpies, Foresight and Ghouls), that can be broadcast by an RPC connected walletlist_token_tx_entry_points
- Lists the transactions that can be made to an NFT token that can be traded on Ambur (e.g. Archies, Derpies, Foresight and Ghouls)build_token_execute_msg
- Build a transaction to an NFT token that can be traded on Ambur (e.g. Archies, Derpies, Foresight and Ghouls), that can be broadcast by an RPC connected walletlist_minter_query_entry_points
- Lists the queries that can be made to a minter contract for an NFT that can be traded on Ambur (e.g. Archies minter, Derpies minter, Foresight minter and Ghouls minter)build_minter_query_msg
- Build a query to a minter contract for an NFT token that can be traded on Ambur (e.g. Archies minter, Derpies minter, Foresight minter and Ghouls minter), that can be broadcast by an RPC connected walletlist_minter_tx_entry_points
- Lists the transactions that can be made to a minter contract for an NFT token that can be traded on Ambur (e.g. Archies minter, Derpies minter, Foresight minter and Ghouls minter)build_minter_execute_msg
- Build a transaction to a minter contract for an NFT token that can be traded on Ambur (e.g. Archies minter, Derpies minter, Foresight minter and Ghouls minter), that can be broadcast by an RPC connected wallet
Connecting MCP to Claude Desktop
For default setups, 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/ambur-mcp/target/release/ambur-mcp",
"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/ambur-mcp/target/release/ambur-mcp",
]
}
}
}
Connecting MCP to LangGraph
@langchain/mcp-adapters must be installed in the graph project. This package will convert the MCP endpoints into Graph tools.
Using @langchain/mcp-adapters
// 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: {
ambur: {
transport: "stdio",
command: "~/mcp-servers/ambur-mcp", // path to pre-built linux binary
// stored in the Graph repo
args: [],
restart: {
enabled: true,
maxAttempts: 3,
delayMs: 1000,
},
},
},
});
const tools = await client.getTools();
// ...