Codync
무료 오픈소스 1:1 대안, Grok Bot과 Muse 대신
Axon MCP Server for SkySpark Axon Scripting
개발 도구TypeScript · JavaScriptGitHub @Project-SandStar직접 설치운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
설치형 프로젝트는 배포 도메인 없이도 확인할 수 있습니다. 개인 저장소는 GitHub 로그인으로, 조직 저장소는 위의 저장소 확인 파일로 직접 확인해 주세요.
메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗An MCP (Model Context Protocol) server that provides access to a comprehensive library of Axon code examples for building automation, HVAC control, and energy management systems.
This MCP server indexes and serves Axon code examples from the axon-library repository, making it easy for AI assistants and other tools to discover and use Axon patterns for:
The project has three parts:
vscode-extension/) — an IDE companion UI for project selection, search, and dashboard access (see VSCode Extension).dashboard/) — a Next.js admin UI served at /dashboard in HTTP mode.# Clone this repository
git clone [repository-url]
cd axon-mcp-server
# Install dependencies
npm install
# Build the TypeScript code
npm run build
The server can be configured to specify where your Axon code and documentation are located.
Using a configuration file:
cp axon-config.example.json axon-config.json
# Edit axon-config.json with your paths
Configuration file format:
{
"codePath": "/path/to/axon/code",
"docsPath": "/path/to/axon/docs",
"filePatterns": {
"code": ["**/*.axon", "**/*.trio"],
"docs": ["**/*.html", "**/*.md"]
},
"excludeDirs": ["node_modules", ".git"],
"cache": {
"enabled": true,
"maxAge": 86400000,
"directory": ".cache"
}
}
codePath: Directory containing your Axon source files (.axon, .trio)docsPath: Directory containing documentation (HTML, Markdown) with Axon examplesfilePatterns: Glob patterns for finding files
code: Patterns for Axon source filesdocs: Patterns for documentation filesexcludeDirs: Directories to skip during scanning# Development mode (with TypeScript)
npm run dev
# Production mode (compiled JavaScript)
npm start
The MCP server provides eleven main tools:
searchAxonExamplesSearch for Axon code from actual .axon source files (excludes documentation examples).
Parameters:
keyword (string, optional): Search term to find in function names, descriptions, and codecategory (string, optional): Filter by category (hvac, energy, meter, reporting, etc.)tags (array, optional): Filter by tagslimit (number, optional): Maximum results to return (default: 10)Example:
{
"keyword": "meter",
"category": "energy",
"limit": 5
}
Searching for Operators:
This tool now supports searching for operators (like >=, ==, +). When searching for a recognized operator, it performs a direct text search:
{
"keyword": ">=",
"limit": 10
}
See OPERATORS.md for detailed operator search guidance.
searchAxonOperatorExamplesSearch specifically for operator usage in Axon code with proper tokenization and indexing.
Parameters:
operator (string, optional): Single operator to search for (e.g., ">=" , "==", "+")operators (array, optional): Multiple operators (finds functions using ALL specified operators)category (string, optional): Filter by category (hvac, energy, meter, etc.)limit (number, optional): Maximum results to return (default: 10)Example (single operator):
{
"operator": ">=",
"category": "hvac",
"limit": 5
}
Example (multiple operators):
{
"operators": [">=", "<="],
"limit": 10
}
searchAxonDocs ⭐ Enhanced with FlexSearchSearch Axon documentation with AI-powered relevance ranking. Uses FlexSearch to provide Algolia-quality search across 4,000+ HTML documentation files with intelligent scoring, section matching, and context highlighting.
Features:
Parameters:
keyword (string, required): Search query (e.g., "task", "hisRead", "energy calculation")library (string, optional): Filter by library name (e.g., "lib-task", "lib-energy", "lib-his")includeContent (boolean, optional): Include full section content or summaries (default: true)maxSections (number, optional): Maximum sections per document (default: 3)limit (number, optional): Maximum documents to return (default: 10)Example 1 - Basic search:
{
"keyword": "task"
}
Example 2 - Library-specific search:
{
"keyword": "hisRead",
"library": "lib-his",
"limit": 5
}
Example 3 - Detailed search:
{
"keyword": "energy calculation",
"library": "lib-energy",
"includeContent": true,
"maxSections": 3,
"limit": 10
}
Response Format:
{
"count": 1,
"query": "task",
"library": "lib-task",
"results": [
{
"title": "lib task",
"library": "lib-task",
"relevanceScore": 95,
"url": "file:///path/to/docs/lib-task/doc.html",
"matchedSections": [
{
"heading": "Overview",
"content": "The task extension defines a framework...",
"codeExamples": ["future: taskRun(ioReadCsv(`io/import.csv`))"]
}
],
"highlights": ["...task extension defines a framework..."]
}
]
}
Performance:
listAxonCategoriesList all available categories with the count of functions in each.
Parameters: None
Returns: Categories with function counts
getAxonExampleRetrieve a specific Axon function by ID or name.
Parameters:
identifier (string, required): Function ID or nameExample:
{
"identifier": "meterOccUsage"
}
getAxonPatternRetrieve a curated Axon pattern by ID or search keyword.
Parameters:
patternId (string, optional): Pattern ID (e.g., "energy-consumption-total")keyword (string, optional): Search keyword if patternId not providedExample:
{
"patternId": "energy-consumption-total"
}
listAxonPatternsList all available patterns or filter by category prefix.
Parameters:
category (string, optional): e.g., "energy", "hvac", "meter"Example:
{
"category": "hvac"
}
findFunctionUsageFind all places where a specific function is called in the codebase.
Note: This tool searches for function calls only (e.g., readAll(), commit()), not operators (e.g., >=, ==, +). To search for operator usage, use searchAxonExamples with the operator as a keyword.
Parameters:
functionName (string, required): Name of the function to search forincludeContext (boolean, optional): Include surrounding code context (default: true)limit (number, optional): Maximum results to return (default: 20)Example:
{
"functionName": "commit",
"limit": 10
}
For operators, use searchAxonExamples instead:
{
"tool": "searchAxonExamples",
"arguments": {
"keyword": ">=",
"limit": 5
}
}
getFunctionExamplesGet real-world examples of how a function is used.
Parameters:
functionName (string, required): Function namemaxExamples (number, optional): Number of examples (default: 5)sortBy (string, optional): How to sort examples ("relevance", "complexity", "file")Example:
{
"functionName": "hisRead",
"maxExamples": 3
}
getFunctionCallGraphShow what functions call this function and what it calls.
Parameters:
functionName (string, required): Function namedepth (number, optional): How many levels deep to traverse (default: 1)Example:
{
"functionName": "readAll",
"depth": 2
}
getFunctionUsageStatsGet statistics about function usage in the codebase.
Parameters: None
Returns: Statistics including:
searchAxonRegexSearch Axon code using regular expressions with context lines.
Parameters:
pattern (string, required): Regular expression patterncontextLines (number, optional): Number of context lines before/after match (default: 2)format (string, optional): Output format - "text" or "json" (default: "text")Example:
{
"pattern": "if.*do",
"contextLines": 3,
"format": "text"
}
Returns matches with context in a grep-like format:
Found 3 results.
demo/ahuOutsideDamperStuckClosed.axon
│----
│ if (mixedTemp != null) do
│ tempPeriods: ahuTempDiff(outsideTemp, mixedTemp, dates)
│----
See REGEX-SEARCH.md for detailed regex search examples.
To use this MCP server with Claude Desktop, add the following to your Claude Desktop configuration:
{
"mcpServers": {
"axon-code": {
"command": "node",
"args": ["/path/to/axon-mcp-server/dist/index.js"]
}
}
}
With a custom config file:
{
"mcpServers": {
"axon-code": {
"command": "node",
"args": [
"/path/to/axon-mcp-server/dist/index.js",
"/path/to/axon-config.json"
]
}
}
}
The MCP server uses FlexSearch to provide Algolia-quality search across your HTML documentation files. This gives you:
Initial Indexing (First Run)
docsPath.cache/flexsearch-docs.json for instant loadingSubsequent Runs
Search Process
| Metric | Value |
|---|---|
| Documents Indexed | 4,187 HTML files |
| Index Size | ~15-25 MB (compressed) |
| Initial Build Time | 30-60 seconds |
| Cache Load Time | <1 second |
| Search Time | <50ms (avg) |
| Memory Usage | ~50-100 MB |
The FlexSearch index is automatically cached in .cache/flexsearch-docs.json:
# Clear documentation cache
rm -f .cache/flexsearch-docs.json .cache/flexsearch-metadata.json
# Clear all caches
npm run cache:clear:all
Cache is invalidated when:
Slow initial indexing?
"cache": { "enabled": false } in configSearch returns no results?
docsPath is configured correctlyOut of memory errors?
excludeDirs in confignode --max-old-space-size=4096 dist/index.jsThe MCP server also includes powerful function usage tracking capabilities that allow you to:
Finding how commit is used:
{
"tool": "findFunctionUsage",
"arguments": {
"functionName": "commit",
"limit": 10
}
}
Getting examples of hisRead usage:
{
"tool": "getFunctionExamples",
"arguments": {
"functionName": "hisRead",
"maxExamples": 5
}
}
Understanding function dependencies:
{
"tool": "getFunctionCallGraph",
"arguments": {
"functionName": "meterOccUsage",
"depth": 2
}
}
The server categorizes Axon functions into the following domains:
// Search for VAV control examples
{
"tool": "searchAxonExamples",
"arguments": {
"keyword": "vav",
"category": "hvac"
}
}
// Search for energy cost calculations
{
"tool": "searchAxonExamples",
"arguments": {
"keyword": "cost",
"category": "energy"
}
}
// Get the siteReport function
{
"tool": "getAxonExample",
"arguments": {
"identifier": "siteReport"
}
}
Beyond code examples, the server ships a library of workflow guides —
battle-tested, step-by-step playbooks for common SkySpark/Axon tasks. They live
as Markdown in workflows/ and are exposed to AI assistants as
both MCP tools and workflow:// resources.
Included guides:
| Workflow | What it covers |
|---|---|
axon-func-update | Commit/upsert Axon functions without leaving duplicate folio records |
axon-lang-information | Axon syntax gotchas reference (no while/ternary/elvis, unit arithmetic, do…end) |
curRule-computed-points | Build curRule + defcomp computed curVal points with history |
spark-rule-creation | Author FDD spark rules |
app-creation | Build SkySpark apps/views |
recform-template-design | Design record-form templates |
html-email-skyspark | SkySpark-native HTML email notifications |
task-subscriber-permissions | obsCurVals/obsSchedule tasks and the host-user permission model |
job-status-check | Inspect job/task run status |
visualytik-mcp-authoring | Author Visualytik dashboards (.viz/.anim artifacts, SVG, logic graphs) |
listWorkflows — list every loaded workflow with a short summary (id, title, category, tags). Cheap discovery surface.searchWorkflows — search by keyword/category/tag and semantic (vector) similarity; returns a relevance score.getWorkflowSummary — fetch the cached summary for one workflow by id.workflow://<id> resources — the full Markdown content on demand.Enhancements:
*.md into workflows/ and it's loaded live (via fs.watch); no restart needed.searchWorkflows.A companion VSCode extension (Axon VSCode) provides an
IDE surface for the MCP server: a sidebar for project selection, quick dashboard
access, and a status bar showing the active SkySpark project and connection
state. AI assistants (Claude Code, Cline, etc.) talk to the MCP server directly;
the extension is the convenience UI around it.
Commands (Command Palette → "Axon: …"):
| Command | Description |
|---|---|
Axon: Switch Project | Select the active SkySpark project |
Axon: Search Code Examples | Search Axon .axon examples |
Axon: Search Documentation | Search the FlexSearch docs index |
Axon: Open MCP Explorer | Browse server tools/resources |
Axon: Open Dashboard | Open the admin dashboard in a browser |
Axon: Connect to MCP Server / Check Connection Status | Manage/inspect the connection |
Axon: Sync Functions from SkySpark | Pull functions for offline search |
Axon: Clear Server Caches · View MCP Server Logs | Maintenance |
Build & install (.vsix):
cd vscode-extension
npm install
npm run compile # webpack production build
npm run package # produces axon-vscode-<version>.vsix (vsce)
# then in VSCode: Extensions ▸ … ▸ "Install from VSIX…"
# or from the CLI:
code --install-extension axon-vscode-*.vsix
Requires VSCode ^1.84.0 and a running Axon MCP Server (npm start from the
project root). See vscode-extension/README.md
for details.
axon-mcp-server/
├── src/
│ ├── index.ts # Main server implementation
│ ├── scanner/ # File scanning utilities
│ │ ├── fileScanner.ts # HTML & Axon file scanner
│ │ └── axonUsageScanner.ts # AxonUsage.html parser
│ ├── parser/ # Code & documentation parsing
│ │ ├── axonParser.ts # Axon code parser
│ │ ├── htmlDocParser.ts # HTML documentation parser (FlexSearch)
│ │ └── enhancedAxonParser.ts
│ ├── search/ # Search implementations
│ │ ├── searchIndex.ts # Token-based code search
│ │ ├── flexSearchIndex.ts # FlexSearch documentation index
│ │ ├── operatorIndex.ts # Operator usage index
│ │ └── functionUsageIndex.ts # Function call tracking
│ ├── types/ # TypeScript type definitions
│ │ ├── index.ts # Core types
│ │ └── documentation.ts # FlexSearch types
│ ├── cache/ # Caching system
│ │ └── cacheManager.ts # Index caching & persistence
│ └── patterns/ # Curated Axon patterns
├── .cache/ # Cached indexes
│ ├── axon-index.json # Code function index
│ ├── flexsearch-docs.json # FlexSearch documentation index
│ └── function-usage.json # Function usage index
├── dist/ # Compiled JavaScript
├── package.json
├── tsconfig.json
└── README.md
AxonCategory enum in src/types/index.tssrc/parser/axonParser.tssrc/index.ts# Run tests
npm test
Releases are automated with release-please using Conventional Commits:
fix: … → patch release (x.y.z)feat: … → minor release (x.y.0)feat!: … / BREAKING CHANGE: → major release (x.0.0)How it works: on every push to main, release-please opens/updates a release PR that bumps package.json and updates CHANGELOG.md. Merging that PR tags the version and publishes a GitHub Release; CI then builds the project, zips a runnable bundle (dist/, prisma/, scripts/, package.json, templates, docs), and attaches it as axon-mcp-server-vX.Y.Z.zip. See .github/workflows/.
# Download axon-mcp-server-vX.Y.Z.zip from the GitHub Releases page, then:
unzip axon-mcp-server-vX.Y.Z.zip && cd axon-mcp-server-vX.Y.Z
npm ci --omit=dev
npx prisma migrate deploy # initialize the SQLite database
cp config/skyspark.example.json config/local-skyspark.json # then edit credentials
node dist/index.js # stdio mode (or: MCP_TRANSPORT=http node dist/index.js)
This project is source-available, licensed under the Project Sandstar
Source-Available License (PSSL) v1.1 — see LICENSE.
Copyright (c) 2026 Anka Labs, Inc. Licensed under the Project Sandstar Source-Available License (PSSL v1.1).
Project Sandstar integrates the Sedona Framework and Project Haystack, which are independent open-source projects.
This is not an OSI open-source license. You may study, modify, and deploy the software free of charge for Qualifying Use (where it exclusively consumes Sandstar-Origin Data). Any use that consumes non-Sandstar data — directly or via a gateway/Haystack server — requires a commercial license. See the LICENSE file for the full terms and the "Packet Test", or contact [email protected].
Contributions are welcome! Please submit pull requests with: