Logo de NEAR MCP

NEAR MCP

Organização
nearai

An MCP server for the NEAR blockchain

Publicado pornearai
Repositórionear-mcp
IdiomaTypeScript
Forks
15
Estrelas
32
Ferramentas disponíveis
23
Tipo de transportestdio
Categorias
LicençaMIT
Links
  • Conecte ferramentas a fluxos de trabalho de IA

    NEAR MCP disponibiliza recursos MCP que podem ser usados por clientes e agentes de IA compatíveis.

  • 23 ferramentas disponíveis

    Confira abaixo as ações que podem ser chamadas, incluindo nomes e descrições quando fornecidos pelo servidor.

  • Configuração pronta para copiar

    Use os exemplos de instalação para configurar este servidor no seu cliente MCP preferido.

  • Indicadores da comunidade de código aberto

    32 estrelas e 15 forks no repositório vinculado.

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.

Instalação

TypingMind
Pré-requisitos:

Node.js 18+

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

Ferramentas disponíveis

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

Use o MCP de NEAR MCP com vários modelos de IA

O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho. Assim, após conectar NEAR MCP, é possível usá-lo com diferentes modelos de IA no TypingMind, em vez de configurá-lo separadamente para cada modelo. Este MCP é executado localmente no seu dispositivo por meio do conector MCP do TypingMind.

Guia de configuração para usar o conector local

Use esta opção quando o servidor MCP precisar acessar arquivos locais, aplicativos ou recursos privados no seu computador.

1

Abra as configurações de MCP

No TypingMind, vá até Configurações, Configurações avançadas e depois Model Context Protocol e selecione Configurar conector.

  1. Abra o TypingMind no navegador.
  2. Clique no ícone de Ajustes.
  3. Acesse Configurações avançadas.
  4. Abra a seção Model Context Protocol.
  5. Clique em Configurar conector e selecione Este dispositivo.
Tela de configuração do conector MCP do TypingMind com a opção Este dispositivo selecionada
2

Execute o comando do conector

Selecione Este dispositivo, copie o comando do TypingMind e execute-o no Terminal. Mantenha o processo em execução enquanto usa o MCP.

  1. Copie o comando de configuração exibido pelo TypingMind.
  2. Abra o Terminal no macOS ou o Windows Terminal no Windows.
  3. Cole e execute o comando.
  4. Autorize a instalação do pacote se o Terminal pedir confirmação para continuar.
  5. Mantenha o processo em execução na janela do Terminal enquanto usa as ferramentas MCP.
3

Adicione NEAR MCP como servidor

Quando o status do conector for Pronto, clique em Editar e cole a configuração do servidor MCP.

  1. Aguarde até que o status do conector mostre Pronto.
  2. Clique em Editar.
  3. Cole a configuração do servidor MCP de NEAR MCP.
  4. Salve a lista de servidores.
  5. Atualize para confirmar se o conector ainda está pronto para uso.
Configurações de MCP do TypingMind mostrando um servidor ativo e o botão Editar
{
  "mcpServers": {
    "near-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@nearai/near-mcp@latest"
      ]
    }
  }
}
4

Use a conexão com diferentes modelos

Salve a lista de servidores, abra Plugins, ative as ferramentas MCP de NEAR MCP, selecione qualquer modelo de IA compatível no TypingMind e use as ferramentas no chat ou atribua-as a um agente de IA.

  1. Abra a página Plugins no TypingMind.
  2. Ative as ferramentas MCP de NEAR MCP.
  3. Inicie um chat e escolha o modelo de IA que deseja usar.
  4. Use as ferramentas MCP no chat ou atribua-as a um agente de IA.
  5. Mude para outro modelo de IA sempre que necessário, sem reconectar o MCP.
Chat do TypingMind usando ferramentas MCP ativadas com um modelo de IA selecionado
Pode usar NEAR MCP para me ajudar nesta tarefa?
NEAR MCP
Claro. Já li.
Veja o que encontrei usando NEAR MCP.

Perguntas frequentes

Para que serve o servidor MCP NEAR MCP?

NEAR MCP é um servidor MCP que permite que aplicativos de IA compatíveis se conectem a ferramentas externas e informações de contexto. No TypingMind, basta adicionar esse servidor MCP uma vez para disponibilizar suas ferramentas no seu espaço de trabalho com IA.

Posso usar o MCP NEAR MCP com vários modelos de IA no TypingMind?

Sim. O TypingMind conecta as ferramentas MCP no nível do espaço de trabalho, permitindo usar NEAR MCP com diferentes modelos de IA, como Claude, ChatGPT, Gemini ou outros modelos configurados no TypingMind, sem configurar o servidor MCP separadamente para cada modelo.

Por que usar o MCP NEAR MCP com o TypingMind?

O TypingMind é uma das melhores interfaces de chat com LLMs porque reúne vários modelos de IA, prompts, plugins, agentes de IA, chaves de API e ferramentas MCP em um só espaço de trabalho. Com NEAR MCP conectado, é possível usar suas ferramentas MCP nos seus modelos preferidos e manter seu fluxo de trabalho de chat organizado no TypingMind.

Como conecto o MCP NEAR MCP ao TypingMind?

NEAR MCP funciona por meio do conector MCP local do TypingMind. Essa é a melhor opção quando o servidor MCP precisa acessar arquivos locais, apps de desktop, ferramentas de linha de comando ou recursos privados no seu computador.

Quais ferramentas o MCP NEAR MCP oferece no TypingMind?

NEAR MCP disponibiliza 23 ferramentas MCP que podem ser ativadas na página Plugins do TypingMind e usadas no chat ou atribuídas a agentes de IA.

Preciso compartilhar minhas chaves de API com o TypingMind para usar o MCP NEAR MCP?

Não. O TypingMind prioriza o uso local e permite manter seus provedores de modelos, chaves de API, prompts e configuração MCP sob seu controle. Se NEAR MCP exigir autenticação, adicione os cabeçalhos, as configurações OAuth ou a configuração local exigidos por esse servidor MCP ao criar a conexão.

Servidores MCP relacionados

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