@didcid/mcp-server 0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Archetech
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,79 @@
1
+ # Archon MCP Server
2
+
3
+ `@didcid/mcp-server` lets MCP clients work with Archon identities, aliases, addresses, and JSON assets from a local wallet. It runs as a stdio server on the user's machine, so agents can use Archon from local MCP-compatible tools.
4
+
5
+ The server uses the same wallet files and passphrase flow as the Keymaster CLI, then connects to an Archon node through Gatekeeper/Drawbridge for registry reads and writes.
6
+
7
+ ## Usage
8
+
9
+ ```bash
10
+ npx @didcid/mcp-server
11
+ ```
12
+
13
+ Example MCP client config:
14
+
15
+ ```json
16
+ {
17
+ "mcpServers": {
18
+ "archon": {
19
+ "command": "npx",
20
+ "args": ["-y", "@didcid/mcp-server"],
21
+ "env": {
22
+ "ARCHON_NODE_URL": "https://archon.technology",
23
+ "ARCHON_WALLET_PATH": "./wallet.json",
24
+ "ARCHON_PASSPHRASE": "your-wallet-passphrase"
25
+ }
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ ## Environment
32
+
33
+ | Variable | Default | Description |
34
+ | --- | --- | --- |
35
+ | `ARCHON_NODE_URL` | `https://archon.technology` | Archon Gatekeeper/Drawbridge node URL |
36
+ | `ARCHON_GATEKEEPER_URL` | unset | Legacy fallback when `ARCHON_NODE_URL` is unset |
37
+ | `ARCHON_WALLET_TYPE` | `json` | Local wallet backend: `json` or `sqlite` |
38
+ | `ARCHON_WALLET_PATH` | `./wallet.json` | Wallet file path |
39
+ | `ARCHON_PASSPHRASE` | unset | Required for wallet-backed tools; node health tools work without it |
40
+ | `ARCHON_DEFAULT_REGISTRY` | Keymaster default | Default registry for new DIDs |
41
+ | `ARCHON_MCP_READ_ONLY` | `false` | Set to `true` to block mutating tools |
42
+
43
+ ## Tools
44
+
45
+ Read tools:
46
+
47
+ - `archon_get_version`
48
+ - `archon_get_status`
49
+ - `archon_list_registries`
50
+ - `archon_list_ids`
51
+ - `archon_get_current_id`
52
+ - `archon_resolve_did`
53
+ - `archon_resolve_id`
54
+ - `archon_list_aliases`
55
+ - `archon_get_alias`
56
+ - `archon_list_addresses`
57
+ - `archon_check_address`
58
+ - `archon_list_assets`
59
+ - `archon_get_asset`
60
+
61
+ Mutating tools:
62
+
63
+ - `archon_use_id`
64
+ - `archon_create_id`
65
+ - `archon_add_alias`
66
+ - `archon_remove_alias`
67
+ - `archon_add_address`
68
+ - `archon_remove_address`
69
+ - `archon_publish_address`
70
+ - `archon_unpublish_address`
71
+ - `archon_create_asset_json`
72
+ - `archon_update_asset_json`
73
+ - `archon_transfer_asset`
74
+
75
+ Set `ARCHON_MCP_READ_ONLY=true` to omit mutating tools from the advertised MCP tool list.
76
+
77
+ ## Intentionally omitted from v1
78
+
79
+ The v1 server does not expose wallet creation/recovery/mnemonic/passphrase tools, Gatekeeper admin tools, credentials, vaults, dmail, Nostr, Lightning, polls, groups, schemas, or binary file/image asset tools.
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/dist/cli.js ADDED
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env node
2
+ import dotenv from 'dotenv';
3
+ import { main } from './index.js';
4
+ import { redactSecretText } from './redact.js';
5
+ dotenv.config();
6
+ main().catch((error) => {
7
+ console.error(`Archon MCP server failed: ${redactSecretText(error)}`);
8
+ process.exit(1);
9
+ });
10
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAC;AAClC,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,MAAM,CAAC,MAAM,EAAE,CAAC;AAEhB,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,6BAA6B,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IACtE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,14 @@
1
+ export type WalletType = 'json' | 'sqlite';
2
+ export interface McpServerConfig {
3
+ nodeUrl: string;
4
+ walletType: WalletType;
5
+ walletPath: string;
6
+ passphrase?: string;
7
+ defaultRegistry?: string;
8
+ readOnly: boolean;
9
+ }
10
+ export declare function loadConfig(env?: NodeJS.ProcessEnv): McpServerConfig;
11
+ export declare function walletLocation(walletPath: string): {
12
+ directory: string;
13
+ file: string;
14
+ };
package/dist/config.js ADDED
@@ -0,0 +1,33 @@
1
+ import path from 'path';
2
+ function parseWalletType(value) {
3
+ switch (value) {
4
+ case undefined:
5
+ case '':
6
+ case 'json':
7
+ return 'json';
8
+ case 'sqlite':
9
+ return 'sqlite';
10
+ default:
11
+ throw new Error(`Unsupported ARCHON_WALLET_TYPE "${value}"`);
12
+ }
13
+ }
14
+ function parseBool(value) {
15
+ return value === 'true' || value === '1' || value === 'yes';
16
+ }
17
+ export function loadConfig(env = process.env) {
18
+ return {
19
+ nodeUrl: env.ARCHON_NODE_URL || env.ARCHON_GATEKEEPER_URL || 'https://archon.technology',
20
+ walletType: parseWalletType(env.ARCHON_WALLET_TYPE),
21
+ walletPath: env.ARCHON_WALLET_PATH || './wallet.json',
22
+ passphrase: env.ARCHON_PASSPHRASE,
23
+ defaultRegistry: env.ARCHON_DEFAULT_REGISTRY,
24
+ readOnly: parseBool(env.ARCHON_MCP_READ_ONLY),
25
+ };
26
+ }
27
+ export function walletLocation(walletPath) {
28
+ return {
29
+ directory: path.dirname(walletPath),
30
+ file: path.basename(walletPath),
31
+ };
32
+ }
33
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAaxB,SAAS,eAAe,CAAC,KAAyB;IAC9C,QAAQ,KAAK,EAAE,CAAC;QAChB,KAAK,SAAS,CAAC;QACf,KAAK,EAAE,CAAC;QACR,KAAK,MAAM;YACP,OAAO,MAAM,CAAC;QAClB,KAAK,QAAQ;YACT,OAAO,QAAQ,CAAC;QACpB;YACI,MAAM,IAAI,KAAK,CAAC,mCAAmC,KAAK,GAAG,CAAC,CAAC;IACjE,CAAC;AACL,CAAC;AAED,SAAS,SAAS,CAAC,KAAyB;IACxC,OAAO,KAAK,KAAK,MAAM,IAAI,KAAK,KAAK,GAAG,IAAI,KAAK,KAAK,KAAK,CAAC;AAChE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,MAAyB,OAAO,CAAC,GAAG;IAC3D,OAAO;QACH,OAAO,EAAE,GAAG,CAAC,eAAe,IAAI,GAAG,CAAC,qBAAqB,IAAI,2BAA2B;QACxF,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,kBAAkB,CAAC;QACnD,UAAU,EAAE,GAAG,CAAC,kBAAkB,IAAI,eAAe;QACrD,UAAU,EAAE,GAAG,CAAC,iBAAiB;QACjC,eAAe,EAAE,GAAG,CAAC,uBAAuB;QAC5C,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,oBAAoB,CAAC;KAChD,CAAC;AACN,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,UAAkB;IAC7C,OAAO;QACH,SAAS,EAAE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;QACnC,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;KAClC,CAAC;AACN,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { loadConfig, walletLocation } from './config.js';
2
+ export type { McpServerConfig, WalletType } from './config.js';
3
+ export { createArchonRuntime, createWallet } from './runtime.js';
4
+ export type { ArchonRuntime } from './runtime.js';
5
+ export { registerArchonTools } from './tools.js';
6
+ export declare function main(): Promise<void>;
package/dist/index.js ADDED
@@ -0,0 +1,20 @@
1
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
3
+ import { loadConfig } from './config.js';
4
+ import { createArchonRuntime } from './runtime.js';
5
+ import { registerArchonTools } from './tools.js';
6
+ export { loadConfig, walletLocation } from './config.js';
7
+ export { createArchonRuntime, createWallet } from './runtime.js';
8
+ export { registerArchonTools } from './tools.js';
9
+ export async function main() {
10
+ const config = loadConfig();
11
+ const runtime = await createArchonRuntime(config);
12
+ const server = new McpServer({
13
+ name: '@didcid/mcp-server',
14
+ version: '0.1.0',
15
+ });
16
+ registerArchonTools(server, runtime, config);
17
+ const transport = new StdioServerTransport();
18
+ await server.connect(transport);
19
+ }
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAEjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,CAAC,KAAK,UAAU,IAAI;IACtB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,MAAM,OAAO,GAAG,MAAM,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAClD,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QACzB,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,OAAO;KACnB,CAAC,CAAC;IAEH,mBAAmB,CAAC,MAAa,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAEpD,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AACpC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function redactSecretText(value: unknown): string;
2
+ export declare function errorMessage(error: unknown): string;
package/dist/redact.js ADDED
@@ -0,0 +1,56 @@
1
+ const QUOTED_SECRET_ASSIGNMENT = /\b(ARCHON_(?:ADMIN_API_KEY|PASSPHRASE|ENCRYPTED_PASSPHRASE)|api[_-]?key|apikey|token|access_token|passphrase|password)=("[^"]*"|'[^']*')/gi;
2
+ const SPACED_SECRET_ASSIGNMENT = /\b(ARCHON_(?:PASSPHRASE|ENCRYPTED_PASSPHRASE)|passphrase|password)=([^&\r\n]*?)(?=\shttps?:\/\/|\s[A-Za-z_][A-Za-z0-9_-]*=|[&\r\n]|$)/gi;
3
+ const SECRET_ASSIGNMENT = /\b(ARCHON_ADMIN_API_KEY|api[_-]?key|apikey|token|access_token)=([^&\s]+)/gi;
4
+ const URL_TEXT = /https?:\/\/[^\s"'<>]+/gi;
5
+ const URL_SECRET_PARAMS = new Set(['api_key', 'apikey', 'access_token', 'token', 'key', 'password', 'passphrase']);
6
+ const TOKEN_PATH_HOSTS = [
7
+ /(^|\.)alchemy\.com$/i,
8
+ /(^|\.)infura\.io$/i,
9
+ /(^|\.)quicknode\.com$/i,
10
+ ];
11
+ function redactUrl(rawUrl) {
12
+ try {
13
+ const url = new URL(rawUrl);
14
+ if (url.username || url.password) {
15
+ url.username = '<redacted>';
16
+ url.password = '';
17
+ }
18
+ for (const param of [...url.searchParams.keys()]) {
19
+ if (URL_SECRET_PARAMS.has(param.toLowerCase())) {
20
+ url.searchParams.set(param, '<redacted>');
21
+ }
22
+ }
23
+ if (TOKEN_PATH_HOSTS.some(pattern => pattern.test(url.hostname))) {
24
+ url.pathname = url.pathname.replace(/\/v\d+\/[^/?#]+/gi, match => {
25
+ const [prefix] = match.match(/\/v\d+\//i) ?? ['/'];
26
+ return `${prefix}<redacted>`;
27
+ });
28
+ }
29
+ return url.toString().replace(/%3Credacted%3E/g, '<redacted>');
30
+ }
31
+ catch {
32
+ return rawUrl;
33
+ }
34
+ }
35
+ export function redactSecretText(value) {
36
+ const text = typeof value === 'string'
37
+ ? value
38
+ : value instanceof Error
39
+ ? value.message
40
+ : JSON.stringify(value);
41
+ return (text || String(value))
42
+ .replace(URL_TEXT, redactUrl)
43
+ .replace(QUOTED_SECRET_ASSIGNMENT, '$1=<redacted>')
44
+ .replace(SPACED_SECRET_ASSIGNMENT, '$1=<redacted>')
45
+ .replace(SECRET_ASSIGNMENT, '$1=<redacted>');
46
+ }
47
+ export function errorMessage(error) {
48
+ if (typeof error === 'object' && error && 'error' in error && typeof error.error === 'string') {
49
+ return redactSecretText(error.error);
50
+ }
51
+ if (typeof error === 'object' && error && 'message' in error && typeof error.message === 'string') {
52
+ return redactSecretText(error.message);
53
+ }
54
+ return redactSecretText(error);
55
+ }
56
+ //# sourceMappingURL=redact.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"redact.js","sourceRoot":"","sources":["../src/redact.ts"],"names":[],"mappings":"AAAA,MAAM,wBAAwB,GAAG,4IAA4I,CAAC;AAC9K,MAAM,wBAAwB,GAAG,yIAAyI,CAAC;AAC3K,MAAM,iBAAiB,GAAG,4EAA4E,CAAC;AACvG,MAAM,QAAQ,GAAG,yBAAyB,CAAC;AAC3C,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,SAAS,EAAE,QAAQ,EAAE,cAAc,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;AACnH,MAAM,gBAAgB,GAAG;IACrB,sBAAsB;IACtB,oBAAoB;IACpB,wBAAwB;CAC3B,CAAC;AAEF,SAAS,SAAS,CAAC,MAAc;IAC7B,IAAI,CAAC;QACD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;QAE5B,IAAI,GAAG,CAAC,QAAQ,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;YAC/B,GAAG,CAAC,QAAQ,GAAG,YAAY,CAAC;YAC5B,GAAG,CAAC,QAAQ,GAAG,EAAE,CAAC;QACtB,CAAC;QAED,KAAK,MAAM,KAAK,IAAI,CAAC,GAAG,GAAG,CAAC,YAAY,CAAC,IAAI,EAAE,CAAC,EAAE,CAAC;YAC/C,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,EAAE,CAAC;gBAC7C,GAAG,CAAC,YAAY,CAAC,GA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AI,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC5F,OAAO,gBAAgB,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChG,OAAO,gBAAgB,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED,OAAO,gBAAgB,CAAC,KAAK,CAAC,CAAC;AACnC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import DrawbridgeClient from '@didcid/gatekeeper/drawbridge';
2
+ import Keymaster from '@didcid/keymaster';
3
+ import WalletJson from '@didcid/keymaster/wallet/json';
4
+ import WalletSQLite from '@didcid/keymaster/wallet/sqlite';
5
+ import { McpServerConfig } from './config.js';
6
+ export interface ArchonRuntime {
7
+ node: DrawbridgeClient;
8
+ keymaster?: Keymaster;
9
+ }
10
+ export declare function createWallet(config: McpServerConfig): Promise<WalletSQLite | WalletJson>;
11
+ export declare function createArchonRuntime(config: McpServerConfig): Promise<ArchonRuntime>;
@@ -0,0 +1,37 @@
1
+ import path from 'path';
2
+ import CipherNode from '@didcid/cipher/node';
3
+ import DrawbridgeClient from '@didcid/gatekeeper/drawbridge';
4
+ import Keymaster from '@didcid/keymaster';
5
+ import WalletJson from '@didcid/keymaster/wallet/json';
6
+ import WalletSQLite from '@didcid/keymaster/wallet/sqlite';
7
+ import { walletLocation } from './config.js';
8
+ export async function createWallet(config) {
9
+ const { directory, file } = walletLocation(config.walletPath);
10
+ if (config.walletType === 'sqlite') {
11
+ return WalletSQLite.create(file, directory);
12
+ }
13
+ return new WalletJson(file, directory);
14
+ }
15
+ export async function createArchonRuntime(config) {
16
+ const node = new DrawbridgeClient();
17
+ await node.connect({
18
+ url: config.nodeUrl,
19
+ });
20
+ if (!config.passphrase) {
21
+ return { node };
22
+ }
23
+ const wallet = await createWallet({
24
+ ...config,
25
+ walletPath: path.normalize(config.walletPath),
26
+ });
27
+ const cipher = new CipherNode();
28
+ const keymaster = new Keymaster({
29
+ gatekeeper: node,
30
+ wallet,
31
+ cipher,
32
+ defaultRegistry: config.defaultRegistry,
33
+ passphrase: config.passphrase,
34
+ });
35
+ return { node, keymaster };
36
+ }
37
+ //# sourceMappingURL=runtime.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,UAAU,MAAM,qBAAqB,CAAC;AAC7C,OAAO,gBAAgB,MAAM,+BAA+B,CAAC;AAC7D,OAAO,SAAS,MAAM,mBAAmB,CAAC;AAC1C,OAAO,UAAU,MAAM,+BAA+B,CAAC;AACvD,OAAO,YAAY,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAmB,cAAc,EAAE,MAAM,aAAa,CAAC;AAO9D,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,MAAuB;IACtD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAE9D,IAAI,MAAM,CAAC,UAAU,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,YAAY,CAAC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;IAChD,CAAC;IAED,OAAO,IAAI,UAAU,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;AAC3C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAAuB;IAC7D,MAAM,IAAI,GAAG,IAAI,gBAAgB,EAAE,CAAC;IACpC,MAAM,IAAI,CAAC,OAAO,CAAC;QACf,GAAG,EAAE,MAAM,CAAC,OAAO;KACtB,CAAC,CAAC;IAEH,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC;QACrB,OAAO,EAAE,IAAI,EAAE,CAAC;IACpB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC;QAC9B,GAAG,MAAM;QACT,UAAU,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC;KAChD,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;IAChC,MAAM,SAAS,GAAG,IAAI,SAAS,CAAC;QAC5B,UAAU,EAAE,IAAI;QAChB,MAAM;QACN,MAAM;QACN,eAAe,EAAE,MAAM,CAAC,eAAe;QACvC,UAAU,EAAE,MAAM,CAAC,UAAU;KAChC,CAAC,CAAC;IAEH,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC/B,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { McpServerConfig } from './config.js';
2
+ import { ArchonRuntime } from './runtime.js';
3
+ type RegisterableServer = {
4
+ registerTool?: (name: string, config: any, handler: (args: unknown) => Promise<unknown>) => void;
5
+ tool?: (name: string, description: string, schema: unknown, handler: (args: unknown) => Promise<unknown>) => void;
6
+ };
7
+ export declare function registerArchonTools(server: RegisterableServer, runtime: ArchonRuntime, config: McpServerConfig): void;
8
+ export {};
package/dist/tools.js ADDED
@@ -0,0 +1,103 @@
1
+ import { z } from 'zod';
2
+ import { errorMessage } from './redact.js';
3
+ const EmptySchema = z.object({});
4
+ const ResolveOptionsSchema = z.object({
5
+ confirm: z.boolean().optional(),
6
+ verify: z.boolean().optional(),
7
+ versionTime: z.string().optional(),
8
+ versionSequence: z.number().int().optional(),
9
+ });
10
+ const JsonObjectSchema = z.record(z.unknown());
11
+ const AssetOptionsSchema = z.object({
12
+ alias: z.string().optional(),
13
+ registry: z.string().optional(),
14
+ controller: z.string().optional(),
15
+ validUntil: z.string().optional(),
16
+ });
17
+ function jsonResult(result) {
18
+ return {
19
+ content: [
20
+ {
21
+ type: 'text',
22
+ text: JSON.stringify(result),
23
+ },
24
+ ],
25
+ };
26
+ }
27
+ function ok(result) {
28
+ return jsonResult({ ok: true, result });
29
+ }
30
+ function fail(error) {
31
+ return jsonResult({ ok: false, error: errorMessage(error) });
32
+ }
33
+ function requireKeymaster(runtime) {
34
+ if (!runtime.keymaster) {
35
+ throw new Error('ARCHON_PASSPHRASE is required for wallet-backed MCP tools');
36
+ }
37
+ return runtime.keymaster;
38
+ }
39
+ function registerTool(server, name, description, schema, handler, options = {}) {
40
+ if (options.mutates && options.readOnly) {
41
+ return;
42
+ }
43
+ const wrapped = async (rawArgs) => {
44
+ try {
45
+ if (options.mutates && options.readOnly) {
46
+ throw new Error('Tool disabled by ARCHON_MCP_READ_ONLY=true');
47
+ }
48
+ const args = schema.parse(rawArgs ?? {});
49
+ return ok(await handler(args));
50
+ }
51
+ catch (error) {
52
+ return fail(error);
53
+ }
54
+ };
55
+ if (server.registerTool) {
56
+ server.registerTool(name, { description, inputSchema: schema }, wrapped);
57
+ return;
58
+ }
59
+ if (server.tool && schema instanceof z.ZodObject) {
60
+ server.tool(name, description, schema.shape, wrapped);
61
+ return;
62
+ }
63
+ throw new Error('MCP server does not support tool registration');
64
+ }
65
+ function compactOptions(options) {
66
+ const entries = Object.entries(options).filter(([, value]) => value !== undefined);
67
+ return entries.length > 0 ? Object.fromEntries(entries) : undefined;
68
+ }
69
+ export function registerArchonTools(server, runtime, config) {
70
+ const mutating = { mutates: true, readOnly: config.readOnly };
71
+ registerTool(server, 'archon_get_version', 'Get Archon node version information.', EmptySchema, async () => runtime.node.getVersion());
72
+ registerTool(server, 'archon_get_status', 'Get Archon node status.', EmptySchema, async () => runtime.node.getStatus());
73
+ registerTool(server, 'archon_list_registries', 'List registries supported by the connected Archon node.', EmptySchema, async () => runtime.node.listRegistries());
74
+ registerTool(server, 'archon_list_ids', 'List IDs in the local Keymaster wallet.', EmptySchema, async () => requireKeymaster(runtime).listIds());
75
+ registerTool(server, 'archon_get_current_id', 'Get the current local Keymaster wallet ID name.', EmptySchema, async () => requireKeymaster(runtime).getCurrentId());
76
+ registerTool(server, 'archon_use_id', 'Set the current local Keymaster wallet ID name.', z.object({ name: z.string() }), async ({ name }) => requireKeymaster(runtime).setCurrentId(name), mutating);
77
+ registerTool(server, 'archon_create_id', 'Create a new local Keymaster wallet ID.', z.object({ name: z.string(), registry: z.string().optional() }), async ({ name, registry }) => requireKeymaster(runtime).createId(name, compactOptions({ registry })), mutating);
78
+ registerTool(server, 'archon_resolve_did', 'Resolve a DID or DID-like Archon identifier.', z.object({ did: z.string() }).merge(ResolveOptionsSchema), async ({ did, ...options }) => requireKeymaster(runtime).resolveDID(did, compactOptions(options)));
79
+ registerTool(server, 'archon_resolve_id', 'Resolve a local ID name, alias, DID, or the current ID when id is omitted.', z.object({ id: z.string().optional() }).merge(ResolveOptionsSchema), async ({ id, ...options }) => {
80
+ const keymaster = requireKeymaster(runtime);
81
+ const resolvedId = id ?? await keymaster.getCurrentId();
82
+ if (!resolvedId) {
83
+ throw new Error('No current ID');
84
+ }
85
+ return keymaster.resolveDID(resolvedId, compactOptions(options));
86
+ });
87
+ registerTool(server, 'archon_list_aliases', 'List DID aliases in the local Keymaster wallet.', EmptySchema, async () => requireKeymaster(runtime).listAliases());
88
+ registerTool(server, 'archon_add_alias', 'Add a DID alias to the local Keymaster wallet.', z.object({ alias: z.string(), did: z.string() }), async ({ alias, did }) => requireKeymaster(runtime).addAlias(alias, did), mutating);
89
+ registerTool(server, 'archon_get_alias', 'Get the DID assigned to a local alias.', z.object({ alias: z.string() }), async ({ alias }) => requireKeymaster(runtime).getAlias(alias));
90
+ registerTool(server, 'archon_remove_alias', 'Remove a DID alias from the local Keymaster wallet.', z.object({ alias: z.string() }), async ({ alias }) => requireKeymaster(runtime).removeAlias(alias), mutating);
91
+ registerTool(server, 'archon_list_addresses', 'List wallet addresses claimed through Herald domains.', EmptySchema, async () => requireKeymaster(runtime).listAddresses());
92
+ registerTool(server, 'archon_check_address', 'Check whether a Herald address is available.', z.object({ address: z.string() }), async ({ address }) => requireKeymaster(runtime).checkAddress(address));
93
+ registerTool(server, 'archon_add_address', 'Claim a Herald address for the current ID.', z.object({ address: z.string() }), async ({ address }) => requireKeymaster(runtime).addAddress(address), mutating);
94
+ registerTool(server, 'archon_remove_address', 'Remove a Herald address from the current ID.', z.object({ address: z.string() }), async ({ address }) => requireKeymaster(runtime).removeAddress(address), mutating);
95
+ registerTool(server, 'archon_publish_address', 'Publish a stored Herald address on a DID document.', z.object({ address: z.string().optional(), id: z.string().optional() }), async ({ address, id }) => requireKeymaster(runtime).publishAddress(address, id), mutating);
96
+ registerTool(server, 'archon_unpublish_address', 'Remove a published Herald address from a DID document.', z.object({ id: z.string().optional() }), async ({ id }) => requireKeymaster(runtime).unpublishAddress(id), mutating);
97
+ registerTool(server, 'archon_list_assets', 'List assets owned by the current local ID.', EmptySchema, async () => requireKeymaster(runtime).listAssets());
98
+ registerTool(server, 'archon_create_asset_json', 'Create a JSON asset DID from inline JSON data.', z.object({ data: JsonObjectSchema }).merge(AssetOptionsSchema), async ({ data, ...options }) => requireKeymaster(runtime).createAsset(data, compactOptions(options)), mutating);
99
+ registerTool(server, 'archon_get_asset', 'Resolve an asset by local name, alias, or DID.', z.object({ id: z.string() }).merge(ResolveOptionsSchema), async ({ id, ...options }) => requireKeymaster(runtime).resolveAsset(id, compactOptions(options)));
100
+ registerTool(server, 'archon_update_asset_json', 'Merge JSON object data into an existing asset.', z.object({ id: z.string(), data: JsonObjectSchema }), async ({ id, data }) => requireKeymaster(runtime).mergeData(id, data), mutating);
101
+ registerTool(server, 'archon_transfer_asset', 'Transfer an asset to a new controller DID.', z.object({ id: z.string(), controller: z.string() }), async ({ id, controller }) => requireKeymaster(runtime).transferAsset(id, controller), mutating);
102
+ }
103
+ //# sourceMappingURL=tools.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.js","sourceRoot":"","sources":["../src/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MA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AAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,EACxD,KAAK,EAAE,EAAE,EAAE,EAAE,GAAG,OAAO,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,EAAE,EAAE,cAAc,CAAC,OAAO,CAAC,CAAC,CACpG,CAAC;IACF,YAAY,CACR,MAAM,EACN,0BAA0B,EAC1B,gDAAgD,EAChD,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE,CAAC,EACpD,KAAK,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,EAAE,EAAE,IAAI,CAAC,EACrE,QAAQ,CACX,CAAC;IACF,YAAY,CAAC,MAAM,EAAE,uBAAuB,EAAE,4CAA4C,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC,aAAa,CAAC,EAAE,EAAE,UAAU,CAAC,EAAE,QAAQ,CAAC,CAAC;AACvP,CAAC"}
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@didcid/mcp-server",
3
+ "version": "0.1.1",
4
+ "description": "Archon MCP server",
5
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "bin": {
9
+ "archon-mcp-server": "./dist/cli.js"
10
+ },
11
+ "files": [
12
+ "dist",
13
+ "README.md"
14
+ ],
15
+ "publishConfig": {
16
+ "registry": "https://registry.npmjs.org",
17
+ "access": "public"
18
+ },
19
+ "exports": {
20
+ ".": {
21
+ "import": "./dist/index.js",
22
+ "types": "./dist/index.d.ts"
23
+ }
24
+ },
25
+ "scripts": {
26
+ "clean": "rm -rf dist",
27
+ "build": "npm run clean && tsc -p tsconfig.json && chmod +x dist/cli.js"
28
+ },
29
+ "keywords": [
30
+ "archon",
31
+ "mcp",
32
+ "did",
33
+ "wallet"
34
+ ],
35
+ "author": "David McFadzean <davidmc@gmail.com>",
36
+ "license": "MIT",
37
+ "dependencies": {
38
+ "@didcid/cipher": "^0.2.12",
39
+ "@didcid/gatekeeper": "^0.4.12",
40
+ "@didcid/keymaster": "^0.4.12",
41
+ "@modelcontextprotocol/sdk": "^1.29.0",
42
+ "dotenv": "^16.4.5",
43
+ "zod": "^3.25.76"
44
+ },
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "git+https://github.com/archetech/archon.git"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^22.18.11"
51
+ },
52
+ "gitHead": "f6cced9ea07a7de85e205922710f608982853fcc"
53
+ }