Skip to main content

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

OptionDefaultDescription
--transport”stdio”Transport type: stdio or http
--addr”:3920”Listen address for HTTP transport
--allow-insecure-set-keyfalseAllow setting API key via tool (local dev only)

Examples

Start with stdio transport (default)

vers mcp serve
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:
  1. Server startup: Initializes the MCP server with the specified transport
  2. Tool registration: Exposes vers commands as callable tools
  3. Request handling: Processes tool calls from connected agents
  4. 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"]
    }
  }
}

Testing MCP tools

# 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

  • vers login - Authenticate before using MCP server