open-index/open-npm huggingface dataset:
npm package: @near-mcp/aitp-mcp-server
Description: NearAI MCP server
Latest version: 0.1.34

# AITP MCP Server

NearAI MCP server is a middleware component that interfaces with the AITP (AI Tool Provider) API to dynamically build and manage available AI tools and prompts.

## Overview

This server connects to the AITP API and automatically discovers available tools and prompts by consuming the `/hello` endpoint. This allows for dynamic tool registration and prompt management without hardcoding capabilities.

## Features

- Automatic tool discovery through AITP API URL
- Dynamic prompt registration
- Seamless integration with AITP services
- Real-time tool availability updates

## How It Works

1. The MCP server initializes and establishes a connection to the AITP API
2. It calls the `/hello` endpoint to retrieve available tools and prompts
3. The server processes the response and builds an internal registry of:
   - Available AI tools
   - Supported prompts
   - Tool capabilities and requirements

## Configuration ( SSE Transport )
To configure the connection to the AITP API, make sure to copy .env_example to .env and set the correct values.

## Configuration ( Claude Desktop )

To configure the connection to the AITP API, ensure you have the following environment variables set:
- `AITP_URL`: The base URL of your AITP API

```json{
  "mcpServers": {
    "aitp-server": {
      "command": "npx",
      "args": [
        "-y",
        "@near-mcp/aitp-mcp-server"
      ],
      "env": {
        "AITP_URL": "{your-aitp-url}",
        "NEAR_NETWORK_ID": "testnet",
        "NEAR_NODE_URL": "https://test.rpc.fastnear.com",
        "NEAR_WALLET_URL": "https://testnet.mynearwallet.com/",
        "NEAR_HELPER_URL": "https://helper.testnet.near.org",
        "NEAR_EXPLORER_URL": "https://testnet.nearblocks.io",
        "NEAR_WALLET_ID": "{your-near-wallet-id}.testnet",
        "NEAR_KEY_STORE": "testnet",
        "NEAR_USDC_CONTRACT": "usdc.fakes.testnet",
        "NEAR_WALLET_PRIVATE_KEY": "{your-near-wallet-private-key}",
        "LOG_DEBUG": "true"
      }
    }
  }
}
```
## Usage ( SSE Transport )
To build and start the server, run the following command:

```bash
npm run dev
```

You will see the server running in PORT 3003 and the logs in the terminal.

## Usage ( Claude Desktop )

After configuring the environment variables, copy this to your Claude config file and close and reopen the Claude app to load the server.

## Dependencies

[List your main dependencies]
npm package: @near-snap/sdk
Description: ```ts async function main() {     const account = await NearSnapAccount.connect('mainnet')     const result = await account.executeTransaction({         receiverId: "herewallet.near",         actions: [{ type: 'Transfer', params: { deposit: '1' }}]     })
Latest version: 0.6.0

# Near Snap SDK

```ts
async function main() {
    const account = await NearSnapAccount.connect('mainnet')
    const result = await account.executeTransaction({
        receiverId: "herewallet.near",
        actions: [{ type: 'Transfer', params: { deposit: '1' }}]
    })

    console.log(result[0].transaction_outcome.id)
}
```

## Fully decomposable

It is possible to override the library at any level, this allows you to implement your own logic and cover it with tests

```ts
const rpc = new NearSnapProvider() // low-level, communicate with window.ethereum
const snap = new NearSnap('snap_id', rpc) // communicate with snap api
NearSnapAccount.connect('mainnet', snap) // communicate with snap api and near rpc
```


## Сompatible with near-api-js 

NearSnapAccount simply extends the default near-api-js account class. This allows you not to change your logic to support the Metamask wallet. For example:
```ts
const result = await account.sendMoney("friend.near", "100000")
```

## Сompatible with @near-wallet-selector
You can use the near-wallet-selector format for describing transactions. For example:

```ts
const result = await account.executeTransactions([{
    receiverId: "herewallet.near",
    actions: [{ type: 'Transfer', params: { deposit: '1' }}]
}])
```


## Support free transaction

HERE Wallet provides API for free delegated transactions. This is a very useful feature for new NEAR Protocol users, it allows you to sign a transaction with a completely empty account:

```ts
// if account.delegatedProvider.isCanDelegate return false this method throw DelegateNotAllowed
await account.executeDelegate({
    actions: [{ type: 'Transfer', params: { deposit: '1' }}],
    receiverId: "herewallet.near",
})

// Also executeTransaction method by default firstly try to use executeDelegate
await account.executeTransaction({
    disableDelegate: false, // default: false
    receiverId: "herewallet.near",
    actions: [{ type: 'Transfer', params: { deposit: '1' }}]
})
```