@oneshot-agent/mcp-server 0.4.1 → 0.5.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/dist/index.js +3 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -6,16 +6,15 @@ import { OneShot } from "@oneshot-agent/sdk";
|
|
|
6
6
|
import { tools, handleToolCall } from "./tools/index.js";
|
|
7
7
|
const CDP_KEY_ID = process.env.CDP_API_KEY_ID;
|
|
8
8
|
const PRIVATE_KEY = process.env.ONESHOT_WALLET_PRIVATE_KEY;
|
|
9
|
-
const TEST_MODE = process.env.ONESHOT_TEST_MODE !== "false"; // Default to test mode
|
|
10
9
|
async function initAgent() {
|
|
11
10
|
if (CDP_KEY_ID) {
|
|
12
11
|
// Preferred: Coinbase CDP Server Wallet (no private key exposure)
|
|
13
12
|
console.error("Using Coinbase CDP wallet");
|
|
14
|
-
return OneShot.create({ cdp: true
|
|
13
|
+
return OneShot.create({ cdp: true });
|
|
15
14
|
}
|
|
16
15
|
if (PRIVATE_KEY) {
|
|
17
16
|
// Fallback: raw private key
|
|
18
|
-
return new OneShot({ privateKey: PRIVATE_KEY
|
|
17
|
+
return new OneShot({ privateKey: PRIVATE_KEY });
|
|
19
18
|
}
|
|
20
19
|
console.error("Error: Set CDP_API_KEY_ID + CDP_API_KEY_SECRET + CDP_WALLET_SECRET (recommended)\n" +
|
|
21
20
|
" or ONESHOT_WALLET_PRIVATE_KEY");
|
|
@@ -44,7 +43,7 @@ async function main() {
|
|
|
44
43
|
});
|
|
45
44
|
const transport = new StdioServerTransport();
|
|
46
45
|
await server.connect(transport);
|
|
47
|
-
console.error(`OneShot MCP server running (
|
|
46
|
+
console.error(`OneShot MCP server running (production)`);
|
|
48
47
|
}
|
|
49
48
|
main().catch((error) => {
|
|
50
49
|
console.error("Server error:", error);
|