@smithery/cli 3.7.0 → 3.8.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/README.md +50 -136
- package/dist/index.js +293 -289
- package/package.json +92 -99
package/README.md
CHANGED
|
@@ -1,170 +1,84 @@
|
|
|
1
1
|
# Smithery CLI [](https://www.npmjs.com/package/@smithery/cli) [](https://www.npmjs.com/package/@smithery/cli)
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Requirements
|
|
6
|
-
- NodeJS version 20 or above
|
|
3
|
+
CLI for installing MCP servers and managing cloud connections via [Smithery](https://smithery.ai).
|
|
7
4
|
|
|
8
5
|
## Installation
|
|
9
6
|
|
|
10
|
-
Install globally for easier usage:
|
|
11
|
-
|
|
12
7
|
```bash
|
|
13
8
|
npm install -g @smithery/cli
|
|
14
9
|
```
|
|
15
10
|
|
|
16
|
-
|
|
11
|
+
Requires Node.js 20+.
|
|
17
12
|
|
|
18
|
-
|
|
19
|
-
smithery <command>
|
|
20
|
-
```
|
|
13
|
+
## Commands
|
|
21
14
|
|
|
22
|
-
|
|
15
|
+
### Local Server Management
|
|
23
16
|
|
|
24
17
|
```bash
|
|
25
|
-
|
|
18
|
+
smithery install <server> # Install a server to an AI client
|
|
19
|
+
smithery uninstall <server> # Remove a server
|
|
20
|
+
smithery list # List installed servers
|
|
21
|
+
smithery search [term] # Search the Smithery registry
|
|
22
|
+
smithery inspect <server> # Interactive server testing
|
|
23
|
+
smithery run <server> # Run a server locally
|
|
26
24
|
```
|
|
27
25
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- `install <server>` - Install a server (interactive client selection)
|
|
31
|
-
- `--client <name>` - Specify the AI client (skips selection)
|
|
32
|
-
- `--config <json>` - Provide configuration data as JSON (skips prompts)
|
|
33
|
-
- `uninstall <server>` - Uninstall a server (interactive client selection)
|
|
34
|
-
- `--client <name>` - Specify the AI client (skips selection)
|
|
35
|
-
- `inspect <server-id>` - Inspect a server interactively
|
|
36
|
-
- `run <server-id>` - Run a server
|
|
37
|
-
- `--config <json>` - Provide configuration for the server
|
|
38
|
-
- `list` - List installed servers (interactive client selection)
|
|
39
|
-
- `--client <name>` - Specify the AI client (skips selection)
|
|
40
|
-
- `search [term]` - Search for servers in the Smithery registry (interactive)
|
|
41
|
-
- `login` - Login with an API key (interactive)
|
|
42
|
-
- `dev [entryFile]` - Start development server with hot-reload and tunnel
|
|
43
|
-
- `--port <port>` - Port to run the server on (default: 8081)
|
|
44
|
-
- `--key <apikey>` - Provide an API key
|
|
45
|
-
- `--no-open` - Don't automatically open the playground
|
|
46
|
-
- `--prompt <prompt>` - Initial message to start the playground with
|
|
47
|
-
- `-c, --config <path>` - Path to config file (default: auto-detect smithery.config.js)
|
|
48
|
-
- `build [entryFile]` - Build MCP server for production
|
|
49
|
-
- `-o, --out <outfile>` - Output file path (default: .smithery/index.cjs)
|
|
50
|
-
- `--transport <type>` - Transport type: shttp or stdio (default: shttp)
|
|
51
|
-
- `-c, --config <path>` - Path to config file (default: auto-detect smithery.config.js)
|
|
52
|
-
- `playground` - Open MCP playground in browser
|
|
53
|
-
- `--port <port>` - Port to expose (default: 8081)
|
|
54
|
-
- `--key <apikey>` - Provide an API key
|
|
55
|
-
- Can pass command after `--` separator
|
|
56
|
-
- `--help` - Show help message
|
|
57
|
-
- `--verbose` - Show detailed logs for debugging
|
|
58
|
-
|
|
59
|
-
### Examples
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
# Install a server (interactive client selection)
|
|
63
|
-
smithery install exa
|
|
64
|
-
|
|
65
|
-
# Install a server for specific client (skips selection)
|
|
66
|
-
smithery install exa --client claude
|
|
67
|
-
|
|
68
|
-
# Install a server with pre-configured data (skips prompts)
|
|
69
|
-
smithery install exa --client claude --config '{"exaApiKey":"you_api_key"}'
|
|
26
|
+
Options: `--client <name>` to skip client selection, `--config <json>` to provide configuration.
|
|
70
27
|
|
|
71
|
-
|
|
72
|
-
smithery uninstall exa
|
|
28
|
+
### Smithery Connect (Cloud MCP)
|
|
73
29
|
|
|
74
|
-
|
|
75
|
-
smithery uninstall exa --client claude
|
|
30
|
+
Manage cloud-hosted MCP servers via [Smithery Connect](https://smithery.ai).
|
|
76
31
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
smithery
|
|
32
|
+
```bash
|
|
33
|
+
# Namespace context (auto-created on first use)
|
|
34
|
+
smithery namespace list # List namespaces
|
|
35
|
+
smithery namespace use <name> # Set current namespace
|
|
36
|
+
smithery namespace show # Show current namespace
|
|
37
|
+
|
|
38
|
+
# Server connections
|
|
39
|
+
smithery connect add <url> # Add MCP server (--name for display name)
|
|
40
|
+
smithery connect list # List connected servers
|
|
41
|
+
smithery connect remove <id> # Remove a connection
|
|
42
|
+
|
|
43
|
+
# Tools
|
|
44
|
+
smithery connect tools [server] # List tools (all or for specific server)
|
|
45
|
+
smithery connect search <query> # Fuzzy search tools by intent
|
|
46
|
+
smithery connect call <id> [args] # Call a tool (format: server/tool-name)
|
|
47
|
+
```
|
|
82
48
|
|
|
83
|
-
|
|
84
|
-
smithery search "web search"
|
|
49
|
+
### Development
|
|
85
50
|
|
|
86
|
-
|
|
87
|
-
smithery
|
|
51
|
+
```bash
|
|
52
|
+
smithery login # Set API key
|
|
53
|
+
smithery dev [entry] # Dev server with hot-reload and tunnel
|
|
54
|
+
smithery build [entry] # Build for production
|
|
55
|
+
smithery playground # Open interactive testing UI
|
|
56
|
+
```
|
|
88
57
|
|
|
89
|
-
|
|
90
|
-
smithery inspect exa
|
|
58
|
+
## Examples
|
|
91
59
|
|
|
92
|
-
|
|
93
|
-
|
|
60
|
+
```bash
|
|
61
|
+
# Install a server
|
|
62
|
+
smithery install exa --client claude --config '{"exaApiKey":"xxx"}'
|
|
94
63
|
|
|
95
|
-
#
|
|
96
|
-
smithery
|
|
64
|
+
# Cloud MCP workflow
|
|
65
|
+
smithery connect add https://server.smithery.ai/github
|
|
66
|
+
smithery connect search "create issue"
|
|
67
|
+
smithery connect call github/create_issue '{"title":"Bug fix","body":"..."}'
|
|
97
68
|
|
|
98
|
-
#
|
|
99
|
-
smithery dev
|
|
69
|
+
# Development
|
|
100
70
|
smithery dev server.ts --port 3000
|
|
101
|
-
|
|
102
|
-
# Build server for production
|
|
103
|
-
smithery build
|
|
104
|
-
smithery build server.ts --out dist/server.cjs --transport stdio
|
|
105
|
-
|
|
106
|
-
# Open playground in browser
|
|
107
|
-
smithery playground
|
|
108
|
-
smithery playground --port 3001 -- node dist/server.js
|
|
109
|
-
|
|
110
|
-
# Show help menu
|
|
111
|
-
smithery --help
|
|
112
|
-
|
|
113
|
-
# Install with verbose logging for debugging
|
|
114
|
-
smithery install mcp-obsidian --client claude --verbose
|
|
71
|
+
smithery build --out dist/server.cjs
|
|
115
72
|
```
|
|
116
73
|
|
|
117
|
-
### Important Notes
|
|
118
|
-
|
|
119
|
-
- Use `login` command to set your Smithery API key (required for some operations)
|
|
120
|
-
- Remember to restart your AI client after installing or uninstalling servers
|
|
121
|
-
- Use the `inspect` command for interactive server testing
|
|
122
|
-
- Run without arguments to see the help menu
|
|
123
|
-
- Use `--verbose` flag for detailed logs when troubleshooting
|
|
124
|
-
- The `dev` command provides hot-reload for MCP server development
|
|
125
|
-
- Use `playground` to test your MCP servers in an interactive web interface
|
|
126
|
-
|
|
127
74
|
## Development
|
|
128
75
|
|
|
129
|
-
This guide will help you get started with developing for @smithery/cli.
|
|
130
|
-
|
|
131
|
-
### Getting Started
|
|
132
|
-
|
|
133
|
-
1. Clone the repository:
|
|
134
|
-
```bash
|
|
135
|
-
git clone https://github.com/smithery-ai/cli
|
|
136
|
-
cd cli
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
2. Install dependencies:
|
|
140
|
-
```bash
|
|
141
|
-
npm install
|
|
142
|
-
```
|
|
143
|
-
|
|
144
|
-
3. Build the project:
|
|
145
|
-
```bash
|
|
146
|
-
npm run build
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Development Commands
|
|
150
|
-
|
|
151
76
|
```bash
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
# Search for servers
|
|
156
|
-
npx . search obsidian
|
|
157
|
-
|
|
158
|
-
# Inspect a specific server
|
|
159
|
-
npx . inspect <server-id>
|
|
160
|
-
|
|
161
|
-
# Install a server
|
|
162
|
-
npx . install <server-name> --client <client-name>
|
|
163
|
-
|
|
164
|
-
# Run with verbose logging
|
|
165
|
-
npx . <command> --verbose
|
|
77
|
+
git clone https://github.com/smithery-ai/cli
|
|
78
|
+
cd cli && npm install && npm run build
|
|
79
|
+
npx . --help
|
|
166
80
|
```
|
|
167
81
|
|
|
168
82
|
## Contributing
|
|
169
83
|
|
|
170
|
-
Contributions
|
|
84
|
+
Contributions welcome! Please submit a Pull Request.
|