> ## Documentation Index
> Fetch the complete documentation index at: https://smithery.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Smithery CLI

> Use the Smithery CLI to search, connect, and manage MCP servers and skills from the command line.

<Card title="View the Smithery CLI on GitHub" icon="github" href="https://github.com/smithery-ai/cli">
  The Smithery CLI connects your agents to thousands of skills and MCP servers
  directly from the command line.
</Card>

## Installation

```bash theme={null}
npm install -g smithery@latest
```

Requires Node.js 20+.

## Examples

```bash theme={null}
# Show the help menu
smithery --help

# Authenticate with Smithery
smithery auth login

# Search for MCP servers
smithery mcp search "github"

# Add an MCP server to a local client (e.g., Claude Desktop)
smithery mcp add exa --client claude

# Add an MCP server as a remote Smithery connection
smithery mcp add https://server.smithery.ai/exa --id exa

# List tools from your connected MCP servers
smithery tool list

# Call a tool
smithery tool call exa search '{"query": "latest news about MCP"}'

# Search and add skills
smithery skill search "code review"
smithery skill add anthropics/frontend-design --agent claude-code
```

## Reference

### MCP Servers

```bash theme={null}
smithery mcp search [term]              # Search the Smithery registry
smithery mcp add <url>                  # Add an MCP connection (remote by default)
smithery mcp add <url> --client <name>  # Add to a local client (e.g., claude, cursor)
smithery mcp list                       # List your connections
smithery mcp remove <ids...>            # Remove connections
smithery mcp get <id>                   # Get connection details
smithery mcp update <id>               # Update a connection
smithery mcp publish <url> -n <name>    # Publish a URL-based MCP server
smithery mcp publish <bundle.mcpb> -n <name>  # Publish an MCPB bundle
```

### Tools

Interact with tools from MCP servers connected via `smithery mcp`.

```bash theme={null}
smithery tool list [connection]                    # List tools from your connected MCP servers
smithery tool find [query]                         # Search tools by name or intent
smithery tool get <connection> <tool>              # Show full details for one tool
smithery tool call <connection> <tool> [args]      # Call a tool
```

### Skills

Browse and add skills from the [Smithery Skills Registry](https://smithery.ai/skills).

```bash theme={null}
smithery skill search [query]                      # Search skills
smithery skill add <skill> --agent <name>          # Add a skill
```

### Auth

```bash theme={null}
smithery auth login                     # Login with Smithery (OAuth)
smithery auth logout                    # Log out
smithery auth whoami                    # Check current user
smithery auth token                     # Mint a service token
```

### Namespaces

```bash theme={null}
smithery namespace list                 # List your namespaces
smithery namespace use <name>           # Set current namespace
```

### Global Flags

* `--json` - Output as JSON (auto-detected in non-TTY environments)
* `--table` - Output as table
* `--verbose` - Show detailed logs for debugging
* `--help` - Show help message

### Examples

```bash theme={null}
# Add an MCP server to Claude Desktop
smithery mcp add mcp-obsidian --client claude

# Add with pre-configured data (skips prompts)
smithery mcp add mcp-obsidian --client claude --config '{"vaultPath":"path/to/vault"}'

# Remove a server from a client
smithery mcp remove mcp-obsidian --client claude

# Search for MCP servers with JSON output
smithery --json mcp search "database"

# List tools from a specific connection
smithery tool list my-github

# Find tools by intent
smithery tool find "create issue"

# Call a tool with JSON arguments
smithery tool call my-github create_issue '{"title":"Bug fix","body":"..."}'

# Login and check auth
smithery auth login
smithery auth whoami

# Publish your MCP server
smithery mcp publish "https://my-server.com" -n myorg/my-server

# Publish an MCPB bundle
smithery mcp publish ./server.mcpb -n myorg/my-server

# Show help
smithery --help
```

### Important Notes

* Use `auth login` to authenticate with Smithery (required for some operations)
* Remember to restart your AI client after adding or removing servers
* Use `--verbose` flag for detailed logs when troubleshooting
* Use `--json` flag for machine-readable output
* `mcp publish` accepts either a public MCP URL or a local `.mcpb` bundle
