mcpField
Q
qng-mcp

qng-mcp

本地服务
github.com/Qitmeer金融数据058 周前更新

关于 qng-mcp

qng-mcp 是面向 qng 的 MCP 服务。README 展示了 stdio 和 SSE 连接方式,以及查询最新区块数量的示例;还可通过配置扩展能力。

主要功能

  1. 01stdio 连接模式
  2. 02SSE 连接模式
  3. 03访问 qng 工具
  4. 04可扩展配置

适用场景

  1. 01查询最新区块数量
  2. 02通过 MCP 主机连接 qng

MCP 相关

向 MCP 客户端提供 qng 功能,支持 stdio 和 SSE 两种连接模式。示例展示了获取最新区块数量的工具。

配置

本地服务的配置在各客户端中通用,复制后粘贴到客户端的 MCP 配置文件即可。

mcp.json · 通用配置
{
"mcpServers": {
"qng": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"qng_mcp_server"
]
}
}
}
启动命令docker run -i --rm qng_mcp_server

本地服务需要在你的电脑上安装运行环境(如 Node.js 18+)。各客户端的配置文件位置不同,请参考客户端文档。

安装包
ociqng_mcp_server

工具

还没有获取到工具列表

本地服务需要在你的电脑上运行后才能读取工具,维护者暂未提供工具列表。

详细介绍

qng-mcp

qng 的 MCP 服务支持 Model Context Protocol(MCP)协议

编译 mcphost

使用 stdio 模式

{
  "mcpServers": {
    "github": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "qng_mcp_server",
        "-rpc",
        "http://127.0.0.1:8545"
      ]
    }
  }
}
{
    "mcpServers": {
        "qngserver": {
            "command": "./qng_server/qng_server.exe",
            "args": [
                "-rpc",
                "http://127.0.0.1:8545/"
            ]
        }
    }
}

.\mcphost.exe  -m ollama:qwen2.5:3b --config .\conf\stdio.json --debug

使用 sse 模式

{
    "mcpServers": {
        "qngserver": {
            "url": "http://localhost:8080/sse"
        }
    }
}
# start server
.\qng_server -t sse
.\mcphost.exe  -m ollama:qwen2.5:3b --config .\conf\sse.json --debug
2025/04/26 09:21:20 INFO Model loaded provider=ollama model=qwen2.5:3b
2025/04/26 09:21:20 INFO Initializing server... name=qngserver
2025/04/26 09:21:20 INFO Server connected name=qngserver
2025/04/26 09:21:20 INFO Tools loaded server=qngserver count=3

  You: qng latest block count
2025/04/26 09:21:36 INFO 🔧 Using tool name=qngserver__get_block_count

  Assistant:


  The total number of qNG blocks in the latest zone is 9,590,345. Is there anything else you need to know about this information?



  You: qng  tx count of block order 1590344
2025/04/26 09:22:21 INFO 🔧 Using tool name=qngserver__get_block_by_order

  Assistant:


  The transaction count in the qNG block with order 1590344 is 1. This block contains only one transaction, which is a coinbase transaction that includes an asset transfer of 120,000,000,000 MEER tokens. Is there anything else you would like to know about this
  block?



  You: qng stateroot detail of order 1590344  
2025/04/26 09:23:00 INFO 🔧 Using tool name=qngserver__get_block_stateroot

  Assistant:


  For the qNG block with order 1590344, the stateroot details are as follows:

  • Hash: c5c045912d19ea72ec84dab22772a5307b37983154bd494f0cf94b402cee2e32
  • Order: 1590344
  • Height: 1584355
  • Valid: True
  • EVM State Root: 0xadd9acd10c9fd3a52956fc03d202867bbb8d19a5e8649e9047e751c4e6e444ce
  • EVM Height: 95296
  • EVM Head: 0x35c13f5238f51511f85d8c63f3a71683fdcd3351c14b3748fb6aaa5e1d827038
  • State Root: 920bf0c285558944cae4b8f4745a2453235d714fb3c6e5d3ced7b05ada08ee52

  Is there anything specific you would like to know about these details?

如果需要更多功能,请扩展 config.json

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。