metacontract mcp
@metacontract
About metacontract mcp
A Model Context Protocol (MCP) server for metacontract smart contract development.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mc-mcp": {
"command": "mc-mcp",
"env": {
"MC_PROJECT_ROOT": "/path/to/your/project"
}
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is metacontract mcp?
mc-mcp is an extensible MCP server for the metacontract (mc) framework. It enables AI-powered smart contract development workflows via Foundry integration and semantic documentation search, exposing tools for project setup, testing, deployment, and documentation retrieval.
How to use metacontract mcp?
Install via cargo install mc-mcp, add the server to your MCP client (e.g., Cursor, Cline, RooCode) with MC_PROJECT_ROOT set to your project directory. The server automatically starts and provides tools like mc_search_docs_semantic, mc_setup, mc_test, mc_deploy, and mc_upgrade. An optional mcp_config.toml file under the project root customizes reference sources and script paths.
Key features of metacontract mcp
- Layered (onion) architecture for maintainability
- Rust implementation for performance and safety
- Embedded Qdrant vector DB for fast semantic search
- Local embedding generation via fastembed-rs
- Markdown parsing for documentation indexing
- Prebuilt documentation index auto-downloaded from GitHub Releases
Use cases of metacontract mcp
- Initialize a new Foundry project with the metacontract template
- Perform semantic search over mc, Solidity, and user documentation
- Run TDD cycles: write tests and execute
mc_testvia your agent - Deploy or upgrade contracts using scripts defined in
mcp_config.toml - Calculate ERC-7201 namespaced storage slots
FAQ from metacontract mcp
What is MC_PROJECT_ROOT and why is it required?
MC_PROJECT_ROOT is an environment variable specifying the project root directory. It is required because path resolution is delegated to the MCP client, ensuring consistent behavior across environments. If unset or non-existent, the server returns an error.
How do I configure reference sources and scripts?
Place a mcp_config.toml file in your MC_PROJECT_ROOT directory. It defines documentation sources (local paths) and default Foundry scripts for deploy/upgrade. If the file is missing, mc-mcp uses built-in defaults.
What MCP transports are supported and how is authentication handled?
mc-mcp uses stdio transport (as shown in client configurations). No authentication mechanism is documented.
Where does the documentation index data live?
On first startup, the prebuilt documentation index (prebuilt_index.jsonl.gz) is downloaded from the latest GitHub Release and cached in the system cache directory. The path can be overridden in mcp_config.toml via prebuilt_index_path.
Are there any known runtime limits or dependencies?
The server requires Rust, Foundry (for test/deploy tools), and an MCP-compatible client. Tests may hit OS file descriptor limits (ulimit -n 4096 recommended) or embedding model cache lock errors—these can be resolved with make clean-cache and single-threaded test execution.
Frequently asked questions
What is `MC_PROJECT_ROOT` and why is it required?
`MC_PROJECT_ROOT` is an environment variable specifying the project root directory. It is required because path resolution is delegated to the MCP client, ensuring consistent behavior across environments. If unset or non-existent, the server returns an error.
How do I configure reference sources and scripts?
Place a `mcp_config.toml` file in your `MC_PROJECT_ROOT` directory. It defines documentation sources (local paths) and default Foundry scripts for deploy/upgrade. If the file is missing, mc-mcp uses built-in defaults.
What MCP transports are supported and how is authentication handled?
mc-mcp uses stdio transport (as shown in client configurations). No authentication mechanism is documented.
Where does the documentation index data live?
On first startup, the prebuilt documentation index (`prebuilt_index.jsonl.gz`) is downloaded from the latest GitHub Release and cached in the system cache directory. The path can be overridden in `mcp_config.toml` via `prebuilt_index_path`.
Are there any known runtime limits or dependencies?
The server requires Rust, Foundry (for test/deploy tools), and an MCP-compatible client. Tests may hit OS file descriptor limits (`ulimit -n 4096` recommended) or embedding model cache lock errors—these can be resolved with `make clean-cache` and single-threaded test execution.
Basic information
More Other MCP servers
🚀 Model Context Protocol (MCP) Curriculum for Beginners
microsoftThis open-source curriculum introduces the fundamentals of Model Context Protocol (MCP) through real-world, cross-language examples in .NET, Java, TypeScript, JavaScript, Rust and Python. Designed for developers, it focuses on practical techniques for building modular, scalable,
Reactive Resume
amruthpillaiA one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
MCP Registry
modelcontextprotocolA community driven registry service for Model Context Protocol (MCP) servers.
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.
Activepieces
activepiecesAI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
Comments