vers mcp
Run the MCP (Model Context Protocol) server to expose vers tools to AI agents.
Usage
vers mcp serve # Start MCP server with stdio transport
vers mcp serve --transport http # Start MCP server with HTTP transport
vers mcp serve --addr :8080 # Use custom address for HTTP transport
Subcommands
serve
Start the MCP server so agent clients can call vers operations as tools.
Options
| Option | Default | Description |
|---|
--transport | ”stdio” | Transport type: stdio or http |
--addr | ”:3920” | Listen address for HTTP transport |
--allow-insecure-set-key | false | Allow setting API key via tool (local dev only) |
Examples
Start with stdio transport (default)
This is the standard mode for use with AI agents that communicate via stdin/stdout.
Start with HTTP transport
vers mcp serve --transport http
Starting MCP server on :3920...
Use custom port
vers mcp serve --transport http --addr :8080
Starting MCP server on :8080...
Local development mode
vers mcp serve --allow-insecure-set-key
Only use --allow-insecure-set-key for local development. This flag allows the API key to be set via the MCP tool interface, which is insecure in production environments.
How it works
The MCP server exposes vers CLI operations as tools that AI agents can call:
- Server startup: Initializes the MCP server with the specified transport
- Tool registration: Exposes vers commands as callable tools
- Request handling: Processes tool calls from connected agents
- Response formatting: Returns results in MCP-compatible format
Transport types
stdio (default)
- Communicates via standard input/output
- Best for integration with AI agents that spawn the server as a subprocess
- No network exposure
http
- Listens on a network port for HTTP requests
- Useful for remote agents or testing
- Requires specifying a listen address
Use cases
AI agent integration
Configure your AI agent to use vers as an MCP tool provider:
{
"mcpServers": {
"vers": {
"command": "vers",
"args": ["mcp", "serve"]
}
}
}
# Start server in HTTP mode for testing
vers mcp serve --transport http --addr :3920
# Test with curl or an HTTP client
Prerequisites
- Authenticated with Vers platform (unless using
--allow-insecure-set-key)
- For HTTP transport: Available network port
See Also