Logotipo de NEAR MCP

NEAR MCP

Organización
nearai

An MCP server for the NEAR blockchain

Editornearai
Repositorionear-mcp
IdiomaTypeScript
Forks
15
Estrellas
32
Herramientas disponibles
23
Tipo de transportestdio
Categorías
LicenciaMIT
Enlaces
  • Conecta herramientas a flujos de trabajo con IA

    NEAR MCP ofrece funciones MCP que pueden usar los clientes y agentes de IA compatibles.

  • 23 herramientas disponibles

    Explora a continuación las acciones que se pueden invocar, con sus nombres y descripciones cuando el servidor los proporcione.

  • Configuración lista para copiar

    Usa los ejemplos de instalación para configurar este servidor en tu cliente MCP preferido.

  • Indicadores de interés en el código abierto

    32 estrellas y 15 forks en el repositorio enlazado.

npm version Telegram

NEAR MCP

This project is a Model Context Protocol (MCP) compatible server for interacting with the NEAR blockchain. This tool provides a way for LLMs and AI agents to securely access and interact with NEAR accounts and blockchain functionality.

Quickstart

Here is how to get started with the near-mcp server quickly with the claude code cli

npm install -g @anthropic-ai/claude-code
claude mcp add near-mcp npx @nearai/near-mcp@latest run
claude

Or deploy the MCP server remotely on Phala Cloud, check the instructions here

Installing

near-mcp is meant to be used is with an MCP compatible client. Learn more in the MCP docs

Adding to the claude code cli:

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

Adding to claude desktop via JSON config:

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

Adding to goose

┌   goose-configure
│
◇  What would you like to configure?
│  Add Extension
│
◇  What type of extension would you like to add?
│  Command-line Extension
│
◇  What would you like to call this extension?
│  near-mcp
│
◇  What command should be run?
│  npx @nearai/near-mcp@latest run
│
◇  Please set the timeout for this tool (in secs):
│  60
│
◇  Would you like to add environment variables?
│  No
│
└  Added near-mcp extension

Or you can install it globally and use it directly.

bash
# Install globally
npm install -g @nearai/near-mcp@latest

# Or use directly with npx
npx @nearai/near-mcp@latest run

Available Tools

see TOOLS.md for a list of available tools and arguments.

Integration with AI Models

This tool is designed to be used with AI models that support the Model Context Protocol. It enables AI assistants to:

  1. Manage NEAR accounts on behalf of users
  2. Check account balances and status
  3. Sign and send transactions
  4. Create new accounts and manage access keys
  5. Inspect and execution smart contracts

Security Considerations

  • This MCP is meant to be run locally. Account private keys are stored in a local unencrypted keystore where the MCP server is running.
  • The underlying models should not have access to see the private keys of the accounts they are interacting with with one exception. The import_account tool allows the model to import an account from a private key. This requires the user to provide the private key to the model.

Contributing

We welcome contributions to the NEAR MCP server! Please see the CONTRIBUTING.md file for more information.

Reporting Issues

If you find a bug or have a feature request, please open an issue on the GitHub repository.

Instalación

TypingMind
Requisitos:

Node.js 18+

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

Herramientas disponibles

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

Usa el MCP de NEAR MCP con varios modelos de IA

TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que, una vez conectado NEAR MCP, puedes usarlo con distintos modelos de IA en TypingMind sin tener que configurarlo por separado para cada modelo. Esta integración MCP se ejecuta localmente en tu dispositivo a través del conector MCP de TypingMind.

Guía de configuración para usar el conector local

Usa esta opción si el servidor MCP necesita acceder a archivos locales, aplicaciones o recursos privados de tu ordenador.

1

Abre los ajustes de MCP

En TypingMind, ve a Ajustes, luego a Ajustes avanzados y a Model Context Protocol, y elige Configurar conector.

  1. Abre TypingMind en tu navegador.
  2. Haz clic en el icono de Ajustes.
  3. Ve a Ajustes avanzados.
  4. Abre la sección Model Context Protocol.
  5. Haz clic en Configurar conector y elige Este dispositivo.
Pantalla de configuración del conector MCP de TypingMind con «Este dispositivo» seleccionado
2

Ejecuta el comando del conector

