Skip to directory

About NEAR MCP

A local MCP server for NEAR account and blockchain workflows, including account inspection, token transfers, contract calls, key management, and Ref Finance swaps.

What you can use it for

  • Check public account summaries and inspect NEAR tokens/contracts.
  • Manage local accounts and keys.
  • Send NEAR or tokens, invoke contract calls, create/delete accounts, or perform Ref Finance swaps only with explicit user approval.
Connection and setup
Hosting
Local
Transport
stdio
Endpoint
Local process; no hosted endpoint documented
Authentication
Local NEAR account keystore. The README warns that keys are stored unencrypted; PRIVATE_KEY may also be used for setup, but should never be shared with an AI assistant or committed.

Requirements

  • Node.js/npm
  • NEAR account for signed/write operations
  • Local key storage; testnet recommended for setup verification

Setup steps

  1. Start without account credentials to review the public read-only tools if supported by this version.
  2. For write operations, configure a dedicated wallet/keystore locally; never paste a private key into chat.
  3. Run npx -y @nearai/near-mcp@latest run over stdio.
  4. Use account_view_account_summary as harmless initial verification. Do not execute transactions, swaps, key imports, or account changes without explicit user approval.
Tools 23

All 23 current tool names, descriptions and argument names are transcribed from the official TOOLS.md. Includes private-key handling, account/key administration, signing, account deletion, transfers, contract transactions and swaps; inspect each operation and confirm consequential actions.

  • system_list_local_keypairs

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

    01
  • 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.

    02
  • 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.

    03
  • account_view_account_summary

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

    04
  • 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.

    05
  • account_export_account

    Export a NEAR account from the local keystore to a file.

    06
  • 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.

    07
  • account_verify_signature

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

    08
  • 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.

    09
  • 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.

    10
  • account_delete_account

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

    11
  • account_list_access_keys

    List all access keys for an given account.

    12
  • 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.

    13
  • account_delete_access_keys

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

    14
  • 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.

    15
  • 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.

    16
  • contract_view_functions

    View available functions on a NEAR smart contract.

    17
  • 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.

    18
  • 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.

    19
  • 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.

    20
  • 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.

    21
  • ref_finance_get_swap_estimate

    Get a swap estimate from the Ref Finance exchange contract based on two tokens and a pool id.

    22
  • 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.

    23
Limitations and notes
  • README says the local keystore is unencrypted.
  • import_account can accept private key content; never expose private keys to the AI/chat.
  • Many tools are financially consequential or destructive.
  • Repository release shown in listing is old; check current project activity before production use.
Original sources
  • official repository

    README documents package, local stdio setup, supported clients, MIT license, account/key workflow and warns keys are stored in an unencrypted local keystore.

  • official tool reference

    Exact names, descriptions and JSON argument schemas parsed from the current maintainer tool catalog.

Documentation checked 2026-10-28T00:00:00Z. Connection has not been runtime tested.