mcpField
N
Nodit MCP Server

Nodit MCP Server

本地服务
nodit.io金融数据231 周前更新

关于 Nodit MCP Server

Nodit MCP Server 通过 Nodit 的 Web3 基础设施向 AI Agent 和开发者提供结构化区块链数据,无需自行处理特定链的 RPC。它支持 EVM 与非 EVM 网络的数据查询和操作,并可本地或远程连接。

主要功能

  1. 01发现 API 类别和操作
  2. 02获取操作参数与架构
  3. 03调用 Node、Data 和多链 API
  4. 04查询 Aptos 索引器 API
  5. 05访问已索引的链上活动
  6. 06支持 EVM 与非 EVM 网络

适用场景

  1. 01查看钱包余额和交易活动
  2. 02分析智能合约交互
  3. 03汇总跨网络的链上活动
  4. 04构建使用区块链数据的应用

MCP 相关

将 Nodit 的 API 发现、规格查询和调用操作作为 MCP 工具提供。支持本地 stdio 上的 JSON-RPC,以及使用 SSE 的远程 MCP 端点。

配置

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

mcp.json · 通用配置
{
"mcpServers": {
"nodit": {
"command": "npx",
"args": [
"-y",
"@noditlabs/nodit-mcp-server"
]
}
}
}
启动命令npx -y @noditlabs/nodit-mcp-server

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

安装包
npm@noditlabs/nodit-mcp-server

工具

9

收录的工具列表 · 更新于 3 周前

此工具无需参数。

详细介绍

Nodit MCP 服务

一个模型上下文协议(MCP)服务,通过 Nodit 的 Web3 基础设施,将 AI Agent 和开发者连接到多个网络上结构化、适用于上下文的数据。

Nodit Server MCP server

License Node.js TypeScript smithery badge

概述

Nodit MCP 服务简化了 AI 模型和应用与区块链生态系统交互的方式。
开发者无需处理复杂的节点 RPC、原始事件日志或特定于链的数据结构,即可访问经过标准化的多链区块链数据,其格式针对 AI 推理和决策进行了优化。

借助 Nodit 的 MCP,你可以:

  • 构建 AI Agent,以查询、分析和处理 EVM 兼容网络及非 EVM 网络上的实时区块链数据。
  • 无需具备专业的区块链开发技能,即可开发集成 Web3 的应用。
  • 通过统一的访问层,利用 Nodit 的可靠节点基础设施、Web3 数据 API 和 GraphQL 索引服务。
  • 根据工作流需求,轻松开发支持本地和远程集成的区块链 MCP。

支持的网络包括 Ethereum、Base、Optimism、Arbitrum、Polygon、Aptos、Bitcoin、Dogecoin、TRON、XRPL、GIWA(Sepolia)等。

目录

工具列表

Nodit MCP 服务提供多种工具,使 AI Agent 能够动态发现、了解并使用 Nodit 的 Web3 API 和数据基础设施。这些工具通过将 API 交互拆分为不同步骤,最大限度地减少 token 消耗并保持上下文轻量:

  • 用于列出 API 类别的工具
    获取可用高级 API 类别的列表。

    • list_nodit_api_categories
  • 用于列出 API 操作的工具
    获取所选类别(节点 API、数据 API、Aptos 索引器 API、Webhook API、多链 API)中的可用操作。

    • list_nodit_node_apis
    • list_nodit_data_apis
    • list_nodit_aptos_indexer_api_query_root
    • list_nodit_webhook_apis
    • list_nodit_multichain_apis
  • 用于获取 API 规范的工具
    获取特定 API 操作的详细信息(参数、请求/响应架构)。

    • get_nodit_api_spec
    • get_nodit_aptos_indexer_api_spec
  • 用于调用 API 的工具
    使用 operationId 和经过验证的参数执行 API 调用。

    • call_nodit_api
    • call_nodit_aptos_indexer_api
    • call_nodit_multichain_api

Nodit MCP 服务遵循模型上下文协议(MCP)规范,使用标准的基于 stdio 的 JSON-RPC 协议进行通信。 目前,服务与客户端之间仅支持基于 stdio 的通信。

功能

以下是 Nodit MCP Server 为 AI Agent 和大模型提供的主要功能及支持的区块链网络。
有关 API 规范和使用指南的详细信息,请参阅 Nodit 开发者文档。

  • RPC 节点和节点 API
    通过 Nodit 专业运营的基础设施访问区块链节点端点。
    支持实时网络查询、交易提交、智能合约交互等功能。

  • Web3 数据 API
    用于访问经过精细索引的区块链数据的高级 API。
    包含经过处理的数据集,例如区块和交易详情、代币转账历史、账户级交易摘要以及资产流动详情——这些信息很难通过原始 RPC 调用直接汇总。

  • GraphQL 索引器 API(仅限 Aptos)
    通过 GraphQL 端点查询 Aptos 区块链的详细活动。

  • 支持的网络

    • EVM 兼容:Ethereum、Arbitrum、Avalanche、Base、Chiliz、Kaia、Optimism、Polygon、BNB Chain、GIWA(Sepolia)
    • 非 EVM:Aptos、Bitcoin、Dogecoin、TRON、XRPL、Sui、Solana

