NEAR MCP

NEAR MCP

通过 MCP 调用与 NEAR 区块链交互

Category
访问服务器

Tools

system_list_local_keypairs

List all accounts and their keypairs in the local keystore by network.

system_import_account

Import an account into the local keystore. This will allow the user to use this account in other tools. Remember mainnet accounts are created with a .near suffix, and testnet accounts are created with a .testnet suffix.

system_remove_local_account

Removes a local NEAR account from the local keystore. Once removed, the account will no longer be available to the user. This does not delete the account from the NEAR blockchain, it only removes the account from the local keystore.

account_view_account_summary

Get summary information about any NEAR account. This calls the public RPC endpoint to get this information.

system_search_popular_fungible_token_contracts

Search for popular fungible token contract information on the NEAR blockchain, with a grep-like search. Use this tool to search for popular fungible token contract information. This tool works by 'grepping' through a list of contract information JSON objects. Useful for getting contract information about popular tokens like USDC native, USDT, WNEAR, and more.

account_export_account

Export an account from the local keystore to a file.

account_sign_data

Cryptographically sign a piece of data with a local account's private key, then encode the result with the specified encoding. Outputs the curve, encoded signature, and encoding used.

account_verify_signature

Cryptographically verify a signed piece of data against some NEAR account's public key.

account_create_implicit_account

Create an implicit account on the NEAR blockchain. An implicit account is a new random keypair that is not associated with an account ID. Instead the account ID is derived from the public key of the keypair (a 64-character lowercase hexadecimal representation of the public key). This implicit account id can be used just as a regular account id, but remember *it is not* an official account id with a .near or .testnet suffix. Creating implicit accounts is useful for adding new access keys to an existing account.

account_create_account

Create a new NEAR account with a new account ID. The initial balance of this account will be funded by the account that is calling this tool. This account will be created with a random public key. If no account ID is provided, a random one will be generated. Ensure that mainnet accounts are created with a .near suffix, and testnet accounts are created with a .testnet suffix.

account_delete_account

Delete an account from the NEAR blockchain. This will also remove the account from the local keystore and any associated keypair.

account_list_access_keys

List all access keys for an given account.

account_add_access_key

Add an access key to an account. This will allow the account to interact with the contract.

account_delete_access_keys

Delete an access key from an account based on it's public key.

tokens_send_near

Send NEAR tokens to an account (in NEAR). The signer account is the sender of the tokens, and the receiver account is the recipient of the tokens. Remember mainnet accounts are created with a .near suffix, and testnet accounts are created with a .testnet suffix. The user is sending tokens as the signer account. Please ensure that the sender and receiver accounts are in the same network.

tokens_send_ft

Send Fungible Tokens (FT) like USDC native, USDT, WNEAR, etc. based on the NEP-141 and NEP-148 standards to an account. The signer account is the sender of the tokens, and the receiver account is the recipient of the tokens. Ensure the contract account id exists and is in the same network as the signer and receiver accounts.

contract_view_functions

View available functions on a NEAR smart contract.

contract_get_function_args

Get the arguments of a function call by parsing the contract's ABI or by using the nearblocks.io API (as a fallback). This function API checks recent execution results of the contract's method being queried to determine the likely arguments of the function call. Warning: This tool is experimental and is not garunteed to get the correct arguments.

contract_call_raw_function_as_read_only

Call a function of a contract as a read-only call. This is equivalent to saying we are calling a view method of the contract.

contract_call_raw_function

Call a function of a contract as a raw function call action. This tool creates a function call as a transaction which costs gas and NEAR.

README

<div align="center"> <img src="assets/near-mcp.svg" alt="NEAR MCP Logo" width="200" /> </div>

npm version Telegram

NEAR MCP

本项目是一个与 模型上下文协议 (MCP) 兼容的服务器,用于与 NEAR 区块链 进行交互。此工具为 LLM 和 AI 代理提供了一种安全访问和交互 NEAR 账户和区块链功能的方式。

安装

near-mcp 的主要使用方式是与 MCP 兼容的服务一起使用。

添加到 claude 代码 cli:

claude mcp add near-mcp npx @nearai/near-mcp@latest run

通过 JSON 配置添加:

{
  "mcpServers": {
    "near-mcp": {
      "command": "npx",
      "args": ["-y", "@nearai/near-mcp@latest", "run"],
      "env": {}
    }
  }
}

添加到 goose

┌   goose-configure
│
◇  您想配置什么?
│  添加扩展
│
◇  您想添加什么类型的扩展?
│  命令行扩展
│
◇  您想将此扩展命名为什么?
│  near-mcp
│
◇  应该运行什么命令?
│  npx @nearai/near-mcp@latest run
│
◇  请为此工具设置超时时间(秒):
│  60
│
◇  您想添加环境变量吗?
│  否
│
└  已添加 near-mcp 扩展

或者您可以全局安装它并直接使用。

# 全局安装
npm install -g @nearai/near-mcp@latest

# 或者直接使用 npx
npx @nearai/near-mcp@latest run

可用工具

有关可用工具和参数的列表,请参见 TOOLS.md

与 AI 模型集成

此工具旨在与支持 模型上下文协议 的 AI 模型一起使用。它使 AI 助手能够:

  1. 代表用户管理 NEAR 账户
  2. 检查账户余额和状态
  3. 签名并发送交易
  4. 创建新账户并管理访问密钥
  5. 检查和执行智能合约

安全注意事项

  • 此 MCP 旨在本地运行。账户私钥存储在运行 MCP 服务器的本地未加密的密钥库中。
  • 底层模型不应访问他们正在交互的账户的私钥,但有一个例外import_account 工具允许模型从私钥导入账户。 这需要用户向模型提供私钥。

贡献

我们欢迎对 NEAR MCP 服务器的贡献! 请参阅 CONTRIBUTING.md 文件以获取更多信息。

报告问题

如果您发现错误或有功能请求,请在 GitHub 存储库上打开一个 issue。

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选