1.2.10 • Published 25 days ago

@smithery/cli v1.2.10

Weekly downloads
-
License
-
Repository
github
Last release
25 days ago

Smithery CLI NPM Version NPM Downloads

The Smithery registry installer and manager for Model Context Protocol (MCP) servers, designed to be client-agnostic.

Requirements

  • NodeJS version 18 or above

Usage

npx @smithery/cli <command>

Available Commands

  • install <package> - Install a package
    • --client <name> - Specify the AI client
    • --config <json> - Provide configuration data as JSON (skips prompts)
  • uninstall <package> - Uninstall a package
    • --client <name> - Specify the AI client
  • inspect <server-id> - Inspect a server interactively
  • run <server-id> - Run a server
    • --config <json> - Provide configuration for the server
  • list clients - List available clients
  • list servers --client <name> - List installed servers for specific AI client
  • login - Login with an API key (interactive)
  • dev [entryFile] - Start development server with hot-reload and tunnel
    • --port <port> - Port to run the server on (default: 8181)
    • --key <apikey> - Provide an API key
    • --no-open - Don't automatically open the playground
    • --prompt <prompt> - Initial message to start the playground with
    • -c, --config <path> - Path to config file (default: auto-detect smithery.config.js)
  • build [entryFile] - Build MCP server for production
    • -o, --out <outfile> - Output file path (default: .smithery/index.cjs)
    • --transport <type> - Transport type: shttp or stdio (default: shttp)
    • -c, --config <path> - Path to config file (default: auto-detect smithery.config.js)
  • playground - Open MCP playground in browser
    • --port <port> - Port to expose (default: 3000)
    • --key <apikey> - Provide an API key
    • Can pass command after -- separator
  • --help - Show help message
  • --verbose - Show detailed logs for debugging

Examples

# Install a server (requires --client flag)
npx @smithery/cli install mcp-obsidian --client claude

# Install a server with pre-configured data (skips prompts)
npx @smithery/cli install mcp-obsidian --client claude --config '{"vaultPath":"path/to/vault"}'

# Remove a server
npx @smithery/cli uninstall mcp-obsidian --client claude

# List available clients
npx @smithery/cli list clients

# List installed servers for claude
npx @smithery/cli list servers --client claude

# Inspect a specific server from smithery's registry
npx @smithery/cli inspect mcp-obsidian

# Run a server with configuration
npx @smithery/cli run mcp-obsidian --config '{"key":"value"}'

# Login and set API key
npx @smithery/cli login

# Start development server with hot-reload
npx @smithery/cli dev
npx @smithery/cli dev server.ts --port 3000

# Build server for production
npx @smithery/cli build
npx @smithery/cli build server.ts --out dist/server.cjs --transport stdio

# Open playground in browser
npx @smithery/cli playground
npx @smithery/cli playground --port 3001 -- node dist/server.js

# Show help menu
npx @smithery/cli --help

# Install with verbose logging for debugging
npx @smithery/cli install mcp-obsidian --client claude --verbose

Important Notes

  • Use login command to set your Smithery API key (required for some operations)
  • Remember to restart your AI client after installing or uninstalling servers
  • Use the inspect command for interactive server testing
  • Run without arguments to see the help menu
  • Use --verbose flag for detailed logs when troubleshooting
  • The dev command provides hot-reload for MCP server development
  • Use playground to test your MCP servers in an interactive web interface

Development

This guide will help you get started with developing for @smithery/cli.

Getting Started

  1. Clone the repository:

    git clone https://github.com/smithery-ai/cli
    cd cli
  2. Install dependencies:

    npm install
  3. Build the project:

    npm run build

Development Commands

# List all servers
npx . list servers

# Inspect a specific server
npx . inspect <server-id>

# Install a server
npx . install <server-name> --client <client-name>

# Run with verbose logging
npx . <command> --verbose

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

1.2.10

25 days ago

1.2.9

28 days ago

1.2.8

29 days ago

1.2.7

1 month ago

1.2.6

1 month ago

1.2.5

