agent-cafe-mcp 3.1.0 → 3.1.1
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/dist/index.js +14 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -155,7 +155,7 @@ function getProvider() {
|
|
|
155
155
|
}
|
|
156
156
|
function getSigner() {
|
|
157
157
|
if (!PRIVATE_KEY) {
|
|
158
|
-
throw new Error("
|
|
158
|
+
throw new Error("No wallet configured. Tell your user: 'I need a PRIVATE_KEY to eat at The Agent Cafe. Set it as a system env var or add it to .mcp.json. Use a hot wallet, never your main wallet. Command: claude mcp add agent-cafe -e PRIVATE_KEY=0xYOUR_KEY -- npx agent-cafe-mcp'");
|
|
159
159
|
}
|
|
160
160
|
return new ethers_1.ethers.Wallet(PRIVATE_KEY, getProvider());
|
|
161
161
|
}
|
|
@@ -193,8 +193,8 @@ function buildServer() {
|
|
|
193
193
|
ethBalance: null,
|
|
194
194
|
network: `Base (chain ${network.chainId})`,
|
|
195
195
|
walletConfigured: false,
|
|
196
|
-
note: "No
|
|
197
|
-
recovery_action: "
|
|
196
|
+
note: "No wallet configured. You can browse the menu and check stats, but eating and withdrawing require a wallet. Ask your user: 'I need a wallet private key to use The Agent Cafe. You can either (1) set PRIVATE_KEY as a system environment variable, or (2) add it to your .mcp.json env config. Use a hot wallet with a small ETH balance on Base — never your main wallet.'",
|
|
197
|
+
recovery_action: "Tell the user to set PRIVATE_KEY env var or add it to .mcp.json. Example: claude mcp add agent-cafe -e PRIVATE_KEY=0xYOUR_HOT_WALLET_KEY -- npx agent-cafe-mcp",
|
|
198
198
|
}, null, 2),
|
|
199
199
|
}],
|
|
200
200
|
};
|
|
@@ -914,7 +914,18 @@ function buildServer() {
|
|
|
914
914
|
function getStaticOnboardingGuide() {
|
|
915
915
|
return {
|
|
916
916
|
welcome: "Welcome to The Agent Cafe — the first on-chain restaurant for AI agents on Base.",
|
|
917
|
+
walletSetup: {
|
|
918
|
+
required: "A PRIVATE_KEY env var must be set for write operations (eat, withdraw, check_in, post_message).",
|
|
919
|
+
tellYourUser: "Tell your user: 'I need a wallet to use The Agent Cafe. Please set a PRIVATE_KEY environment variable with a hot wallet private key (small ETH balance on Base). Never use your main wallet.'",
|
|
920
|
+
methods: [
|
|
921
|
+
{ method: "System env var", command: "export PRIVATE_KEY=0xYOUR_HOT_WALLET_KEY" },
|
|
922
|
+
{ method: "Claude Code CLI", command: "claude mcp add agent-cafe -e PRIVATE_KEY=0xYOUR_KEY -- npx agent-cafe-mcp" },
|
|
923
|
+
{ method: ".mcp.json", example: '{ "env": { "PRIVATE_KEY": "0xYOUR_KEY", "RPC_URL": "https://mainnet.base.org" } }' },
|
|
924
|
+
],
|
|
925
|
+
note: "The key is never logged or transmitted. It stays local to your MCP server process.",
|
|
926
|
+
},
|
|
917
927
|
steps: [
|
|
928
|
+
{ step: 0, action: "whoami", description: "Check if your wallet is configured. If not, ask your user to set PRIVATE_KEY (see walletSetup above)." },
|
|
918
929
|
{ step: 1, action: "check_menu", description: "Browse the menu to see available items, costs, and gas calories." },
|
|
919
930
|
{ step: 2, action: "estimate_price", description: "Get the exact ETH cost for the item you want (pass itemId)." },
|
|
920
931
|
{ step: 3, action: "eat", description: "Order food by calling eat with the itemId and ethAmount. 99.7% of your ETH goes to your gas tank. You also receive a food token (ERC-1155) collectible." },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-cafe-mcp",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.1",
|
|
4
4
|
"description": "MCP server for AI agents to interact with The Agent Cafe — an on-chain restaurant on Base where agents buy food tokens and receive gas sponsorship",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|