Elige Este dispositivo, copia el comando de TypingMind y ejecútalo en Terminal. Mantén el proceso en ejecución mientras uses MCP.

  1. Copia el comando de configuración que muestra TypingMind.
  2. Abre Terminal en macOS o Windows Terminal en Windows.
  3. Pega y ejecuta el comando.
  4. Acepta la instalación del paquete si Terminal te pide confirmación para continuar.
  5. Mantén el proceso en ejecución en la ventana de Terminal mientras uses las herramientas MCP.
3

Añade NEAR MCP como servidor

Cuando el estado del conector sea «Listo», haz clic en «Edita servidores» y pega la configuración del servidor MCP.

  1. Espera hasta que el estado del conector indique «Listo».
  2. Haz clic en Edita servidores.
  3. Pega la configuración del servidor MCP de NEAR MCP.
  4. Guarda la lista de servidores.
  5. Actualiza para comprobar que el conector sigue listo.
Ajustes de MCP de TypingMind con un servidor activo y el botón «Edita servidores»
{
  "mcpServers": {
    "near-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@nearai/near-mcp@latest"
      ]
    }
  }
}
4

Úsala con distintos modelos

Guarda la lista de servidores, abre Plugins, activa las herramientas MCP de NEAR MCP y selecciona cualquier modelo de IA compatible en TypingMind para usar las herramientas en el chat o asignárselas a un agente de IA.

  1. Abre la página Plugins en TypingMind.
  2. Activa las herramientas MCP de NEAR MCP.
  3. Inicia un chat y elige el modelo de IA que quieras usar.
  4. Usa las herramientas MCP en el chat o asígnalas a un agente de IA.
  5. Cambia a otro modelo de IA cuando lo necesites sin volver a conectar MCP.
Chat de TypingMind que usa herramientas MCP activadas con un modelo de IA seleccionado
¿Puedes usar NEAR MCP para ayudarme con esta tarea?
NEAR MCP
Claro. Lo he leído.
Esto he encontrado usando NEAR MCP.

Preguntas frecuentes

¿Para qué sirve el servidor MCP NEAR MCP?

NEAR MCP es un servidor MCP que permite a los clientes de IA compatibles conectarse a herramientas y contexto externos. En TypingMind, basta con añadir este servidor MCP una vez para que sus herramientas estén disponibles en tu espacio de trabajo de IA.

¿Puedo usar el servidor MCP NEAR MCP con varios modelos de IA en TypingMind?

Sí. TypingMind conecta las herramientas MCP a nivel del espacio de trabajo, por lo que puedes usar NEAR MCP con distintos modelos de IA, como Claude, ChatGPT, Gemini u otros que hayas configurado en TypingMind, sin configurar el servidor MCP por separado para cada modelo.

¿Por qué usar el conector MCP de NEAR MCP con TypingMind?

TypingMind es una de las mejores interfaces de chat con LLM porque reúne varios modelos de IA, prompts, plugins, agentes de IA, claves de API y herramientas MCP en un solo espacio de trabajo. Con NEAR MCP conectado, puedes usar sus herramientas MCP con tus modelos preferidos y mantener organizado tu flujo de trabajo de chat en TypingMind.

¿Cómo conecto el servidor MCP NEAR MCP a TypingMind?

NEAR MCP funciona a través del conector MCP local de TypingMind. Es la mejor opción cuando el servidor MCP necesita acceder a archivos locales, aplicaciones de escritorio, herramientas de línea de comandos o recursos privados de tu ordenador.

¿Qué herramientas ofrece el servidor MCP NEAR MCP en TypingMind?

NEAR MCP ofrece 23 herramientas MCP que puedes activar desde la página Plugins de TypingMind y usar en el chat o asignar a agentes de IA.

¿Tengo que compartir mis claves de API con TypingMind para usar el servidor MCP NEAR MCP?

No. TypingMind prioriza el funcionamiento local y te permite mantener el control de tus proveedores de modelos, claves de API, prompts y configuración MCP. Si NEAR MCP requiere autenticación, añade las cabeceras, los ajustes de OAuth o la configuración local necesarios para ese servidor MCP al crear la conexión.

Servidores MCP relacionados

Ver todos

Crea ya tu propio espacio de trabajo IA

Suscríbete a nuestro boletín para recibir avisos sobre nuevas funciones y próximos sorteos 👇