Skip to content

MCP Setup

This page shows how to install and run the AutoVio MCP server so MCP clients (like Claude Desktop) can call the AutoVio API.

From the AutoVio-MCP directory:

Terminal window
npm install
npm run build

This compiles the TypeScript sources into dist/ and prepares the CLI entry point.

You can run the MCP server directly with Node:

Terminal window
# Default (env or default baseUrl/token)
node dist/index.js
# With config file
node dist/index.js --config examples/config.example.json
# Development (watch)
npm run dev

The entry point (src/index.ts) loads configuration, sets the log level, and then calls startServer with stdio transport.

Configuration is merged from four sources with this priority (highest first):

  1. CLI parameters
  2. Environment variables
  3. Config file (JSON)
  4. Defaults

CLI flags cover AutoVio connection, logging, and the 4 AI model+key pairs:

FlagDescription
--configPath to JSON config file.
--autovio-base-urlAutoVio API base URL.
--autovio-api-tokenAutoVio API token.
--vision-modelVision model (e.g. gemini-2.0-flash-exp).
--vision-api-keyVision API key.
--llm-modelLLM model (e.g. gemini-2.5-flash).
--llm-api-keyLLM API key.
--image-modelImage model (e.g. gemini-2.5-flash-image).
--image-api-keyImage API key.
--video-modelVideo model (e.g. veo-3.0-generate-001).
--video-api-keyVideo API key.
--log-leveldebug | info | warn | error.
--enable-resourcestrue | false.
--enable-promptstrue | false.

CamelCase variants like --autovioBaseUrl are also accepted.

The server reads the following env variables:

  • AUTOVIO_BASE_URL
  • AUTOVIO_API_TOKEN
  • AUTOVIO_VISION_MODEL, AUTOVIO_VISION_API_KEY
  • AUTOVIO_LLM_MODEL, AUTOVIO_LLM_API_KEY
  • AUTOVIO_IMAGE_MODEL, AUTOVIO_IMAGE_API_KEY
  • AUTOVIO_VIDEO_MODEL, AUTOVIO_VIDEO_API_KEY
  • AUTOVIO_LOG_LEVEL
  • AUTOVIO_MCP_CONFIG (JSON config string)

You can pass a JSON config via --config or load it through env. Example (examples/config.example.json):

{
"server": {
"name": "autovio-mcp-server",
"version": "1.0.0"
},
"autovio": {
"baseUrl": "http://localhost:3001",
"apiToken": "YOUR_AUTOVIO_API_TOKEN"
},
"providers": {
"vision": {
"model": "gemini-2.0-flash-exp",
"apiKey": "YOUR_VISION_API_KEY"
},
"llm": {
"model": "gemini-2.5-flash",
"apiKey": "YOUR_LLM_API_KEY"
},
"image": {
"model": "gemini-2.5-flash-image",
"apiKey": "YOUR_IMAGE_API_KEY"
},
"video": {
"model": "veo-3.0-generate-001",
"apiKey": "YOUR_VIDEO_API_KEY"
}
},
"features": {
"enableResources": true,
"enablePrompts": false,
"cacheResponses": false,
"logLevel": "info"
}
}

At runtime the merged config has this shape:

SectionFieldsDescription
servername, versionMCP server metadata.
autoviobaseUrl, apiTokenAutoVio REST API connection.
providersvision, llm, image, videoModel+API key pairs for each AI category.
featuresenableResources, enablePrompts, cacheResponses, logLevelMCP feature flags and logging.

Each provider entry is:

FieldTypeDescription
modelstringModel name (e.g. gemini-2.0-flash-exp).
apiKeystringAPI key for that model.

The server derives the provider ID from the model name (e.g. gemini, claude, openai) before calling the AutoVio API.

  • Node.js >= 18 (enforced by engines.node in package.json)
  • A running AutoVio backend (see Installation)
  • An AutoVio API token or user credentials
  • API keys for the AI providers you want to use