Skip to main content
Glama
lmcmz
by lmcmz

Flow MCP 服务器

用于与福洛区块链交互的模型上下文协议 (MCP) 服务器。该服务器使 AI 助手能够通过标准化接口访问福洛区块链数据并执行操作。

特征

  • Flow 和可替代代币的余额检查

  • .find.fn域名的域名解析

  • 读取区块链数据的脚本执行

  • 交易提交和监控

  • 账户信息检索

  • 基于环境变量的流程配置

Related MCP server: n8n MCP Server

安装

使用 npx(推荐)

npx -y @outblock/flow-mcp-server --stdio

或者指定带有端口的 HTTP 模式:

npx -y @outblock/flow-mcp-server --port 3000

本地安装(用于开发)

git clone https://github.com/lmcmz/flow-mcp-server.git
cd flow-mcp-server
npm install
npm run build
npm start

用法

使用 npx 运行

# Run in stdio mode (for AI assistant integration)
npx -y @outblock/flow-mcp-server --stdio

# Run as HTTP server on port 3000
npx -y @outblock/flow-mcp-server --port 3000

# Specify Flow network
npx -y @outblock/flow-mcp-server --port 3000 --network testnet

运行本地开发服务器

# Run in stdio mode
npm run build
npm start

# Run as HTTP server on port 3000
npm run build
PORT=3000 npm start

# For development with auto-reload
npm run dev

配置

可以使用环境变量来配置服务器:

  • PORT - 要监听的 HTTP 端口(如果未设置,则默认为 stdio 模式)

  • FLOW_NETWORK - 要连接的 Flow 网络(主网、测试网、模拟器)

  • FLOW_ACCESS_NODE - 自定义 Flow 访问节点 URL

  • LOG_LEVEL - 日志级别(调试、信息、警告、错误)

与人工智能助手一起使用

当与 Claude 等 AI 助手集成时,您可以在 stdio 模式下启动 MCP 服务器并将其连接到助手的工具配置。

Claude 工具配置示例:

{
  "tools": [
    {
      "name": "flow-mcp-server",
      "command": "npx -y @outblock/flow-mcp-server --stdio"
    }
  ]
}

HTTP API 端点

在 HTTP 模式下运行时,以下端点可用:

  • /sse - 用于实时更新的服务器发送事件端点

  • /messages - 用于发送工具请求的 POST 端点

  • /health - 健康检查端点

  • / - 服务器信息

HTTP API 调用示例:

curl -X POST http://localhost:3000/messages \
  -H "Content-Type: application/json" \
  -d '{
    "tool_request": {
      "name": "get_balance",
      "parameters": {
        "address": "0x2d4c3caffbeab845",
        "network": "mainnet"
      }
    }
  }'

可用工具

  • get_balance - 获取地址的流量余额

  • get_token_balance - 获取可替代代币余额

  • get_account获取账户信息

  • resolve_domain - 将 .find 或 .fn 域名解析为地址

  • execute_script Cadence 脚本

  • send_transaction - 向区块链发送交易

  • get_transaction - 根据 ID 获取交易详情

版本历史记录

  • v0.1.1 - 修复交易服务中 formatArguments 导入问题

  • v0.1.0 - 初始版本,具有基本的 Flow 区块链集成

执照

麻省理工学院

-
security - not tested
F
license - not found
-
quality - not tested

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lmcmz/flow-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server