Skip to main content

CLI Commands

mcp

The mcp command manages individual MCP model servers in your local environment.

Usage

cogni mcp [COMMAND] [OPTIONS] [MODEL_ID]

Description

The mcp command provides a suite of subcommands for managing MCP (Model Container Protocol) servers. These are the actual model servers that run your AI models, as opposed to the gateway server that routes requests to them. With this command, you can:
  • Start and stop specific model servers
  • Configure model parameters
  • View model status and information
  • Manage multiple versions of the same model

Subcommands

SubcommandDescription
startStart an MCP model server
stopStop a running MCP model server
restartRestart an MCP model server
statusShow the status of MCP model servers
listList installed MCP models
infoShow detailed information about a model
configShow or modify model configuration

Common Options

OptionDescription
--helpShow help message for the mcp command or subcommand

Examples

Start a Model Server

# Start a model server with default settings
cogni mcp start gpt4-mini

# Start with custom parameters
cogni mcp start --param temperature=0.7 --param max_tokens=2048 gpt4-mini

# Start a specific version
cogni mcp start --version 1.2.3 gpt4-mini

Stop a Model Server

# Stop a running model server
cogni mcp stop gpt4-mini

# Force stop a model server
cogni mcp stop --force gpt4-mini

List Models

# List all installed models
cogni mcp list

# List running models
cogni mcp list --running

Model Information

# Show detailed model information
cogni mcp info gpt4-mini

Output

For the start command:
Starting MCP server: gpt4-mini (v1.2.3)
Loading model...
Model loaded successfully
Server running at http://localhost:8000
Registered with gateway server
Model API available at http://localhost:8080/v1/gpt4-mini/completions
For the list command:
Installed MCP Models:
✅ gpt4-mini (v1.2.3) - Running
✅ llama3-70b (v2.0.1) - Running
❌ stable-diffusion-xl (v1.0.0) - Stopped
For the info command:
Model: gpt4-mini
Version: 1.2.3
Status: Running
PID: 12345
Port: 8001
API Endpoints:
  - /v1/completions
  - /v1/chat/completions
  - /v1/embeddings
Parameters:
  - temperature: 0.7
  - max_tokens: 2048
System Requirements:
  - CPU: 4 cores
  - RAM: 8 GB
  - Disk: 5 GB

Model Configuration

Each model has its own configuration file located at ~/.cogni/models/<model-id>/config.json. This file contains:
  • Model parameters (temperature, context length, etc.)
  • Resource allocations (CPU, memory, GPU)
  • API endpoint customizations
  • Version information
You can modify these settings with the cogni mcp config command.

Tips

  • The gateway server must be running before starting model servers
  • Models can be resource-intensive; check the model info for requirements
  • Use model parameters to customize behavior for your specific use case
  • For production use, consider publishing your models to the Cogni+ Platform