前置条件

  • Node.js 18+
  • Nodit API Key(在 Nodit Console 注册并获取 API 密钥)

运行本地 Nodit MCP Server

使用 npx(推荐)
npx @noditlabs/nodit-mcp-server@latest
使用本地构建
# Clone the repository
git clone --recurse-submodules https://github.com/noditlabs/nodit-mcp-server.git

# Move into the project directory
cd nodit-mcp-server

# Install dependencies
npm install

# Build the project
npm run build

启动前,设置你的 Nodit API 密钥:

export NODIT_API_KEY=your-api-key

然后启动服务:

node build/index.js
与本地服务通信

本地运行 Nodit MCP Server 后,你可以通过 stdio 上的 JSON-RPC 与其通信。
以下是向服务发送基本请求的方法:

示例:列出可用工具

你可以直接输入 JSON-RPC 负载:

{"method":"tools/list","params":{},"jsonrpc":"2.0","id":1}

或者,你可以使用 echo 命令通过管道传递请求:

echo '{"method":"tools/list","params":{},"jsonrpc":"2.0","id":1}' | node build/index.js

示例:调用特定工具(list_nodit_api_categories)

echo '{"method":"tools/call","params":{"name":"list_nodit_api_categories","arguments":{}},"jsonrpc":"2.0","id":1}' | node build/index.js
连接到 Cursor IDE 或 Claude Desktop

将以下配置添加到你的 .cursor/mcp.json 或 claude_desktop_config.json:

  • Cursor

    • MacOS:~/.cursor/mcp.json
    • Windows:C:\Users\<Username>\.cursor\mcp.json
  • Claude Desktop

    • MacOS:~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows:C:\Users\<Username>\AppData\Roaming\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "nodit": {
      "command": "npx",
      "args": ["@noditlabs/nodit-mcp-server@latest"],
      "env": {
        "NODIT_API_KEY": "****"
      }
    }
  }
}

🔔 重要
将 **** 替换为你的实际 Nodit API 密钥。
如果未正确配置 API 密钥,API 请求会因身份验证错误而失败。

连接到 Claude CLI

你也可以直接通过 Claude CLI 使用 Nodit MCP Server,快速完成设置。

使用以下命令添加 Nodit MCP Server:

# Add the Nodit MCP server
claude mcp add nodit-mcp-server npx @noditlabs/nodit-mcp-server

# Set API Key
export NODIT_API_KEY=your-api-key

# Start Claude with the Nodit MCP server enabled
claude

集成 Nodit 远程 MCP 服务

如果你使用的 AI 工具支持远程 MCP 集成,则无需运行本地 MCP 服务即可连接到 Nodit 的远程 MCP 服务。 这样,你就可以直接在 AI 环境中使用 Nodit MCP 功能。

端点

使用以下端点连接到 Nodit 远程 MCP 服务。请将 INSERT_YOUR_API_KEY 替换为你的实际 Nodit API 密钥。

https://mcp.nodit.io/sse?apiKey=INSERT_YOUR_API_KEY
连接到 Claude(Web)

如果你使用的是 Claude Enterprise、Pro 或 Max 套餐,可以集成远程 MCP 服务。

  1. 前往 Settings > Integrations,点击 [Add custom integration] 按钮。
  2. 点击 [Add more] 按钮,集成新的 Remote MCP。
  3. 输入上方提供的端点,完成设置。

集成完成后,你会在 Claude 主屏幕的 Search and Tools 部分看到已添加 Nodit MCP。

连接到 Cursor IDE

要将 Nodit MCP 连接到 Cursor IDE: 1. 打开 Preferences > Cursor Settings > MCP Tools。 2. 点击 [+ New MCP Server],打开 mcp.json 配置文件。

你也可以直接在以下路径打开并编辑 mcp.json 文件:

  • MacOS:~/.cursor/mcp.json
  • Windows:C:\Users\<Username>\.cursor\mcp.json

将以下配置添加到 mcpServers 对象中。如果你已配置其他 MCP 服务,请用逗号分隔各条目。

{
  "mcpServers": {
    "nodit": {
      "url": "https://mcp.nodit.io/sse?apiKey=INSERT_YOUR_API_KEY"
    }
  }
}

添加后,返回 Cursor 界面中的 MCP Tools,并通过切换开关启用 nodit MCP。当状态以绿色显示“9 tools enabled”时,表示连接已完成。

故障排除

通过 npx 在 Claude Desktop 中运行 MCP 时遇到问题

