DP

deso-protocol/deso-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

4 stars 6 forks 质量 57 趋势 12

DeSo Protocol MCP Server

概览

A comprehensive Model Context Protocol (MCP) server for DeSo blockchain development, now with HTTP transport support. 🛠️ - deso_api_explorer - Complete DeSo API documentation and examples - deso_js_guide - deso-js SDK setup and usage guides - generate_deso_code - Generate code examples for DeSo operations - explain_deso_architecture - Architectural explanations and patterns - repository_search - Search DeSo repository documentation - read_repository_document - Read specific DeSo docs - deso_debugging_guide - Real debugging fixes for common issues - deso_implementation_patterns - Best practices from production apps - deso_ui_components - Complete UI component library guide - deso_graphql_helper - GraphQL query builder and examples 🚀 - RESTful HTTP API instead of stdio - CORS support for web integration - Health check endpoint - Easy deployment and scaling The server will run on http://localhost:3000 by default. Send JSON-RPC requests to the root endpoint.

README

以下为原文 README 节选,完整内容请查看原文。

DeSo MCP Server v3.0 (HTTP)

A comprehensive Model Context Protocol (MCP) server for DeSo blockchain development, now with HTTP transport support.

Features

🛠️ 10 Comprehensive Tools:

  • deso_api_explorer - Complete DeSo API documentation and examples
  • deso_js_guide - deso-js SDK setup and usage guides
  • generate_deso_code - Generate code examples for DeSo operations
  • explain_deso_architecture - Architectural explanations and patterns
  • repository_search - Search DeSo repository documentation
  • read_repository_document - Read specific DeSo docs
  • deso_debugging_guide - Real debugging fixes for common issues
  • deso_implementation_patterns - Best practices from production apps
  • deso_ui_components - Complete UI component library guide
  • deso_graphql_helper - GraphQL query builder and examples

🚀 HTTP Transport:

  • RESTful HTTP API instead of stdio
  • CORS support for web integration
  • Health check endpoint
  • Easy deployment and scaling

Quick Start

Local Development

# Install dependencies
npm install

# Start the server
npm start

# Development with auto-reload
npm run dev

The server will run on http://localhost:3000 by default.

Environment Variables

PORT=3000          # Server port (default: 3000)
HOST=localhost     # Server host (default: localhost)

Docker Deployment

# Build the image
npm run docker:build

# Run the container
npm run docker:run

# Or manually:
docker build -t deso-mcp-server .
docker run -p 3000:3000 -e HOST=0.0.0.0 deso-mcp-server

HTTP Endpoints

Health Check

curl http://localhost:3000/

MCP Tool Requests

Send JSON-RPC requests to the root endpoint.

Important:

  • MCP requires initialization first, then you can call tools
  • Always include the Accept: application/json, text/event-stream header
  • The server runs in stateless mode (no session management required)
# 1. Initialize the MCP session
curl -X POST http://localhost:3000/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "initialize",
    "params": {
      "capabilities": {},
      "protocolVersion": "2024-11-05",
      "clientInfo": {"name": "my-client", "version": "1.0.0"}
    }
  }'

# 2. List available tools
curl -X POST http://localhost:3000/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/list"
  }'

# 3. Call a specific tool
curl -X POST http://localhost:3000/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{
    "jsonrpc": "2.0", 
    "id": 3,
    "method": "tools/call",
    "params": {
      "name": "deso_api_explorer",
      "arguments": {
        "category": "social",
        "includeCode": true
      }
    }
  }'

Example Usage

JavaScript Client Example

在 GitHub 查看完整 README

安装

npx deso-mcp-server
新手?先看 mcpskill.org 教程 →