Cover image
Try Now
2025-04-14

Artifact2MCP Generator permite la generación de servidor MCP automáticamente y dinámicamente el artefacto compilado del contrato inteligente (Chain -Agnóstico)

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars


------ THIS PROJECT IS STILL WORK IN PROGRESS 🐶 -----


Smart-Contract MCP Server Generator

A tool that generates typed MCP (Model Context Protocol) servers for any deployed smart contract.

Overview

This project provides a chain-agnostic tool that automatically generates MCP servers from smart contract artifacts (ABIs, IDLs, etc.). The generated servers expose smart contract functionality as tools that can be used by Large Language Models (LLMs) through the Model Context Protocol.

What is MCP?

The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to Large Language Models. It enables LLMs to securely access tools and data sources through a standardized interface.

MCP follows a client-server architecture:

  • MCP Hosts: Programs like Claude Desktop, IDEs, or AI tools that want to access data through MCP
  • MCP Clients: Protocol clients that maintain 1:1 connections with servers
  • MCP Servers: Lightweight programs that expose specific capabilities through the standardized Model Context Protocol

Features

  • Generate typed MCP servers from smart contract ABIs/IDLs
  • Support for multiple blockchain platforms (Ethereum, Solana, etc.)
  • Customizable templates for different programming languages
  • CLI tool for easy integration into development workflows

Installation

go install github.com/openhands/mcp-generator/cmd/generate-mcp@latest

Usage

# Generate a TypeScript MCP server from an Ethereum ABI
generate-mcp --artifact path/to/abi.json --lang ts --output ./my-mcp-server

# Generate a Python MCP server from a Solana IDL
generate-mcp --artifact path/to/idl.json --chain solana --lang python --output ./my-mcp-server

Testing

The project includes end-to-end tests to verify that the generated MCP servers work correctly with the MCP Inspector.

Running Tests

# current command to test generate
go run cmd/generate-mcp/main.go -a examples/erc20.json --name "ERC20 Token" --address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48

# Navigate to the tests directory
cd mcp-tests

# Install dependencies
npm install

# Run the tests
./run-tests.sh

The tests use Playwright to automate interactions with the MCP Inspector UI and verify that:

  1. The MCP server connects successfully
  2. All tools are listed correctly
  3. Each tool can be executed with valid parameters
  4. Error handling works as expected

See the tests/README.md for more details.

Development Status

This project is currently in active development. See the Phase 1 issue for current progress.

License

MIT

相关推荐

  • av
  • Ejecute sin esfuerzo LLM Backends, API, frontends y servicios con un solo comando.

  • 1Panel-dev
  • 🔥 1Panel proporciona una interfaz web intuitiva y un servidor MCP para administrar sitios web, archivos, contenedores, bases de datos y LLM en un servidor de Linux.

  • WangRongsheng
  • 🧑‍🚀 全世界最好的 llM 资料总结(数据处理、模型训练、模型部署、 O1 模型、 MCP 、小语言模型、视觉语言模型) | Resumen de los mejores recursos del mundo.

  • rulego
  • ⛓️Rulego es un marco de motor de regla de orquestación de componentes de alta generación de alto rendimiento, de alto rendimiento y de alto rendimiento para GO.

  • sigoden
  • Cree fácilmente herramientas y agentes de LLM utilizando funciones Plain Bash/JavaScript/Python.

  • hkr04
  • SDK liviano C ++ MCP (Protocolo de contexto del modelo)

  • RockChinQ
  • 😎简单易用、🧩丰富生态 - 大模型原生即时通信机器人平台 | 适配 Qq / 微信(企业微信、个人微信) / 飞书 / 钉钉 / Discord / Telegram / Slack 等平台 | 支持 Chatgpt 、 Deepseek 、 DiFy 、 Claude 、 Gemini 、 Xai 、 PPIO 、 Ollama 、 LM Studio 、阿里云百炼、火山方舟、 Siliconflow 、 Qwen 、 Moonshot 、 Chatglm 、 SillyTraven 、 MCP 等 LLM 的机器人 / Agente | Plataforma de bots de mensajería instantánea basada en LLM, admite Discord, Telegram, WeChat, Lark, Dingtalk, QQ, Slack

  • dmayboroda
  • Trapo conversacional local con contenedores configurables

  • modelscope
  • Iniciar aplicaciones de múltiples agentes empoderadas con Building LLM de manera más fácil.

  • evilsocket
  • El kit de desarrollo de agentes simples.

  • yamadashy
  • 📦 Repomix (anteriormente Repopack) es una herramienta poderosa que incluye todo su repositorio en un solo archivo amigable con AI. Perfecto para cuando necesite alimentar su base de código a modelos de idiomas grandes (LLM) u otras herramientas de IA como Claude, ChatGPT, Deepseek, Perplexity, Gemini, Gemma, Llama, Grok y más.

    Reviews

    5 (0)