@pyrokine/mcp-ssh 1.0.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.
@@ -0,0 +1,111 @@
1
+ /**
2
+ * SSH MCP Pro - 类型定义
3
+ */
4
+ export interface SSHConnectionConfig {
5
+ host: string;
6
+ port: number;
7
+ username: string;
8
+ password?: string;
9
+ privateKeyPath?: string;
10
+ privateKey?: string;
11
+ passphrase?: string;
12
+ alias?: string;
13
+ keepaliveInterval?: number;
14
+ keepaliveCountMax?: number;
15
+ readyTimeout?: number;
16
+ env?: Record<string, string>;
17
+ lang?: string;
18
+ shell?: string;
19
+ jumpHost?: SSHConnectionConfig;
20
+ }
21
+ export interface SSHSessionInfo {
22
+ alias: string;
23
+ host: string;
24
+ port: number;
25
+ username: string;
26
+ connected: boolean;
27
+ connectedAt: number;
28
+ lastUsedAt: number;
29
+ env?: Record<string, string>;
30
+ }
31
+ export interface ExecOptions {
32
+ timeout?: number;
33
+ env?: Record<string, string>;
34
+ cwd?: string;
35
+ pty?: boolean;
36
+ maxOutputSize?: number;
37
+ rows?: number;
38
+ cols?: number;
39
+ term?: string;
40
+ }
41
+ export interface ExecResult {
42
+ success: boolean;
43
+ stdout: string;
44
+ stderr: string;
45
+ exitCode: number;
46
+ duration: number;
47
+ }
48
+ export interface FileInfo {
49
+ name: string;
50
+ path: string;
51
+ size: number;
52
+ isDirectory: boolean;
53
+ isFile: boolean;
54
+ isSymlink: boolean;
55
+ permissions: string;
56
+ owner: number;
57
+ group: number;
58
+ mtime: Date;
59
+ atime: Date;
60
+ }
61
+ export interface TransferProgress {
62
+ transferred: number;
63
+ total: number;
64
+ percent: number;
65
+ }
66
+ export interface PersistedSession {
67
+ alias: string;
68
+ host: string;
69
+ port: number;
70
+ username: string;
71
+ connectedAt: number;
72
+ env?: Record<string, string>;
73
+ }
74
+ export interface PtyOptions {
75
+ rows?: number;
76
+ cols?: number;
77
+ term?: string;
78
+ env?: Record<string, string>;
79
+ cwd?: string;
80
+ bufferSize?: number;
81
+ }
82
+ export interface PtySessionInfo {
83
+ id: string;
84
+ alias: string;
85
+ command: string;
86
+ rows: number;
87
+ cols: number;
88
+ createdAt: number;
89
+ lastReadAt: number;
90
+ bufferSize: number;
91
+ active: boolean;
92
+ }
93
+ export type ForwardType = 'local' | 'remote';
94
+ export interface PortForwardConfig {
95
+ type: ForwardType;
96
+ localHost: string;
97
+ localPort: number;
98
+ remoteHost: string;
99
+ remotePort: number;
100
+ }
101
+ export interface PortForwardInfo {
102
+ id: string;
103
+ alias: string;
104
+ type: ForwardType;
105
+ localHost: string;
106
+ localPort: number;
107
+ remoteHost: string;
108
+ remotePort: number;
109
+ createdAt: number;
110
+ active: boolean;
111
+ }
package/dist/types.js ADDED
@@ -0,0 +1,4 @@
1
+ /**
2
+ * SSH MCP Pro - 类型定义
3
+ */
4
+ export {};
package/package.json ADDED
@@ -0,0 +1,43 @@
1
+ {
2
+ "name": "@pyrokine/mcp-ssh",
3
+ "version": "1.0.0",
4
+ "description": "A comprehensive SSH MCP Server for Claude Code",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "mcp-ssh": "dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "start": "node dist/index.js",
13
+ "dev": "tsc && node dist/index.js",
14
+ "clean": "rm -rf dist",
15
+ "prepublishOnly": "npm run build"
16
+ },
17
+ "keywords": [
18
+ "mcp",
19
+ "ssh",
20
+ "claude",
21
+ "remote",
22
+ "automation"
23
+ ],
24
+ "author": "pyro",
25
+ "license": "MIT",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/user/ssh-mcp-pro"
29
+ },
30
+ "dependencies": {
31
+ "@modelcontextprotocol/sdk": "^1.25.3",
32
+ "@xterm/headless": "^6.0.0",
33
+ "ssh2": "^1.17.0"
34
+ },
35
+ "devDependencies": {
36
+ "@types/node": "^25.0.9",
37
+ "@types/ssh2": "^1.15.5",
38
+ "typescript": "^5.9.3"
39
+ },
40
+ "engines": {
41
+ "node": ">=18.0.0"
42
+ }
43
+ }