metacontract mcp
About
A Model Context Protocol (MCP) server for metacontract smart contract development.
Details
- Author
- metacontract
- Downloads
- 345
- Categories
- Other
Jump to
- 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
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
metacontract mcpCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
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.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"metacontract mcp": {
"mc-mcp": {
"command": "mc-mcp",
"env": {
"MC_PROJECT_ROOT": "/path/to/your/project"
}
}
}
}
}
McpServers
{
"mc-mcp": {
"command": "mc-mcp",
"env": {
"MC_PROJECT_ROOT": "/path/to/your/project"
}
}
}
mc-mcp
A Model Context Protocol (MCP) server for the metacontract (mc) framework, providing smart contract development support via Foundry integration and semantic documentation search.
---
Overview
mc-mcp is an extensible MCP server designed for the metacontract (mc) framework.
It enables AI-powered smart contract development workflows by exposing tools such as:
- mc_search_docs_semantic: Performs semantic search over mc documentation and user-configured sources, returning structured JSON results.
- mc_setup: Initializes a new Foundry project using the metacontract/template. (Set setup.force=true in the config if the directory is not empty.)
- mc_test: Runs Foundry tests (forge test) in your workspace.
- mc_deploy: Deploys contracts using the script specified in mcp_config.toml. Supports dry-run (default) and broadcast mode (broadcast: true argument).
- mc_upgrade: Upgrades contracts using the script specified in mcp_config.toml. Supports dry-run and broadcast mode.
- mc_lint: _(Coming Soon)_ Lints project files for best practices and errors.
- mc_erc7201_slot: Calculates the namespaced storage slot using ERC-7201.
---
Configuration and Project Root
Project Root is always specified by the MC_PROJECT_ROOT environment variable.
- The MC_PROJECT_ROOT environment variable is required because path resolution is delegated to the MCP client implementation. This ensures consistent and reliable behavior across different environments.
- Set MC_PROJECT_ROOT to your project root directory before running any mc-mcp command or tool.
- All configuration, including mcp_config.toml, is expected to be in this directory.
- If MC_PROJECT_ROOT is not set or does not exist, mc-mcp will return an error and not start.
- If mcp_config.toml is missing, mc-mcp will use built-in defaults and log a warning.
Example: Project Structure
/path/to/your/project/
├── mcp_config.toml # (optional) Project configuration
├── contracts/
├── scripts/
└── ...
Configuration File (mcp_config.toml)
- Place this file directly under your MC_PROJECT_ROOT directory.
- If omitted, mc-mcp will use default settings for all configuration values.
- See below for a sample config and field descriptions.
---
Getting Started
1. Install mc-mcp (as a CLI tool)
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



