Configuration
Every knob the server reads from axon-config.json, plus the environment variables that override them.
The config file
The server looks for axon-config.json in the working directory, or at the path in the AXON_CONFIG environment variable. A starter file ships as axonMcpServer-config.json; copy it and edit.
{
"server": { "port": 3847 },
"codePath": "/path/to/axon/code",
"docsPath": "/path/to/axon/docs",
"filePatterns": {
"code": ["**/*.axon", "**/*.trio"],
"docs": ["**/*.html", "**/*.md"]
},
"cache": { "enabled": true, "maxAge": 86400000, "directory": ".cache" },
"semanticSearch": { "enabled": true, "codeModel": "Xenova/all-MiniLM-L6-v2" }
}
Paths
codePath
Absolute path to the folder that contains your .axon and .trio files. The file scanner walks it recursively, honouring the filePatterns.code globs and skipping directories in excludeDirs (defaults: node_modules, .git).
docsPath
Absolute path to your HTML documentation. The FlexSearch parser extracts headings, code blocks, and prose into the docs index. Markdown files are supported alongside HTML.
OAuth
Enable for multi-user HTTP deployments:
"oauth": {
"enabled": true,
"accessTokenTtl": 3600,
"refreshTokenTtl": 2592000,
"scopesSupported": ["mcp:read", "mcp:write", "mcp:admin"]
}
With enabled: false, the HTTP transport accepts unauthenticated connections — fine for localhost, never for public deployments.
SkySpark connection
"skyspark": {
"home": "/path/to/skyspark",
"configDir": "config",
"autoDiscover": true,
"autoSyncFunctions": true,
"syncConcurrency": 10,
"functionVersioning": true,
"maxVersions": 4,
"fallback": {
"host": "localhost",
"port": 8080,
"project": "demo",
"username": "su",
"password": "su",
"protocol": "http"
}
}
autoDiscover
When true, the server reads SkySpark's config directory and enumerates every project on startup. When false, the fallback block is used as the sole connection target.
functionVersioning
When true, every call to commitAxonFunction keeps the previous revision. maxVersions caps how many revisions are retained per function before the oldest are dropped.
fallback
Used when autoDiscover fails or the home/config paths are unreachable. Also used when a client calls switchSkySparkProject with a project not found via discovery.
Semantic search
Vector embeddings power semanticCodeSearch and findSimilarCode. The default model runs fully local (no external API calls) via HuggingFace Transformers:
"semanticSearch": {
"enabled": true,
"codeModel": "Xenova/all-MiniLM-L6-v2",
"embeddingThreads": 2
}
Embeddings persist in LanceDB at .cache/embeddings. Rebuild with buildProjectEmbeddings after a significant code change.
Primary project
Execution and commit tools need to know which SkySpark project to target:
"primaryProject": {
"instance": "localhost8080",
"project": "sensorRead"
}
Clients can switch the primary project at runtime via setPrimaryProject. The chosen context persists for the session.
Environment-variable overrides
| Variable | Purpose |
|---|---|
MCP_TRANSPORT |
stdio (default) or http. |
MCP_PORT |
HTTP port when MCP_TRANSPORT=http. Default 3847. |
AXON_CONFIG |
Absolute path to the JSON config file. |
NODE_OPTIONS |
Pre-set to --max-old-space-size=8192 in the start scripts. |
Environment variables win over values in the JSON config.