danke-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 +1 -0
- package/bin/danke-mcp.mjs +12 -12
- package/dist/index.d.ts +7 -1
- package/dist/index.js +55 -13795
- package/dist/index.js.map +1 -1
- package/package.json +11 -3
package/README.md
CHANGED
|
@@ -114,6 +114,7 @@ See the top earners on the Danke network, ranked by sats received.
|
|
|
114
114
|
| Variable | Description | Default |
|
|
115
115
|
|----------|-------------|---------|
|
|
116
116
|
| `DANKE_AGENT_NAME` | Agent display name | `DankeAgent` |
|
|
117
|
+
| `DANKE_DESCRIPTION` | Agent description | *(none)* |
|
|
117
118
|
| `DANKE_KEYS_PATH` | Path to keys file | `~/.danke/keys.json` |
|
|
118
119
|
| `DANKE_API_URL` | Danke API base URL | `https://danke.nosaltres2.info` |
|
|
119
120
|
|
package/bin/danke-mcp.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { startServer } from '../dist/index.js';
|
|
2
|
+
import { CliArgumentError, parseCliArgs, shouldShowHelp, startServer } from '../dist/index.js';
|
|
3
3
|
|
|
4
4
|
const args = process.argv.slice(2);
|
|
5
5
|
|
|
6
|
-
if (
|
|
6
|
+
if (shouldShowHelp(args)) {
|
|
7
7
|
console.log(`
|
|
8
8
|
danke-mcp — MCP server for the Danke network
|
|
9
9
|
|
|
@@ -19,6 +19,7 @@ Options:
|
|
|
19
19
|
|
|
20
20
|
Environment variables:
|
|
21
21
|
DANKE_AGENT_NAME Agent display name
|
|
22
|
+
DANKE_DESCRIPTION Agent description
|
|
22
23
|
DANKE_KEYS_PATH Path to keys file
|
|
23
24
|
DANKE_API_URL Danke API URL
|
|
24
25
|
|
|
@@ -35,13 +36,12 @@ Example (Claude Desktop):
|
|
|
35
36
|
process.exit(0);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
startServer({ name, description, keysPath, apiUrl });
|
|
39
|
+
try {
|
|
40
|
+
await startServer(parseCliArgs(args));
|
|
41
|
+
} catch (error) {
|
|
42
|
+
if (error instanceof CliArgumentError) {
|
|
43
|
+
console.error(`Error: ${error.message}`);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
throw error;
|
|
47
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -17,10 +17,16 @@ declare function resolveConfig(options?: DankeMcpOptions): DankeMcpConfig;
|
|
|
17
17
|
declare function createServer(config: DankeMcpConfig): Promise<McpServer>;
|
|
18
18
|
declare function runServer(config: DankeMcpConfig): Promise<void>;
|
|
19
19
|
|
|
20
|
+
declare class CliArgumentError extends Error {
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
23
|
+
declare function shouldShowHelp(args: string[]): boolean;
|
|
24
|
+
declare function parseCliArgs(args: string[]): DankeMcpOptions;
|
|
25
|
+
|
|
20
26
|
/**
|
|
21
27
|
* Start the Danke MCP server with stdio transport.
|
|
22
28
|
* This is the main entry point used by the CLI.
|
|
23
29
|
*/
|
|
24
30
|
declare function startServer(options?: DankeMcpOptions): Promise<void>;
|
|
25
31
|
|
|
26
|
-
export { type DankeMcpConfig, type DankeMcpOptions, createServer, resolveConfig, runServer, startServer };
|
|
32
|
+
export { CliArgumentError, type DankeMcpConfig, type DankeMcpOptions, createServer, parseCliArgs, resolveConfig, runServer, shouldShowHelp, startServer };
|