@ton/mcp 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +48 -1
- package/dist/cli.js +46704 -20296
- package/dist/index.cjs +29591 -3265
- package/dist/index.js +29560 -3235
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ A Model Context Protocol (MCP) server for TON blockchain wallet operations. Buil
|
|
|
10
10
|
- **NFTs**: List, inspect, and transfer NFTs
|
|
11
11
|
- **DNS**: Resolve `.ton` domains and reverse-lookup addresses
|
|
12
12
|
- **Known Jettons**: Built-in directory of popular tokens
|
|
13
|
-
- **
|
|
13
|
+
- **Multiple Transports**: Stdio (default), HTTP server, and serverless modes
|
|
14
14
|
|
|
15
15
|
## Quick Start
|
|
16
16
|
|
|
@@ -182,6 +182,53 @@ Reverse-resolve a TON wallet address to its `.ton` domain.
|
|
|
182
182
|
#### `get_known_jettons`
|
|
183
183
|
Get a list of known/popular Jettons on TON with their addresses and metadata. Useful for looking up token addresses for swaps or transfers.
|
|
184
184
|
|
|
185
|
+
## Serverless Deployment
|
|
186
|
+
|
|
187
|
+
The package exports a `@ton/mcp/serverless` entry point for deploying as a serverless function (AWS Lambda, Vercel, Cloudflare Workers, etc.). Credentials are passed via request headers instead of environment variables.
|
|
188
|
+
|
|
189
|
+
### Headers
|
|
190
|
+
|
|
191
|
+
| Header | Description |
|
|
192
|
+
|-----------------|----------------------------------------------------------|
|
|
193
|
+
| `MNEMONIC` | 24-word mnemonic phrase |
|
|
194
|
+
| `PRIVATE_KEY` | Hex-encoded private key (takes priority over `MNEMONIC`) |
|
|
195
|
+
| `NETWORK` | `mainnet` (default) or `testnet` |
|
|
196
|
+
| `TONCENTER_KEY` | Optional TonCenter API key for higher rate limits |
|
|
197
|
+
|
|
198
|
+
### AWS Lambda
|
|
199
|
+
|
|
200
|
+
```typescript
|
|
201
|
+
import { createServerlessHandler } from '@ton/mcp/serverless';
|
|
202
|
+
|
|
203
|
+
export const handler = createServerlessHandler();
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Vercel
|
|
207
|
+
|
|
208
|
+
```typescript
|
|
209
|
+
import { createServerlessHandler } from '@ton/mcp/serverless';
|
|
210
|
+
|
|
211
|
+
export default createServerlessHandler();
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Custom Integration
|
|
215
|
+
|
|
216
|
+
```typescript
|
|
217
|
+
import { createServerlessHandler } from '@ton/mcp/serverless';
|
|
218
|
+
|
|
219
|
+
const handle = createServerlessHandler();
|
|
220
|
+
|
|
221
|
+
const response = await handle({
|
|
222
|
+
method: 'POST',
|
|
223
|
+
url: '/mcp',
|
|
224
|
+
headers: {
|
|
225
|
+
'MNEMONIC': 'word1 word2 word3 ...',
|
|
226
|
+
'NETWORK': 'mainnet',
|
|
227
|
+
},
|
|
228
|
+
body: mcpRequestBody,
|
|
229
|
+
});
|
|
230
|
+
```
|
|
231
|
+
|
|
185
232
|
## Development
|
|
186
233
|
|
|
187
234
|
```bash
|