@hasna/mcps 0.0.9 → 0.0.11
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 +51 -100
- package/bin/index.js +5467 -2958
- package/bin/mcp.js +5363 -3126
- package/dist/index.d.ts +3 -1
- package/dist/index.js +4399 -2915
- package/dist/lib/fleet.d.ts +29 -0
- package/dist/lib/machines.d.ts +9 -0
- package/dist/types.d.ts +91 -0
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
# mcps
|
|
1
|
+
# @hasna/mcps
|
|
2
2
|
|
|
3
|
-
Meta-MCP registry & CLI — discover, manage, and proxy MCP servers
|
|
3
|
+
Meta-MCP registry & CLI — discover, manage, and proxy MCP servers
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@hasna/mcps)
|
|
6
|
+
[](LICENSE)
|
|
4
7
|
|
|
5
8
|
## Install
|
|
6
9
|
|
|
@@ -8,122 +11,70 @@ Meta-MCP registry & CLI — discover, manage, and proxy MCP servers from a singl
|
|
|
8
11
|
npm install -g @hasna/mcps
|
|
9
12
|
```
|
|
10
13
|
|
|
11
|
-
##
|
|
14
|
+
## CLI Usage
|
|
12
15
|
|
|
13
16
|
```bash
|
|
14
|
-
|
|
15
|
-
mcps add --name "GitHub" npx -y @modelcontextprotocol/server-github
|
|
16
|
-
mcps add --name "Filesystem" npx -y @modelcontextprotocol/server-filesystem
|
|
17
|
-
|
|
18
|
-
# List registered servers
|
|
19
|
-
mcps list
|
|
20
|
-
|
|
21
|
-
# Search the official MCP registry
|
|
22
|
-
mcps search "database"
|
|
23
|
-
|
|
24
|
-
# Connect and list all tools
|
|
25
|
-
mcps tools --connect
|
|
26
|
-
|
|
27
|
-
# Call a tool directly
|
|
28
|
-
mcps call github__create_issue --json '{"repo":"owner/repo","title":"Bug"}'
|
|
29
|
-
|
|
30
|
-
# Launch the web dashboard
|
|
31
|
-
mcps serve
|
|
32
|
-
|
|
33
|
-
# Launch the interactive TUI
|
|
34
|
-
mcps
|
|
35
|
-
|
|
36
|
-
# Start the meta-MCP server (for AI agents)
|
|
37
|
-
mcps mcp
|
|
17
|
+
mcps --help
|
|
38
18
|
```
|
|
39
19
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
20
|
+
- `mcps list`
|
|
21
|
+
- `mcps search`
|
|
22
|
+
- `mcps add`
|
|
23
|
+
- `mcps remove`
|
|
24
|
+
- `mcps enable`
|
|
25
|
+
- `mcps disable`
|
|
26
|
+
- `mcps tools`
|
|
27
|
+
- `mcps call`
|
|
28
|
+
- `mcps info`
|
|
29
|
+
- `mcps doctor`
|
|
30
|
+
- `mcps machines list`
|
|
31
|
+
- `mcps machines add --host spark01 --platform linux --arch arm64`
|
|
32
|
+
- `mcps machines seed-defaults`
|
|
33
|
+
- `mcps fleet catalog`
|
|
34
|
+
- `mcps fleet health --refresh`
|
|
35
|
+
- `mcps fleet install --yes`
|
|
36
|
+
|
|
37
|
+
## Fleet Operations
|
|
38
|
+
|
|
39
|
+
Use machine registration plus fleet health/install commands to manage `@hasna/*`
|
|
40
|
+
MCP packages across multiple hosts over SSH.
|
|
43
41
|
|
|
44
42
|
```bash
|
|
45
|
-
mcps
|
|
46
|
-
mcps
|
|
43
|
+
mcps machines add --host spark01 --username hasna --platform linux --arch arm64
|
|
44
|
+
mcps machines add --host apple01 --platform darwin --arch arm64
|
|
45
|
+
mcps fleet health --refresh
|
|
46
|
+
mcps fleet install --yes --mode missing-or-outdated
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
## CLI Commands
|
|
52
|
-
|
|
53
|
-
| Command | Description |
|
|
54
|
-
|---------|-------------|
|
|
55
|
-
| `mcps` | Launch interactive TUI |
|
|
56
|
-
| `mcps list` | List registered MCP servers |
|
|
57
|
-
| `mcps search <query>` | Search official MCP registry |
|
|
58
|
-
| `mcps add <command> [args...]` | Add a local MCP server |
|
|
59
|
-
| `mcps add --from-registry <id>` | Install from official registry |
|
|
60
|
-
| `mcps remove <id>` | Remove a registered server |
|
|
61
|
-
| `mcps enable <id>` | Enable a server |
|
|
62
|
-
| `mcps disable <id>` | Disable a server |
|
|
63
|
-
| `mcps tools [server-id]` | List tools (cached or `--connect` for live) |
|
|
64
|
-
| `mcps call <tool> [--json]` | Call a tool directly |
|
|
65
|
-
| `mcps info <id>` | Show server details & tools |
|
|
66
|
-
| `mcps status` | Show registry stats |
|
|
67
|
-
| `mcps serve` | Start web dashboard |
|
|
68
|
-
| `mcps mcp` | Start meta-MCP server (stdio) |
|
|
69
|
-
|
|
70
|
-
## Architecture
|
|
49
|
+
Notes:
|
|
71
50
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
└────────┬─────────┘ └──────────┬───────────┘ └──────────┬───────────────┘
|
|
77
|
-
│ │ │
|
|
78
|
-
└───────────┬───────────┴─────────────────────────┘
|
|
79
|
-
│
|
|
80
|
-
┌───────▼────────┐
|
|
81
|
-
│ Core Library │
|
|
82
|
-
│ - Registry │ ← SQLite (local MCPs)
|
|
83
|
-
│ - Remote │ ← Official MCP Registry API
|
|
84
|
-
│ - Proxy │ ← MCP SDK Client (connect to MCPs)
|
|
85
|
-
└────────────────┘
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
**Data flow:** User adds server → stored in SQLite (`~/.mcps/registry.db`) → `connectToServer()` spawns process → `listTools()` → tools cached → `callTool("server__tool", args)` routes to correct upstream.
|
|
89
|
-
|
|
90
|
-
## Meta-MCP Server
|
|
51
|
+
- Fleet commands only target enabled machines.
|
|
52
|
+
- `mcps fleet install` requires `--yes` because it performs remote installs.
|
|
53
|
+
- Targets need SSH access plus `node` and either `bun` or `npm` available remotely.
|
|
54
|
+
- Use `-j` or `--json` on the new `machines` and `fleet` commands for scriptable output.
|
|
91
55
|
|
|
92
|
-
|
|
56
|
+
## MCP Server
|
|
93
57
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
58
|
+
```bash
|
|
59
|
+
mcps-mcp
|
|
60
|
+
```
|
|
97
61
|
|
|
98
|
-
|
|
62
|
+
The MCP server exposes registry, finder, machine registry, and fleet orchestration tools.
|
|
99
63
|
|
|
100
|
-
|
|
101
|
-
import { addServer, connectToServer, listAllTools, callTool } from "@hasna/mcps";
|
|
64
|
+
## Cloud Sync
|
|
102
65
|
|
|
103
|
-
|
|
104
|
-
name: "GitHub",
|
|
105
|
-
command: "npx",
|
|
106
|
-
args: ["-y", "@modelcontextprotocol/server-github"],
|
|
107
|
-
});
|
|
66
|
+
This package supports cloud sync via `@hasna/cloud`:
|
|
108
67
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
68
|
+
```bash
|
|
69
|
+
cloud setup
|
|
70
|
+
cloud sync push --service mcps
|
|
71
|
+
cloud sync pull --service mcps
|
|
112
72
|
```
|
|
113
73
|
|
|
114
|
-
##
|
|
74
|
+
## Data Directory
|
|
115
75
|
|
|
116
|
-
|
|
117
|
-
bun install
|
|
118
|
-
bun run dev # Run CLI in dev mode
|
|
119
|
-
bun run dev:mcp # Run MCP server in dev mode
|
|
120
|
-
bun run dev:dashboard # Run dashboard in dev mode (Vite)
|
|
121
|
-
bun run serve # Run dashboard server
|
|
122
|
-
bun test # Run tests (127 tests)
|
|
123
|
-
bun run typecheck # Type-check
|
|
124
|
-
bun run build # Build everything
|
|
125
|
-
```
|
|
76
|
+
Data is stored in `~/.hasna/mcps/`.
|
|
126
77
|
|
|
127
78
|
## License
|
|
128
79
|
|
|
129
|
-
Apache-2.0
|
|
80
|
+
Apache-2.0 -- see [LICENSE](LICENSE)
|