Back to MCP directory
publicPublicdnsLocal runtime

SparkMango

SparkMango是一个将Solidity智能合约转换为Python服务器实现的工具,提供自动化的RESTful API生成和状态管理功能。

article

README

🚀 SparkMango

SparkMango 是一个模型上下文协议(MCP)服务器,它能将 Solidity 字节码转换为功能完整的服务器实现,在 Solidity 智能合约与 Python 服务器应用间搭建了便捷桥梁。

🚀 快速开始

SparkMango 可自动从 Solidity 合约生成服务器实现,让通过 RESTful API 与区块链合约交互变得更简单。以下是使用步骤:

  1. 安装:
pip install mcp-server
  1. 从 Solidity 合约生成服务器:
mcp-server generate --contract path/to/contract.json --output 输出目录
  1. 启动服务器:
mcp-server start --port 8000

✨ 主要特性

  • 将 Solidity 合约转换为 Python 实现
  • 自动服务器生成
  • 合约变量状态管理
  • RESTful API 端点
  • 事件处理
  • 全面的测试框架

📦 安装指南

使用以下命令安装:

pip install mcp-server

💻 使用示例

基础用法

从 Solidity 合约生成服务器:

mcp-server generate --contract path/to/contract.json --output 输出目录

启动服务器:

mcp-server start --port 8000

📚 详细文档

有关详细文档,请参阅docs目录。

🔧 技术细节

设置

  1. 克隆仓库:
git clone https://github.com/ArjunBhuptani/sparkmango.git
cd sparkmango
  1. 安装依赖项:
pip install -r requirements.txt
pip install -r requirements-test.txt

测试

运行测试套件:

python -m pytest

📄 许可证

本项目 licensed under the MIT License,具体见LICENSE文件。

贡献

欢迎贡献!请随意提交 Pull Request。

项目状态

查看当前项目状态和未来功能,请参考PROJECT_STATUS.md

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client