@ramestta/agent-mcp-server 0.2.0
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 +55 -0
- package/package.json +41 -0
- package/server.js +85 -0
- package/server.json +40 -0
- package/smithery.yaml +37 -0
package/README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# @ramestta/agent-mcp-server
|
|
2
|
+
|
|
3
|
+
**Give your AI a wallet it can't abuse.** An MCP server that exposes a booted
|
|
4
|
+
[Ramestta](https://agents.ramestta.com) AI agent's on-chain capabilities as tools —
|
|
5
|
+
so Claude, Cursor, or any MCP client can pay, schedule on-chain work, and message other
|
|
6
|
+
agents, every action bounded by the agent's **on-chain spend limits**.
|
|
7
|
+
|
|
8
|
+
## Tools
|
|
9
|
+
|
|
10
|
+
| Tool | What it does |
|
|
11
|
+
|---|---|
|
|
12
|
+
| `ramestta_agent_info` | The agent's `.rama` name, wallet address, and RAMA balance |
|
|
13
|
+
| `ramestta_remaining_quota` | Sponsored (gas-free) transactions left this month |
|
|
14
|
+
| `ramestta_send_payment` | Send RAMA to an address or `.rama` name — respects on-chain spend limits |
|
|
15
|
+
| `ramestta_schedule_task` | Schedule a recurring on-chain call, run by the keeper market (no server) |
|
|
16
|
+
| `ramestta_list_tasks` | List the agent's scheduled task ids |
|
|
17
|
+
| `ramestta_send_message` | Send an end-to-end-encrypted message to another agent by `.rama` name |
|
|
18
|
+
|
|
19
|
+
## Setup
|
|
20
|
+
|
|
21
|
+
First [boot an agent](https://agents.ramestta.com) to get a `.rama` name and its controller
|
|
22
|
+
key. Then add the server to your MCP client.
|
|
23
|
+
|
|
24
|
+
**Claude Desktop** (`claude_desktop_config.json`):
|
|
25
|
+
|
|
26
|
+
```json
|
|
27
|
+
{
|
|
28
|
+
"mcpServers": {
|
|
29
|
+
"ramestta": {
|
|
30
|
+
"command": "npx",
|
|
31
|
+
"args": ["-y", "@ramestta/agent-mcp-server"],
|
|
32
|
+
"env": {
|
|
33
|
+
"AGENT_KEY": "0xYOUR_CONTROLLER_KEY",
|
|
34
|
+
"AGENT_NAME": "yieldhunter",
|
|
35
|
+
"RAMESTTA_NETWORK": "testnet"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
| Env var | Required | Notes |
|
|
43
|
+
|---|---|---|
|
|
44
|
+
| `AGENT_KEY` | ✅ | Controller private key. Used locally to sign; never sent anywhere but the RPC. |
|
|
45
|
+
| `AGENT_NAME` | ✅ | Your agent's `.rama` name without the suffix. |
|
|
46
|
+
| `RAMESTTA_NETWORK` | — | `mainnet` or `testnet` (default `testnet`). |
|
|
47
|
+
|
|
48
|
+
## Safety
|
|
49
|
+
|
|
50
|
+
Every value-moving tool goes through the agent's on-chain `AgentPermissions` layer —
|
|
51
|
+
per-tx / per-day / per-month spend caps, allow-lists, and a human approval inbox. The
|
|
52
|
+
controller can pause or revoke the agent at any time. Start on testnet with small amounts;
|
|
53
|
+
Ramestta mainnet is a guarded beta pending external audit.
|
|
54
|
+
|
|
55
|
+
Docs: **https://agents.ramestta.com** · Built on [@ramestta/agent-kit](https://www.npmjs.com/package/@ramestta/agent-kit)
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ramestta/agent-mcp-server",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "MCP server exposing a Ramestta AI agent's on-chain capabilities as tools",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"bin": {
|
|
7
|
+
"ramestta-agent-mcp": "server.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"server.js",
|
|
11
|
+
"README.md",
|
|
12
|
+
"server.json",
|
|
13
|
+
"smithery.yaml"
|
|
14
|
+
],
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@ramestta/agent-kit": "^0.2.0",
|
|
17
|
+
"ethers": "^6.13.0"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"ramestta",
|
|
21
|
+
"ai-agents",
|
|
22
|
+
"mcp",
|
|
23
|
+
"model-context-protocol",
|
|
24
|
+
"claude",
|
|
25
|
+
"evm",
|
|
26
|
+
"web3",
|
|
27
|
+
"blockchain",
|
|
28
|
+
"agent",
|
|
29
|
+
"wallet"
|
|
30
|
+
],
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/ramestta/agent-kit.git",
|
|
34
|
+
"directory": "mcp-server"
|
|
35
|
+
},
|
|
36
|
+
"homepage": "https://agents.ramestta.com",
|
|
37
|
+
"author": "Ramestta",
|
|
38
|
+
"publishConfig": {
|
|
39
|
+
"access": "public"
|
|
40
|
+
}
|
|
41
|
+
}
|
package/server.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Ramestta Agent OS — MCP server (stdio, JSON-RPC 2.0, newline-delimited).
|
|
4
|
+
*
|
|
5
|
+
* Exposes a booted agent's capabilities as MCP tools so any MCP client
|
|
6
|
+
* (Claude Desktop, Claude Code, etc.) can drive an on-chain agent:
|
|
7
|
+
* ramestta_agent_info, ramestta_remaining_quota, ramestta_send_payment,
|
|
8
|
+
* ramestta_schedule_task, ramestta_list_tasks, ramestta_send_message
|
|
9
|
+
*
|
|
10
|
+
* Config via env: AGENT_KEY, AGENT_NAME, RAMESTTA_NETWORK (default testnet).
|
|
11
|
+
* Every value-moving tool still passes the on-chain AgentPermissions layer.
|
|
12
|
+
*
|
|
13
|
+
* Register in an MCP client, e.g. Claude Code:
|
|
14
|
+
* claude mcp add ramestta -- node /path/to/mcp-server/server.js
|
|
15
|
+
* (with AGENT_KEY / AGENT_NAME in the environment)
|
|
16
|
+
*/
|
|
17
|
+
const { Agent } = require("@ramestta/agent-kit");
|
|
18
|
+
const { Wallet } = require("ethers");
|
|
19
|
+
|
|
20
|
+
const TOOLS = [
|
|
21
|
+
{ name: "ramestta_agent_info", description: "Get the agent's .rama name, wallet address and RAMA balance.", schema: { type: "object", properties: {} } },
|
|
22
|
+
{ name: "ramestta_remaining_quota", description: "Sponsored (gas-free) transactions left this month.", schema: { type: "object", properties: {} } },
|
|
23
|
+
{ name: "ramestta_send_payment", description: "Send RAMA to an address or .rama agent name (respects on-chain spend limits).", schema: { type: "object", properties: { to: { type: "string" }, amountRama: { type: "string" } }, required: ["to", "amountRama"] } },
|
|
24
|
+
{ name: "ramestta_schedule_task", description: "Schedule a recurring on-chain call, executed by the keeper market (no server needed).", schema: { type: "object", properties: { targetAddress: { type: "string" }, callDataHex: { type: "string" }, everySeconds: { type: "number" } }, required: ["targetAddress", "callDataHex", "everySeconds"] } },
|
|
25
|
+
{ name: "ramestta_list_tasks", description: "List the agent's scheduled task ids.", schema: { type: "object", properties: {} } },
|
|
26
|
+
{ name: "ramestta_send_message", description: "Send an end-to-end encrypted message to another agent by .rama name.", schema: { type: "object", properties: { toName: { type: "string" }, message: { type: "string" } }, required: ["toName", "message"] } },
|
|
27
|
+
];
|
|
28
|
+
|
|
29
|
+
let agentPromise;
|
|
30
|
+
function getAgent() {
|
|
31
|
+
if (!agentPromise) {
|
|
32
|
+
const signer = new Wallet(process.env.AGENT_KEY);
|
|
33
|
+
agentPromise = Agent.connect(process.env.AGENT_NAME, signer, process.env.RAMESTTA_NETWORK || "testnet");
|
|
34
|
+
}
|
|
35
|
+
return agentPromise;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
async function callTool(name, args) {
|
|
39
|
+
const { ramesttaTools } = await import("@ramestta/agent-kit/langchain");
|
|
40
|
+
const agent = await getAgent();
|
|
41
|
+
const tools = await ramesttaTools(agent);
|
|
42
|
+
const tool = tools.find((t) => t.name === name);
|
|
43
|
+
if (!tool) throw new Error(`unknown tool ${name}`);
|
|
44
|
+
return tool.invoke(args || {});
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// ─── MCP JSON-RPC over stdio ────────────────────────────────────────────────
|
|
48
|
+
function send(msg) { process.stdout.write(JSON.stringify(msg) + "\n"); }
|
|
49
|
+
|
|
50
|
+
async function handle(req) {
|
|
51
|
+
const { id, method, params } = req;
|
|
52
|
+
try {
|
|
53
|
+
if (method === "initialize") {
|
|
54
|
+
return { jsonrpc: "2.0", id, result: { protocolVersion: "2024-11-05", capabilities: { tools: {} }, serverInfo: { name: "ramestta-agent-os", version: "0.2.0" } } };
|
|
55
|
+
}
|
|
56
|
+
if (method === "tools/list") {
|
|
57
|
+
return { jsonrpc: "2.0", id, result: { tools: TOOLS.map((t) => ({ name: t.name, description: t.description, inputSchema: t.schema })) } };
|
|
58
|
+
}
|
|
59
|
+
if (method === "tools/call") {
|
|
60
|
+
const out = await callTool(params.name, params.arguments);
|
|
61
|
+
return { jsonrpc: "2.0", id, result: { content: [{ type: "text", text: String(out) }] } };
|
|
62
|
+
}
|
|
63
|
+
if (method === "notifications/initialized" || method?.startsWith("notifications/")) return null;
|
|
64
|
+
return { jsonrpc: "2.0", id, error: { code: -32601, message: `method not found: ${method}` } };
|
|
65
|
+
} catch (e) {
|
|
66
|
+
return { jsonrpc: "2.0", id, error: { code: -32000, message: e.shortMessage || e.message } };
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
let buf = "";
|
|
71
|
+
process.stdin.on("data", async (chunk) => {
|
|
72
|
+
buf += chunk;
|
|
73
|
+
let nl;
|
|
74
|
+
while ((nl = buf.indexOf("\n")) >= 0) {
|
|
75
|
+
const line = buf.slice(0, nl).trim();
|
|
76
|
+
buf = buf.slice(nl + 1);
|
|
77
|
+
if (!line) continue;
|
|
78
|
+
let req;
|
|
79
|
+
try { req = JSON.parse(line); } catch { continue; }
|
|
80
|
+
const res = await handle(req);
|
|
81
|
+
if (res) send(res);
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
process.stderr.write(`ramestta MCP server ready (agent ${process.env.AGENT_NAME || "?"}.rama, ${process.env.RAMESTTA_NETWORK || "testnet"})\n`);
|
package/server.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://static.modelcontextprotocol.io/schemas/2025-07-09/server.schema.json",
|
|
3
|
+
"name": "io.github.ramestta/agent-mcp-server",
|
|
4
|
+
"description": "Give an AI model its own on-chain body on Ramestta: a .rama identity, a smart wallet with spend limits, sponsored gas, server-less scheduled execution, and end-to-end-encrypted agent-to-agent messaging.",
|
|
5
|
+
"repository": {
|
|
6
|
+
"url": "https://github.com/ramestta/agent-kit",
|
|
7
|
+
"source": "github",
|
|
8
|
+
"subfolder": "mcp-server"
|
|
9
|
+
},
|
|
10
|
+
"version": "0.2.0",
|
|
11
|
+
"websiteUrl": "https://agents.ramestta.com",
|
|
12
|
+
"packages": [
|
|
13
|
+
{
|
|
14
|
+
"registryType": "npm",
|
|
15
|
+
"registryBaseUrl": "https://registry.npmjs.org",
|
|
16
|
+
"identifier": "@ramestta/agent-mcp-server",
|
|
17
|
+
"version": "0.2.0",
|
|
18
|
+
"transport": { "type": "stdio" },
|
|
19
|
+
"environmentVariables": [
|
|
20
|
+
{
|
|
21
|
+
"name": "AGENT_KEY",
|
|
22
|
+
"description": "Controller private key (0x...) of your booted agent. Used locally to sign; never transmitted anywhere but the RPC.",
|
|
23
|
+
"isRequired": true,
|
|
24
|
+
"isSecret": true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"name": "AGENT_NAME",
|
|
28
|
+
"description": "Your booted agent's .rama name without the suffix (e.g. yieldhunter).",
|
|
29
|
+
"isRequired": true
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"name": "RAMESTTA_NETWORK",
|
|
33
|
+
"description": "mainnet | testnet",
|
|
34
|
+
"isRequired": false,
|
|
35
|
+
"default": "testnet"
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
}
|
package/smithery.yaml
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Smithery config — lists the Ramestta Agent MCP server so any MCP client
|
|
2
|
+
# (Claude Desktop, Cursor, etc.) can install and drive a Ramestta AI agent.
|
|
3
|
+
# https://smithery.ai/docs
|
|
4
|
+
startCommand:
|
|
5
|
+
type: stdio
|
|
6
|
+
configSchema:
|
|
7
|
+
type: object
|
|
8
|
+
required: ["agentKey", "agentName"]
|
|
9
|
+
properties:
|
|
10
|
+
agentKey:
|
|
11
|
+
type: string
|
|
12
|
+
title: Agent controller key
|
|
13
|
+
description: "The controller private key (0x...) of your booted agent. Kept locally; never sent anywhere but the RPC you sign with."
|
|
14
|
+
agentName:
|
|
15
|
+
type: string
|
|
16
|
+
title: Agent .rama name
|
|
17
|
+
description: "Your booted agent name without the .rama suffix (e.g. \"yieldhunter\")."
|
|
18
|
+
network:
|
|
19
|
+
type: string
|
|
20
|
+
title: Network
|
|
21
|
+
enum: ["mainnet", "testnet"]
|
|
22
|
+
default: "testnet"
|
|
23
|
+
description: "Ramestta network. Start on testnet."
|
|
24
|
+
commandFunction: |
|
|
25
|
+
(config) => ({
|
|
26
|
+
command: "node",
|
|
27
|
+
args: ["server.js"],
|
|
28
|
+
env: {
|
|
29
|
+
AGENT_KEY: config.agentKey,
|
|
30
|
+
AGENT_NAME: config.agentName,
|
|
31
|
+
RAMESTTA_NETWORK: config.network || "testnet"
|
|
32
|
+
}
|
|
33
|
+
})
|
|
34
|
+
exampleConfig:
|
|
35
|
+
agentKey: "0xYOUR_CONTROLLER_PRIVATE_KEY"
|
|
36
|
+
agentName: "yieldhunter"
|
|
37
|
+
network: "testnet"
|