Metadata-Version: 2.4
Name: of-mcp
Version: 0.1.1
Summary: CLI for managing MCP Gateway workspaces, backends, and agents
Home-page: https://github.com/orangefennec/mcp-gateway
Author: OrangeFennec Inc.
Author-email: "OrangeFennec Inc." <support@mcpgw.io>
License: MIT
Project-URL: Homepage, https://mcpgw.io
Project-URL: Repository, https://github.com/orangefennec/mcp-gateway
Project-URL: Documentation, https://docs.mcpgw.io
Keywords: mcp,gateway,cli,workspace
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: click>=8.0.0
Requires-Dist: requests>=2.25.0
Dynamic: author
Dynamic: home-page
Dynamic: requires-python

# MCP Gateway CLI

> Enterprise-grade Model Context Protocol management for Claude Desktop

[![PyPI version](https://badge.fury.io/py/of-mcp.svg)](https://pypi.org/project/of-mcp/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

The `mcpgw` CLI helps you manage MCP servers, workspaces, and configurations for Claude Desktop with enterprise security features.

## 🚀 Quick Start

### pip (Recommended)

```bash
pip install of-mcp
```

**Note:** The package name is `of-mcp` but the command is `mcpgw`.

After installation, add to your PATH (if needed):
```bash
# Add to ~/.zshrc or ~/.bashrc
export PATH="$HOME/Library/Python/3.12/bin:$PATH"
```

### Homebrew (macOS/Linux)

```bash
# Add tap
brew tap orangefennec/tap
# Install
brew install mcpgw
```

### From source

```bash
cd cli
pip install -e .
```

Requirements: Python 3.9+

## Quick Start

### 1. Login

```bash
mcpgw auth login
# Enter your email and password
```

### 2. List Workspaces

```bash
mcpgw workspace list
```

### 3. Create Workspace

```bash
mcpgw workspace create --name "Production"
```

### 4. Add Backend

```bash
mcpgw backend add WORKSPACE_ID --name "Gmail" --url "http://gmail-mcp:9000"
```

### 5. Create Agent

```bash
mcpgw agent create WORKSPACE_ID --name "My Agent"
# Save the API key shown!
```

## Commands

### Authentication

```bash
mcpgw auth login              # Login
mcpgw auth logout             # Logout
mcpgw auth whoami             # Show current user
```

### Workspaces

```bash
mcpgw workspace list                    # List all workspaces
mcpgw workspace get WORKSPACE_ID        # Get workspace details
mcpgw workspace create                  # Create new workspace
mcpgw workspace delete WORKSPACE_ID     # Delete workspace
```

### Backends

```bash
mcpgw backend list WORKSPACE_ID                           # List backends
mcpgw backend add WORKSPACE_ID --name X --url Y           # Add backend
mcpgw backend remove WORKSPACE_ID BACKEND_ID              # Remove backend
```

### Backend Catalog

```bash
mcpgw catalog list                                  # Browse catalog
mcpgw catalog list --category email                 # Filter by category
mcpgw catalog enable WORKSPACE_ID BACKEND_ID        # Enable from catalog
```

### Agents

```bash
mcpgw agent list WORKSPACE_ID                 # List agents
mcpgw agent create WORKSPACE_ID --name X      # Create agent
```

## Configuration

Config stored in `~/.mcpgw/config.json`

### Environment Variables

- `MCPGW_API_URL` - API base URL (default: https://api.mcpgw.io/api/v1)
- `MCPGW_PROFILE` - Configuration profile to use
- `MCPGW_TOKEN` - Authentication token (for CI/CD)

### Profiles

Manage multiple environments:

```bash
# Create profiles for different environments
mcpgw profile create staging --api-url https://staging.mcpgw.io/api/v1
mcpgw profile create local --api-url http://localhost:8000/api/v1

# List profiles
mcpgw profile list

# Switch between profiles
mcpgw profile use staging

# Show current profile
mcpgw profile current
```

## Examples

### Setup a new workspace

```bash
# Login
mcpgw auth login

# Create workspace
mcpgw workspace create --name "Production"

# Enable Gmail backend
WORKSPACE_ID="ws_abc123"
mcpgw catalog enable $WORKSPACE_ID backend_gmail

# Create an agent
mcpgw agent create $WORKSPACE_ID --name "Email Agent"
```

### Get workspace info as JSON

```bash
mcpgw workspace list --json-output | jq '.[0]'
```

## Development

```bash
# Install in development mode
cd cli
pip install -e .

# Run tests
pytest

# Build distribution
pipx run build

# Upload to PyPI
pipx run twine upload dist/*
```

## 📖 Documentation

- **Environment Guide**: [ENVIRONMENT_GUIDE.md](ENVIRONMENT_GUIDE.md) - Complete guide for multi-environment management
- **Publishing Guide**: [PUBLISHING.md](PUBLISHING.md) - How to publish to PyPI
- **Distribution**: [DISTRIBUTION.md](DISTRIBUTION.md) - Homebrew and package distribution

## 🔗 Links

- **PyPI Package**: https://pypi.org/project/of-mcp/
- **Documentation**: https://docs.mcpgw.io
- **Website**: https://mcpgw.io
- **GitHub**: https://github.com/orangefennec/mcp-gateway
- **Support**: support@mcpgw.io

## 📝 License

MIT License - see [LICENSE](../LICENSE) for details

## 🤝 Contributing

Contributions welcome! See [CONTRIBUTING.md](../CONTRIBUTING.md)

---

**Made with ❤️ by [Orange Fennec](https://orangefennec.com)**
