104 lines
2.1 KiB
Markdown
104 lines
2.1 KiB
Markdown
|
|
# Site Manager MCP Server
|
||
|
|
|
||
|
|
Model Context Protocol (MCP) server for Ubiquiti UniFi Site Manager Cloud API management.
|
||
|
|
|
||
|
|
## Features
|
||
|
|
|
||
|
|
- MCP integration for AI assistants (Claude Desktop, etc.)
|
||
|
|
- Access to Site Manager Cloud API endpoints
|
||
|
|
- Tools for managing hosts, sites, devices, metrics, and SD-WAN configurations
|
||
|
|
- Type-safe API interactions
|
||
|
|
|
||
|
|
## Installation
|
||
|
|
|
||
|
|
```bash
|
||
|
|
pnpm install
|
||
|
|
pnpm build
|
||
|
|
```
|
||
|
|
|
||
|
|
## Configuration
|
||
|
|
|
||
|
|
Create a `~/.env` file with:
|
||
|
|
|
||
|
|
```bash
|
||
|
|
SITE_MANAGER_API_KEY=your-api-key-here
|
||
|
|
SITE_MANAGER_BASE_URL=https://api.ui.com/v1 # Optional
|
||
|
|
```
|
||
|
|
|
||
|
|
## Usage
|
||
|
|
|
||
|
|
### Starting the Server
|
||
|
|
|
||
|
|
```bash
|
||
|
|
pnpm start
|
||
|
|
```
|
||
|
|
|
||
|
|
### Development Mode
|
||
|
|
|
||
|
|
```bash
|
||
|
|
pnpm dev
|
||
|
|
```
|
||
|
|
|
||
|
|
## Available Tools
|
||
|
|
|
||
|
|
The server provides the following MCP tools:
|
||
|
|
|
||
|
|
- `site_manager_list_hosts` - List all hosts
|
||
|
|
- `site_manager_list_sites` - List all sites
|
||
|
|
- `site_manager_list_devices` - List all devices
|
||
|
|
- `site_manager_get_isp_metrics` - Get ISP metrics
|
||
|
|
- `site_manager_list_sdwan_configs` - List SD-WAN configurations
|
||
|
|
- `site_manager_get_sdwan_config` - Get SD-WAN configuration by ID
|
||
|
|
- `site_manager_get_sdwan_config_status` - Get SD-WAN configuration status by ID
|
||
|
|
|
||
|
|
## Claude Desktop Integration
|
||
|
|
|
||
|
|
Add to your Claude Desktop configuration (`claude_desktop_config.json`):
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"mcpServers": {
|
||
|
|
"site-manager": {
|
||
|
|
"command": "node",
|
||
|
|
"args": [
|
||
|
|
"/path/to/proxmox/mcp-site-manager/dist/index.js"
|
||
|
|
],
|
||
|
|
"env": {
|
||
|
|
"SITE_MANAGER_API_KEY": "your-api-key-here"
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
Or use environment variables from `~/.env`:
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"mcpServers": {
|
||
|
|
"site-manager": {
|
||
|
|
"command": "node",
|
||
|
|
"args": [
|
||
|
|
"/path/to/proxmox/mcp-site-manager/dist/index.js"
|
||
|
|
]
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
## Getting an API Key
|
||
|
|
|
||
|
|
1. Sign in to the UniFi Site Manager at [unifi.ui.com](https://unifi.ui.com)
|
||
|
|
2. Navigate to the API section from the left navigation bar
|
||
|
|
3. Select "Create API Key"
|
||
|
|
4. Copy the generated key and store it securely
|
||
|
|
|
||
|
|
## Documentation
|
||
|
|
|
||
|
|
- [Site Manager API Library](../site-manager-api/README.md)
|
||
|
|
- [Official Site Manager API Documentation](https://developer.ui.com/site-manager-api/gettingstarted)
|
||
|
|
|
||
|
|
## License
|
||
|
|
|
||
|
|
MIT
|