CLI Commands
server
Theserver command manages the MCP gateway server for local model hosting and testing.
Usage
Description
Theserver command provides a suite of subcommands for managing the MCP gateway server. This server acts as a local proxy for MCP model servers, allowing you to test models and applications locally before deploying them to the cloud.
The gateway server:
- Manages local MCP model server instances
- Routes API requests to the appropriate model server
- Provides a unified endpoint for your applications
- Handles authentication and request validation
Subcommands
| Subcommand | Description |
|---|---|
start | Start the MCP gateway server |
stop | Stop the MCP gateway server |
status | Show the status of the MCP gateway server |
restart | Restart the MCP gateway server |
config | Show or modify the server configuration |
Common Options
| Option | Description |
|---|---|
--help | Show help message for the server command or subcommand |
Examples
Start the Gateway Server
Check Server Status
Stop the Server
Server Configuration
Output
For thestart command:
status command:
stop command:
Server Configuration
The server uses the configuration from your Cogni+ config file, which can be modified with thecogni init command or directly with cogni server config.
Key configuration options include:
- Port number (default: 8080)
- Service idle timeout (default: 300 seconds)
- Docker registry URL
- Log level
Related Commands
cogni logs- View logs from running serverscogni init- Configure server settings during CLI setup
Tips
- The gateway server must be running for most local development tasks
- For production deployments, publish your models to the Cogni+ Platform instead
- If port conflicts occur, use
cogni server start --portto specify a different port - Use
cogni server restartwhen changing configuration for the changes to take effect