1 month ago

1.2.4

1 month ago

1.2.3

1 month ago

1.2.2

1 month ago

1.2.2-beta.5

1 month ago

1.2.2-beta.4

1 month ago

1.2.2-beta.3

1 month ago

1.2.2-beta.2

1 month ago

1.2.2-beta.1

1 month ago

1.2.2-beta.0

1 month ago

1.2.1

1 month ago

1.1.89

2 months ago

1.1.88

2 months ago

1.1.87

2 months ago

1.1.86

2 months ago

1.1.85

2 months ago

1.1.84

2 months ago

1.1.83

2 months ago

1.1.82

2 months ago

1.1.81

2 months ago

1.1.80

2 months ago

1.1.79

2 months ago

1.1.78

2 months ago

1.1.77

2 months ago

1.1.76

2 months ago

1.1.75

2 months ago

1.1.74

2 months ago

1.1.73

2 months ago

1.1.72

2 months ago

1.1.71

3 months ago

1.1.70

3 months ago

1.1.69

3 months ago

1.1.68

3 months ago

1.1.67

3 months ago

1.1.66

3 months ago

1.1.65

3 months ago

1.1.64

3 months ago

1.1.63

3 months ago

1.1.62

3 months ago

1.1.61

3 months ago

1.1.60

3 months ago

1.1.59

3 months ago

1.1.58

3 months ago

1.1.57

3 months ago

1.1.56

3 months ago

1.1.55

3 months ago

1.1.54

3 months ago

1.1.53

3 months ago

1.1.52

3 months ago

1.1.51

3 months ago

1.1.50

3 months ago

1.1.49

4 months ago

1.1.48

4 months ago

1.1.47

4 months ago

1.1.46

4 months ago

1.1.45

4 months ago

1.1.44

4 months ago

1.1.43

4 months ago

1.1.42

4 months ago

1.1.41

4 months ago

1.1.40

4 months ago

1.1.39

4 months ago

1.1.38

4 months ago

1.1.37

4 months ago

1.1.36

4 months ago

1.1.35

4 months ago

1.1.34

4 months ago

1.1.33

4 months ago

1.1.32

4 months ago

1.1.31

4 months ago

1.1.30

4 months ago

1.1.29

4 months ago

1.1.28

4 months ago

1.1.27

4 months ago

1.1.26

4 months ago

1.1.25

4 months ago

1.1.24

4 months ago

1.1.23

4 months ago

1.1.22

4 months ago

1.1.21

4 months ago

1.1.20

4 months ago

1.1.19

4 months ago

1.1.18

4 months ago

1.1.17

5 months ago

1.1.16

5 months ago

1.1.15

5 months ago

1.1.14

5 months ago

1.1.13

5 months ago

1.1.12

5 months ago

1.1.11

5 months ago

1.1.10

5 months ago

1.1.9

5 months ago

1.1.8

5 months ago

1.1.7

5 months ago

1.1.6

5 months ago

1.1.5

5 months ago

1.1.4

5 months ago

1.1.3

5 months ago

1.1.2

5 months ago

1.1.1

5 months ago

1.1.0

5 months ago

1.0.13

5 months ago

1.0.12

5 months ago

1.0.11

5 months ago

1.0.10

5 months ago

1.0.9

5 months ago

1.0.8

5 months ago

1.0.7

5 months ago

1.0.6

6 months ago

1.0.5

6 months ago

1.0.4

6 months ago

1.0.3

6 months ago

1.0.2

6 months ago

1.0.1

6 months ago

0.0.25

7 months ago

0.0.24

7 months ago

0.0.23

7 months ago

0.0.22

7 months ago

0.0.21

7 months ago

0.0.20

7 months ago

0.0.19

7 months ago

0.0.18

7 months ago

0.0.17

7 months ago

0.0.16

7 months ago

0.0.15

7 months ago

0.0.14

7 months ago

0.0.13

7 months ago

0.0.12

7 months ago

0.0.11

7 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.7

7 months ago

0.0.3

7 months ago