如果你将 MCP 服务与 Claude Desktop 或其他依赖本地 Node.js 安装的工具结合使用,可能会遇到以下问题:

  • 安装了多个版本的 Node.js(例如,通过 Homebrew 和软件包安装程序安装)
  • PATH 环境冲突
  • Claude Desktop 无法识别正确的 Node.js 运行时

请按照以下步骤确认系统已正确安装并识别 Node.js 18+。

1. 检查当前启用的 Node.js 版本

在终端中运行以下命令以检查版本:

node --version

你应该会看到以 v18 或更高版本开头的版本号(例如,v18.19.0)。

如果没有,你可能需要安装兼容版本或切换到该版本。

提示

Claude Desktop 使用的 Node.js 版本可能与终端中的版本不同。如果你有多个安装(例如,通过 Homebrew、nvm 或直接安装程序安装),它可能会默认使用意料之外的版本。 如需列出常见安装路径:

# Homebrew installation
ls /usr/local/bin/node
ls /opt/homebrew/bin/node

# nvm installations
ls ~/.nvm/versions/node/

# System installation
ls /usr/bin/node
2. 根据需要安装或切换到 Node.js 18+

如果你没有兼容版本,请使用以下任一方法安装 Node.js:

  • 使用 Node.js 官方安装程序:从 nodejs.org 下载
  • 使用 Homebrew(macOS):
bashbrew install node@20
  • 使用 nvm(推荐用于版本管理):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20
nvm use 20
nvm alias default 20
3. 检查 Claude Desktop 使用的 Node.js 版本

Claude Desktop 会继承系统环境中的 PATH。 在终端中运行:

which node

这会显示终端当前启用的 Node.js 二进制文件路径。从该终端启动 Claude 时,它很可能会使用此路径。

4. 强制 Claude Desktop 使用正确的 Node.js 版本
  • 如果你使用 nvm:
nvm use 18  # Set proper version 
nvm alias default 18
  • 如果你使用 Homebrew,请确保它在 PATH 中的优先级更高:
export PATH="/opt/homebrew/bin:$PATH"  # for Apple Silicon
# or
export PATH="/usr/local/bin:$PATH"     # for Intel Macs

我们建议只采用一种安装方式(例如 nvm 或 Homebrew),以避免版本冲突。

5. 重启 Claude Desktop

完成更改后,重启 Claude Desktop,确保它获取正确的环境变量和 Node.js 版本。

Nodit MCP 提示词示例

连接 Nodit MCP 后,你可以使用自然语言直接查询多个网络的区块链数据。 以下示例仅展示了众多可能用法中的一小部分——欢迎进一步探索并尝试自己的使用场景。

📊 链上活动监控
Summarize the recent activity of 0xabc…def across Ethereum and Arbitrum. Include major transactions, token transfers, and NFT interactions over the past 7 days.
What fungible and non-fungible tokens does this wallet hold across Ethereum and Polygon? Include balances and token names.
Analyze the risk profile of wallet 0xabc… based on its recent on-chain behavior.
🧾 智能合约与交易分析
Analyze how users interacted with the contract at 0xcontract… on Ethereum over the last week.
Analyze the last 10 blocks on Arbitrum.
🧠 AI Agent 使用场景
Based on wallet 0xabc…’s holdings, recommend optimal DeFi strategies across Ethereum and Arbitrum.
Create a daily summary report for 0xdao… including token balances, inflow/outflow, and governance activity.
⚙️ Web3 DApp 开发
Write TypeScript code using fetch to retrieve all ERC-20 transfers for 0xabc… from Ethereum using Nodit’s Node API.
Build a simple dashboard to visualize how assets have moved in recent XRPL transactions.
Build a dashboard that aggregates blockchain data across multiple chains using Nodit.

范围与限制

Nodit MCP Server 提供结构化上下文,帮助基于 LLM 的 Agent 有效使用 Nodit 的 API。
其职责包括:

  • 将 Nodit API(Node API、Web3 Data API)整理为 LLM 可使用的格式。
  • 提供端点详情、输入/输出架构、示例响应和错误处理指南。

但以下事项不受 MCP 控制:

  • API 的选择可能因 LLM 版本(例如 GPT-4、Claude 3)、提示词工程或 Agent 设计而异。
  • 对 API 响应或错误的解读取决于使用该服务的 LLM 的推理能力。

Nodit MCP Server 专注于提供准确且结构化的 API 上下文,
但不保证外部 LLM 最终的推理结果或行为。

许可证

本项目根据 Apache License 2.0 授权。
完整许可条款请参阅 LICENSE 文件。
相关法律声明见 NOTICE 文件。

“Nodit” 和 Nodit 徽标是 Lambda256 的商标。
未经事先书面许可,禁止使用该名称或徽标。


© Lambda256。保留所有权利。

评论

支持 Markdown

第一次接触 MCP?

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

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