Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/.vitepress/config/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ function sidebar(): DefaultTheme.Sidebar {
text: 'mcp',
link: '/commands/mcp/',
items: [
{ text: 'install', link: '/commands/mcp/install' },
{ text: 'uninstall', link: '/commands/mcp/uninstall' },
{ text: 'search', link: '/commands/mcp/search' },
{ text: 'add', link: '/commands/mcp/add' },
{ text: 'remove', link: '/commands/mcp/remove' },
{ text: 'update', link: '/commands/mcp/update' },
Expand All @@ -159,6 +162,11 @@ function sidebar(): DefaultTheme.Sidebar {
{ text: 'tokens', link: '/commands/mcp/tokens' },
],
},
{
text: 'registry',
link: '/commands/registry/',
items: [{ text: 'search', link: '/commands/registry/search' }],
},
{
text: 'preset',
link: '/commands/preset/',
Expand Down Expand Up @@ -208,6 +216,16 @@ function sidebar(): DefaultTheme.Sidebar {
{ text: 'Pagination', link: '/reference/pagination' },
],
},
{
text: 'Internal Tools',
link: '/reference/internal-tools/',
items: [
{ text: 'Overview', link: '/reference/internal-tools/' },
{ text: 'Discovery Tools', link: '/reference/internal-tools/discovery' },
{ text: 'Installation Tools', link: '/reference/internal-tools/installation' },
{ text: 'Management Tools', link: '/reference/internal-tools/management' },
],
},
{
text: 'Configuration',
items: [
Expand Down
18 changes: 18 additions & 0 deletions docs/.vitepress/config/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ function sidebar(): DefaultTheme.Sidebar {
text: 'mcp',
link: '/zh/commands/mcp/',
items: [
{ text: 'install', link: '/zh/commands/mcp/install' },
{ text: 'uninstall', link: '/zh/commands/mcp/uninstall' },
{ text: 'search', link: '/zh/commands/mcp/search' },
{ text: 'add', link: '/zh/commands/mcp/add' },
{ text: 'remove', link: '/zh/commands/mcp/remove' },
{ text: 'update', link: '/zh/commands/mcp/update' },
Expand All @@ -169,6 +172,11 @@ function sidebar(): DefaultTheme.Sidebar {
{ text: 'tokens', link: '/zh/commands/mcp/tokens' },
],
},
{
text: 'registry',
link: '/zh/commands/registry/',
items: [{ text: 'search', link: '/zh/commands/registry/search' }],
},
{
text: 'preset',
link: '/zh/commands/preset/',
Expand Down Expand Up @@ -215,6 +223,16 @@ function sidebar(): DefaultTheme.Sidebar {
text: 'API 参考',
items: [{ text: '健康检查 API', link: '/zh/reference/health-check' }],
},
{
text: '内部工具',
link: '/zh/reference/internal-tools/',
items: [
{ text: '概述', link: '/zh/reference/internal-tools/' },
{ text: '发现工具', link: '/zh/reference/internal-tools/discovery' },
{ text: '安装工具', link: '/zh/reference/internal-tools/installation' },
{ text: '管理工具', link: '/zh/reference/internal-tools/management' },
],
},
{
text: '配置',
items: [
Expand Down
38 changes: 34 additions & 4 deletions docs/en/commands/mcp/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,44 @@ head:

Manage MCP server configurations within your 1MCP instance.

These commands allow you to add, remove, update, and manage the lifecycle of the MCP servers that 1MCP will proxy.
These commands allow you to discover, install, configure, and manage the lifecycle of MCP servers through both manual configuration and the 1MCP registry.

For a detailed guide on server management, including transport types and best practices, please see the **[Server Management Guide](../../guide/essentials/server-management)**.
For a detailed guide on server management, including registry-based installation and best practices, please see the **[Server Management Guide](../../guide/essentials/server-management)**.

## Commands
## Registry-Based Commands (Recommended)

### [install](./install)

Install MCP servers from the 1MCP registry with automatic dependency resolution and version management.

```bash
npx -y @1mcp/agent mcp install filesystem
npx -y @1mcp/agent mcp install --interactive
```

### [uninstall](./uninstall)

Safely remove MCP servers with automatic backup creation and dependency validation.

```bash
npx -y @1mcp/agent mcp uninstall filesystem
npx -y @1mcp/agent mcp uninstall test-server --force
```

### [search](./search)

Search the MCP registry for available servers.

```bash
npx -y @1mcp/agent mcp search database
npx -y @1mcp/agent mcp search --category=filesystem
```

## Manual Configuration Commands

### [add](./add)

Add a new MCP server to the configuration.
Manually add a new MCP server to the configuration.

```bash
npx -y @1mcp/agent mcp add my-server --type=stdio --command="node server.js"
Expand Down Expand Up @@ -85,4 +114,5 @@ npx -y @1mcp/agent mcp tokens --model=gpt-3.5-turbo --format=summary
## See Also

- **[Server Management Guide](../../guide/essentials/server-management)**
- **[Registry Commands](../registry/)** - Server discovery and installation
- **[App Consolidation Guide](../../guide/integrations/app-consolidation)**
227 changes: 227 additions & 0 deletions docs/en/commands/mcp/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
---
title: mcp install
description: Install MCP servers from the 1MCP registry
head:
- [
'meta',
{
name: 'keywords',
content: 'MCP install,registry server installation,interactive installation,server discovery',
},
]
- ['meta', { property: 'og:title', content: '1MCP Install Command - Registry Server Installation' }]
- [
'meta',
{
property: 'og:description',
content: 'Install MCP servers from the registry with interactive installation and version management.',
},
]
---

# mcp install

Install MCP servers from the 1MCP registry with automatic dependency resolution and version management. The install command provides both interactive installation and direct server installation by name.

> **Note**: This is the recommended way to add MCP servers to your configuration. For manual configuration, see the [add command](add.md).

## Synopsis

Launch interactive installation wizard:

```bash
npx -y @1mcp/agent mcp install
```

Install a server by name from the registry:

```bash
npx -y @1mcp/agent mcp install <server-name>
```

Install with specific version:

```bash
npx -y @1mcp/agent mcp install <server-name>@<version>
```

Preview installation without making changes:

```bash
npx -y @1mcp/agent mcp install <server-name> --dry-run
```

Force reinstallation:

```bash
npx -y @1mcp/agent mcp install <server-name> --force
```

## Arguments

- **`<server-name>`** (optional)
- Server name or name@version to install. Can include full registry ID (e.g., `io.github.user/filesystem`).
- **Required**: No

## Global Options

This command supports all global options:

- **`--config, -c <path>`** - Specify configuration file path
- **`--config-dir, -d <path>`** - Path to the config directory

## Command-Specific Options

- **`--interactive, -i`**
- Launch interactive installation wizard. This is the default when no server name is provided.

- **`--force`**
- Force installation even if the server already exists. Overwrites existing configuration.

- **`--dry-run`**
- Show what would be installed without making any changes to your configuration.

- **`--verbose, -v`**
- Display detailed installation information.

## Examples

### Basic Server Installation

Install the latest version of the filesystem server:

```bash
npx -y @1mcp/agent mcp install filesystem
```

Install a specific version:

```bash
npx -y @1mcp/agent mcp install [email protected]
```

### Interactive Installation

Launch the interactive installation wizard to browse and install servers:

```bash
npx -y @1mcp/agent mcp install
```

Or explicitly request interactive mode:

```bash
npx -y @1mcp/agent mcp install --interactive
```

The interactive mode will guide you through:

1. **Server Discovery** - Browse available servers by category
2. **Version Selection** - Choose compatible versions
3. **Configuration** - Set server-specific options
4. **Installation** - Confirm and install with dependencies

### Installation Preview

Preview what would be installed without making changes:

```bash
npx -y @1mcp/agent mcp install filesystem --dry-run

# Output:
# 📦 Installation Preview: filesystem@latest
# Server: filesystem - File system access and management
# Use without --dry-run to perform actual installation
```

### Force Reinstallation

Replace an existing server configuration:

```bash
npx -y @1mcp/agent mcp install filesystem --force
```

### Verbose Installation

See detailed installation process including dependency resolution:

```bash
npx -y @1mcp/agent mcp install airtable --verbose

# Output:
# 🔍 Resolving dependencies for [email protected]...
# ✓ Dependency check complete
# 📥 Downloading server metadata...
# ✓ Validating server configuration
# ⚙️ Generating configuration...
# ✓ Server installed successfully as 'airtable'
```

## Interactive Workflow

When using `--interactive` or running without arguments, the install command launches a guided wizard that helps you:

1. **Search** for servers by name or browse categories
2. **Select** a server and review its capabilities
3. **Choose** a version (stable vs latest)
4. **Configure** server-specific parameters
5. **Confirm** installation

## Registry Features

- **Server Discovery**: Search and browse available MCP servers
- **Version Management**: Install specific versions with compatibility checking
- **Dependency Resolution**: Automatically handle required dependencies
- **Security Validation**: Verify server integrity and authenticity

## Configuration Output

Installed servers are added to your `mcp.json` configuration with registry metadata:

```json
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user"],
"tags": ["filesystem", "files", "local"],
"_registry": {
"name": "filesystem",
"version": "1.2.0",
"installedAt": "2024-01-15T10:30:00Z",
"source": "1mcp-registry"
}
}
}
}
```

## Error Handling

The install command provides helpful error messages for common scenarios:

```bash
# Server not found
npx -y @1mcp/agent mcp install nonexistent-server
# Error: Server 'nonexistent-server' not found in registry
# Suggestions: filesystem, git, database, search

# Version not available
npx -y @1mcp/agent mcp install [email protected]
# Error: Version 99.99.99 not available for 'filesystem'
# Available versions: 1.2.0, 1.1.0, 1.0.0

# Already installed
npx -y @1mcp/agent mcp install filesystem
# Error: Server 'filesystem' already installed
# Use --force to reinstall or mcp update to upgrade
```

## See Also

- **[Registry Search](../registry/search.md)** - Search the registry for available servers
- **[mcp uninstall](uninstall.md)** - Remove installed servers
- **[mcp update](update.md)** - Update installed servers
- **[Server Management Guide](../../guide/essentials/server-management.md)** - Complete server management overview
- **[Registry Commands](../registry/)** - Full registry command documentation
Loading