Basic information
About NEAR MCP Server
Interact with the NEAR blockchain via NEAR MCP — fast NEAR RPC access and developer API calls to build and test NEAR dApps.
NEAR MCP is a MCP server in the Developer Tools category listed in the AddMCP.net directory, published by nearai. It exposes 23 tools, including system_list_local_keypairs, system_import_account, system_remove_local_account, account_view_account_summary and more. Supported transport: stdio. Runtime: TypeScript. License: MIT. The repository has 31 GitHub stars. Source code is hosted on github.com. Related topics: developer-tools, official.
Setup
{
"mcpServers": {
"near-mcp": {
"command": "npx",
"args": [
"-y",
"@nearai/near-mcp@latest",
"run"
],
"env": []
}
}
}
{
"mcpServers": {
"near-mcp": {
"command": "npx",
"args": [
"-y",
"@nearai/near-mcp@latest",
"run"
],
"env": []
}
}
}
{
"servers": {
"near-mcp": {
"command": "npx",
"args": [
"-y",
"@nearai/near-mcp@latest",
"run"
],
"env": []
}
}
}
NEAR MCP config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"near-mcp": {
"command": "npx",
"args": [
"-y",
"@nearai/near-mcp@latest",
"run"
],
"env": []
}
}
}
NEAR MCP tools
- system_list_local_keypairs — List all NEAR 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 with 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 a public RPC endpoint to get this information.
- search_near_fungible_tokens — Search for fungible token contract information for the NEAR blockchain, based on search terms. This tool works by 'grepping' through a list of contract information JSON objects. Be careful with this tool, it can return a lot of results. Ensure that your query is specific.
- account_export_account — Export a NEAR 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 a 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 can be used to grant full access to an account, or allow the specified account to have specific function call access to a 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.
- ref_finance_get_pools — Search for liquidity pools on the Ref Finance exchange contract based on two tokens. Prioritize pools with higher liquidity and better rates for the user.
- ref_finance_get_swap_estimate — Get a swap estimate from the Ref Finance exchange contract based on two tokens and a pool id.
- ref_finance_execute_swap — Execute a swap on Ref Finance based on two tokens and a pool id. Prioritize pools with higher liquidity and better rates for the user.
Overview
What is NEAR MCP?
NEAR MCP is a Model Context Protocol compatible server for interacting with the NEAR blockchain. It provides a way for LLMs and AI agents to securely access and interact with NEAR accounts and blockchain functionality.
How to use NEAR MCP?
Install and add NEAR MCP to an MCP-compatible client such as Claude Code, Goose, or Claude Desktop. For Claude Code, run claude mcp add near-mcp npx @nearai/near-mcp@latest run. For Claude Desktop, add the npx -y @nearai/near-mcp@latest run command with optional environment variables. Alternatively, install globally with npm install -g @nearai/near-mcp@latest and run it directly.
Key features of NEAR MCP
- Manage NEAR accounts on behalf of users
- Check account balances and status
- Sign and send transactions on the NEAR blockchain
- Create new accounts and manage access keys
- Inspect and execute smart contracts
Use cases of NEAR MCP
- AI assistants that manage NEAR accounts and transactions for users
- Automated smart contract inspection and execution via LLMs
- Balance and status checking for NEAR accounts through natural language
Frequently asked questions
1 What tools does NEAR MCP provide?
The server provides tools for managing NEAR accounts, checking balances, signing and sending transactions, creating accounts, managing access keys, and inspecting/executing smart contracts. A full list is available in the project’s TOOLS.md file.
2 How are private keys secured?
Account private keys are stored in a local unencrypted keystore where the MCP server is running. The import_account tool allows the model to import an account from a private key, which requires the user to provide the private key to the model.
3 What runtime or dependencies are required?
NEAR MCP requires Node.js and npm to run. It is distributed as an npm package and can be used via npx or installed globally. It is designed to run locally on the user’s machine.
4 Can NEAR MCP be deployed remotely?
Yes, NEAR MCP can be deployed remotely on Phala Cloud. Instructions for this deployment method are provided in the project’s tee.md file.
5 Which AI clients are supported?
NEAR MCP works with any client that supports the Model Context Protocol, including Claude Code, Claude Desktop, and Goose.
Comments
No comments yet
Be the first to share feedback about this listing. Sign in to leave a comment.
Sign In