neutron-mcp 1.0.1 → 1.0.2

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 CHANGED
@@ -42,6 +42,7 @@ Add to your config file:
42
42
  "command": "npx",
43
43
  "args": ["-y", "neutron-mcp"],
44
44
  "env": {
45
+ "NEUTRON_ACCOUNT_ID": "your_account_id",
45
46
  "NEUTRON_ACCESS_KEY": "your_access_key",
46
47
  "NEUTRON_SECRET_KEY": "your_secret_key"
47
48
  }
@@ -63,6 +64,7 @@ Add to `~/.claude.json` or your project's `.mcp.json`:
63
64
  "command": "npx",
64
65
  "args": ["-y", "neutron-mcp"],
65
66
  "env": {
67
+ "NEUTRON_ACCOUNT_ID": "your_account_id",
66
68
  "NEUTRON_ACCESS_KEY": "your_access_key",
67
69
  "NEUTRON_SECRET_KEY": "your_secret_key"
68
70
  }
@@ -84,6 +86,7 @@ Add to `.cursor/mcp.json` in your project or global config:
84
86
  "command": "npx",
85
87
  "args": ["-y", "neutron-mcp"],
86
88
  "env": {
89
+ "NEUTRON_ACCOUNT_ID": "your_account_id",
87
90
  "NEUTRON_ACCESS_KEY": "your_access_key",
88
91
  "NEUTRON_SECRET_KEY": "your_secret_key"
89
92
  }
@@ -105,6 +108,7 @@ Add to your Windsurf MCP configuration:
105
108
  "command": "npx",
106
109
  "args": ["-y", "neutron-mcp"],
107
110
  "env": {
111
+ "NEUTRON_ACCOUNT_ID": "your_account_id",
108
112
  "NEUTRON_ACCESS_KEY": "your_access_key",
109
113
  "NEUTRON_SECRET_KEY": "your_secret_key"
110
114
  }
@@ -126,6 +130,7 @@ Add to your Cline MCP settings:
126
130
  "command": "npx",
127
131
  "args": ["-y", "neutron-mcp"],
128
132
  "env": {
133
+ "NEUTRON_ACCOUNT_ID": "your_account_id",
129
134
  "NEUTRON_ACCESS_KEY": "your_access_key",
130
135
  "NEUTRON_SECRET_KEY": "your_secret_key"
131
136
  }
@@ -238,9 +243,10 @@ Once configured, just ask your AI assistant naturally:
238
243
 
239
244
  | Variable | Required | Description |
240
245
  |----------|----------|-------------|
246
+ | `NEUTRON_ACCOUNT_ID` | Yes | Your Neutron account ID |
241
247
  | `NEUTRON_ACCESS_KEY` | Yes | Your Neutron API access key |
242
248
  | `NEUTRON_SECRET_KEY` | Yes | Your Neutron API secret key |
243
- | `NEUTRON_API_URL` | No | API URL (defaults to `https://api.neutron.me/v2`) |
249
+ | `NEUTRON_API_URL` | No | API URL (defaults to `https://enapi.npay.live`) |
244
250
 
245
251
  ---
246
252
 
package/dist/index.js CHANGED
@@ -97,13 +97,14 @@ const UpdateWebhookSchema = z.object({
97
97
  });
98
98
  // Initialize Neutron client
99
99
  function createClient() {
100
- const apiUrl = process.env.NEUTRON_API_URL || "https://api.neutron.me/v2";
100
+ const apiUrl = process.env.NEUTRON_API_URL || "https://enapi.npay.live";
101
+ const accountId = process.env.NEUTRON_ACCOUNT_ID;
101
102
  const accessKey = process.env.NEUTRON_ACCESS_KEY;
102
103
  const secretKey = process.env.NEUTRON_SECRET_KEY;
103
- if (!accessKey || !secretKey) {
104
- throw new Error("NEUTRON_ACCESS_KEY and NEUTRON_SECRET_KEY environment variables are required");
104
+ if (!accountId || !accessKey || !secretKey) {
105
+ throw new Error("NEUTRON_ACCOUNT_ID, NEUTRON_ACCESS_KEY, and NEUTRON_SECRET_KEY environment variables are required");
105
106
  }
106
- return new NeutronClient({ apiUrl, accessKey, secretKey });
107
+ return new NeutronClient({ apiUrl, accountId, accessKey, secretKey });
107
108
  }
108
109
  // Create MCP server
109
110
  const server = new Server({
@@ -6,22 +6,22 @@ export class NeutronClient {
6
6
  constructor(config) {
7
7
  this.config = config;
8
8
  }
9
- generateSignature(method, path, timestamp, body) {
10
- const payload = `${method}${path}${timestamp}${body || ""}`;
9
+ generateSignature(payload) {
10
+ // HMAC-SHA256 signature: {apiKey}&payload={payload}
11
+ const stringToSign = `${this.config.accessKey}&payload=${payload}`;
11
12
  return crypto
12
13
  .createHmac("sha256", this.config.secretKey)
13
- .update(payload)
14
+ .update(stringToSign)
14
15
  .digest("hex");
15
16
  }
16
17
  async request(method, path, body) {
17
- const timestamp = Date.now().toString();
18
- const bodyString = body ? JSON.stringify(body) : undefined;
19
- const signature = this.generateSignature(method, path, timestamp, bodyString);
18
+ const bodyString = body ? JSON.stringify(body) : "";
19
+ const signature = this.generateSignature(bodyString);
20
20
  const headers = {
21
21
  "Content-Type": "application/json",
22
- "X-Access-Key": this.config.accessKey,
23
- "X-Timestamp": timestamp,
24
- "X-Signature": signature,
22
+ "X-Api-Key": this.config.accessKey,
23
+ "X-Api-Signature": signature,
24
+ "account_id": this.config.accountId,
25
25
  };
26
26
  // Add bearer token if authenticated
27
27
  if (this.token && Date.now() < this.tokenExpiry) {
package/dist/types.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export interface NeutronConfig {
2
2
  apiUrl: string;
3
+ accountId: string;
3
4
  accessKey: string;
4
5
  secretKey: string;
5
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neutron-mcp",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "MCP server for Neutron - Lightning payments, Bitcoin, USDT, and fiat transactions for AI-powered applications",
5
5
  "main": "dist/index.js",
6
6
  "bin": {