asrai-mcp 0.4.4

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.
Files changed (2) hide show
  1. package/bin/asrai-mcp.js +43 -0
  2. package/package.json +21 -0
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * asrai-mcp npm wrapper
4
+ * Spawns the Python asrai-mcp package via uvx (preferred) or pip-installed command.
5
+ *
6
+ * Usage via npx:
7
+ * npx asrai-mcp (uses PRIVATE_KEY env var)
8
+ *
9
+ * Usage in Claude Desktop config:
10
+ * { "command": "npx", "args": ["-y", "asrai-mcp"] }
11
+ */
12
+
13
+ const { spawnSync } = require('child_process');
14
+
15
+ const args = process.argv.slice(2);
16
+
17
+ // Try uvx first — no pre-install needed, works if uv is installed
18
+ const uvx = spawnSync('uvx', ['asrai-mcp', ...args], {
19
+ stdio: 'inherit',
20
+ env: process.env,
21
+ });
22
+
23
+ if (uvx.status === 0) {
24
+ process.exit(0);
25
+ }
26
+
27
+ // Fall back to pip-installed asrai-mcp command
28
+ const pip = spawnSync('asrai-mcp', args, {
29
+ stdio: 'inherit',
30
+ env: process.env,
31
+ });
32
+
33
+ if (pip.status !== null) {
34
+ process.exit(pip.status);
35
+ }
36
+
37
+ // Neither worked — print helpful error
38
+ console.error(
39
+ '\nError: asrai-mcp requires either:\n' +
40
+ ' - uv installed: https://docs.astral.sh/uv/ (then it runs automatically)\n' +
41
+ ' - OR: pip install asrai-mcp\n'
42
+ );
43
+ process.exit(1);
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "asrai-mcp",
3
+ "version": "0.4.4",
4
+ "description": "Asrai crypto analysis MCP server — pay-per-use via x402 on Base (npx wrapper for Python package)",
5
+ "keywords": ["mcp", "crypto", "asrai", "x402", "trading", "signals"],
6
+ "homepage": "https://asrai.me/agents",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/abuzerasr/asrai-mcp"
10
+ },
11
+ "license": "MIT",
12
+ "bin": {
13
+ "asrai-mcp": "./bin/asrai-mcp.js"
14
+ },
15
+ "files": [
16
+ "bin/"
17
+ ],
18
+ "engines": {
19
+ "node": ">=18"
20
+ }
21
+ }