Skip to main content
Glama

@outblock/flow-mcp

用于模型上下文协议 (MCP) 的 Flow 区块链工具。此软件包提供了一组通过模型上下文协议与 Flow 区块链交互的工具。

特征

  • 获取任意地址的 FLOW 余额

  • 获取任意 Flow 代币的代币余额

  • 获取 COA 帐户信息

  • 获取合约源代码

  • 获取详细的帐户信息,包括存储统计信息

Related MCP server: MCP Etherscan Server

安装

# Using npm
npm install @outblock/flow-mcp

# Using bun
bun add @outblock/flow-mcp

MCP 配置

要将此工具与 Claude 一起使用,请将以下内容添加到您的 MCP 配置中:

{
  "mcpServers": {
    "flow": {
      "command": "npx",
      "args": ["-y", "@outblock/flow-mcp"]
    }
  }
}

您可以在以下位置找到您的 MCP 配置:

  • macOS: ~/Library/Application Support/Claude/mcp.json

  • Windows: %APPDATA%/Claude/mcp.json

  • Linux: ~/.config/Claude/mcp.json

添加配置后,重新启动Claude以加载新的MCP服务器。

工具

流量平衡

获取任意地址的 FLOW 余额:

{
  name: 'get_flow_balance',
  input: {
    address: string,
    network?: 'mainnet' | 'testnet'
  }
}

帐户信息

获取详细账户信息:

{
  name: 'get_account_info',
  input: {
    address: string,
    network?: 'mainnet' | 'testnet'
  }
}

代币余额

获取任意 Flow 代币的余额:

{
  name: 'get_token_balance',
  input: {
    address: string,
    network?: 'mainnet' | 'testnet'
  }
}

COA 账户

获取COA账户信息:

{
  name: 'get_coa_account',
  input: {
    address: string,
    network?: 'mainnet' | 'testnet'
  }
}

获取合同

获取合约源代码:

{
  name: 'get_contract',
  input: {
    address: string,
    contractName: string,
    network?: 'mainnet' | 'testnet'
  }
}

📂 项目结构

flow-mcp/
├── src/
│   ├── tools/          # MCP tools implementation
│   │   ├── flowBalance/    # Flow balance tool
│   │   ├── accountInfo/    # Account info tool
│   │   ├── tokenBalance/   # Token balance tool
│   │   ├── coaAccount/     # COA account tool
│   │   └── getContract/    # Contract source tool
│   ├── utils/          # Shared utilities
│   ├── prompts/        # MCP prompts
│   ├── types/          # Type definitions
│   └── bin/           # CLI implementation
├── biome.json         # Linting configuration
├── tsconfig.json      # TypeScript configuration
└── package.json       # Project dependencies

🛠️ 开发

本项目使用 FastMCP 进行开发和测试。FastMCP 为 MCP 服务器提供了简化的开发体验。

# Install dependencies
bun install

# Format code
bun run format

# Run tests
bun test

# Run development server
bun run dev

# Inspect the server
bun run inspect

# Build
bun run build

要将您的开发 MCP 服务器添加到 Claude Desktop:

  1. 构建项目:

    bun run build
  2. 添加到您的 Claude 桌面配置:

    // You only need the argument if you need to pass arguments to your server
    {
      "mcpServers": {
        "your-server-name": {
          "command": "node",
          "args": ["/path/to/your/project/dist/main.js", "some_argument"]
        }
      }
    }

创建新工具

该项目包括一个帮助创建新 MCP 工具的脚本:

bun run scripts/create-tool.ts <tool-name>

这将:

  1. src/tools/<tool-name>下创建一个新的工具目录

  2. 生成基本工具结构包括:

    • index.ts(主要实现)

    • schema.ts(工具参数的 JSON 架构)

    • test.ts(测试文件)

  3. 更新工具索引文件以导出新工具

例子:

bun run scripts/create-tool.ts weather

提交消息格式

  • feat :新功能(提升小版本)

  • fix :错误修复(补丁版本)

  • BREAKING CHANGE :重大变更(重大版本更新)

📜 版本管理

本项目使用standard-version进行自动化版本管理。运行bun run release即可创建新版本。

📦 发布到 npm

  1. 确保您已登录 npm:

    npm login
  2. 构建项目:

    bun run build
  3. 发布包:

    npm publish

在发布新版本之前,请记住使用bun run release更新版本号。

执照

MIT 许可证 - 详情请参阅许可证。

贡献

欢迎贡献代码!欢迎提交 Pull 请求。

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

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/Outblock/flow-mcp'

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