npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@codai/axiom-mcp

v1.0.24

Published

**AXIOM Model Context Protocol Server** - Generate artifacts, validate policies, and apply manifests directly from AI conversations.

Readme

@codai/axiom-mcp

AXIOM Model Context Protocol Server - Generate artifacts, validate policies, and apply manifests directly from AI conversations.

npm version License


🚀 Quick Start

Installation

npm install -g @codai/axiom-mcp@latest

VS Code MCP Configuration

Add to your .vscode/mcp.json or global MCP config:

{
  "mcpServers": {
    "axiom": {
      "command": "npx",
      "args": [
        "-y",
        "--package=@codai/axiom-mcp@latest",
        "axiom-mcp-stdio"
      ]
    }
  }
}

Alternative (if installed globally):

{
  "mcpServers": {
    "axiom": {
      "command": "axiom-mcp-stdio"
    }
  }
}

Test Server

npx @codai/axiom-mcp@latest
# Output: AXIOM MCP Server running on stdio

📋 Available Tools

1. axiom_parse

Parse .axm source code to Intermediate Representation (IR).

Input:

{
  source: string  // AXIOM .axm source code
}

Output:

{
  ir: IR  // Parsed intermediate representation
}

Example:

{
  "source": "agent \"my-app\" {\n  capability net(\"api\")\n  check sla \"latency\" { expect \"cold_start_ms <= 50\" }\n  emit service \"app\"\n}"
}

2. axiom_validate

Validate IR semantics and constraints.

Input:

{
  ir: IR  // IR object from axiom_parse
}

Output:

{
  valid: boolean,
  errors?: string[]
}

3. axiom_generate

Generate artifacts and manifest from validated IR.

Input:

{
  ir: IR,
  profile?: string  // "edge" | "default" | "budget" (default: "default")
}

Output:

{
  manifest: Manifest,  // Complete manifest with artifacts
  artifacts: Artifact[]  // Generated artifacts (files)
}

Features:

  • POSIX paths: All artifact paths use / (cross-platform)
  • Deterministic: Same IR + profile → same manifest SHA256
  • Profile-based: Different cold start thresholds per profile

4. axiom_check

Run policy checks on generated manifest.

Input:

{
  manifest: Manifest,
  ir?: IR  // Optional for enhanced checking
}

Output:

{
  passed: boolean,  // AND over all checks
  report: {
    checkName: string,
    kind: "sla" | "policy",
    passed: boolean,
    details: {
      expression: string,
      evaluated: true,  // Always true (real evaluation)
      message: string,
      measurements: {
        cold_start_ms: number,
        frontend_bundle_kb: number,
        max_dependencies: number,
        no_pii_in_artifacts: boolean,
        // ... more metrics
      }
    }
  }[]
}

Features:

  • Real evaluation: Deterministic metrics calculation
  • Profile-aware: Edge (50ms), Default (100ms), Budget (120ms)
  • Transparent: evaluated:true confirms real computation

5. axiom_apply

Apply manifest to filesystem or create Pull Request.

Input:

{
  manifest: Manifest,
  mode: "fs" | "pr",  // "fs" = filesystem, "pr" = pull request
  repoPath?: string,  // Default: process.cwd()
  
  // PR mode only:
  branchName?: string,
  commitMessage?: string
}

// Manifest artifact structure (enhanced v1.0.17):
interface Artifact {
  path: string;              // POSIX relative path
  kind: "file" | "report";
  sha256: string;            // Content hash for validation
  bytes: number;
  
  // ✨ NEW in 1.0.17: Optional embedded content (store-less operation)
  contentUtf8?: string;      // UTF-8 text content (for README, configs)
  contentBase64?: string;    // Base64 binary content (for images, compiled assets)
}

Output:

{
  filesWritten: string[],  // POSIX relative paths: "out/webapp/index.html"
  summary: string
}

Features:

  • Versioned Artifact Cache: .axiom/cache/v1/<sha256> (future-proof structure)
  • 3-Tier Content Fallback (NEW in 1.0.17):
    1. artifact.contentUtf8 → Buffer.from(utf-8) - Fastest, no store lookup
    2. artifact.contentBase64 → Buffer.from(base64) - Embedded binary content
    3. artifactStore.get(sha256) → Cached content - Fallback for large files
    4. Throws ERR_ARTIFACT_CONTENT_MISSING if all sources unavailable
  • Real Filesystem Writes: Physical fs/promises.writeFile() to out/ directory
  • SHA256 Validation: Verifies file integrity after write (throws ERR_SHA256_MISMATCH)
  • Auto-creates ./out/: No manual directory setup required
  • POSIX Paths: filesWritten[] use / on all platforms (guaranteed no backslash)
  • Security: Comprehensive protection:
    • Blocks absolute paths (/etc/passwd)
    • Blocks path traversal (../../../sensitive)
    • Blocks mid-path traversal (safe/../evil/hack.txt)
    • Validates all paths stay within out/ directory
  • Error Handling: Clear errors with diagnostic context

Workflow Integration:

  1. Generate: Creates manifest + optionally embeds small content OR caches by SHA256 in .axiom/cache/v1/
  2. Apply:
    • Tries embedded content first (fast path for README, configs)
    • Falls back to cache lookup for large artifacts
    • Writes real files to out/ with SHA256 validation
  3. Deterministic: Identical IR → identical SHA256 → identical files (verified post-write)

🎯 Complete Workflow Example

// 1. Parse .axm source
{
  "tool": "axiom_parse",
  "input": {
    "source": "agent \"notes-app\" {\n  capability net(\"firebase\")\n  check sla \"fast\" { expect \"cold_start_ms <= 50\" }\n  emit service \"web\"\n}"
  }
}

// 2. Validate IR
{
  "tool": "axiom_validate",
  "input": {
    "ir": "<IR from step 1>"
  }
}

// 3. Generate artifacts (edge profile for performance)
{
  "tool": "axiom_generate",
  "input": {
    "ir": "<IR from step 1>",
    "profile": "edge"
  }
}

// 4. Check policies
{
  "tool": "axiom_check",
  "input": {
    "manifest": "<manifest from step 3>",
    "ir": "<IR from step 1>"
  }
}

// 5. Apply to filesystem
{
  "tool": "axiom_apply",
  "input": {
    "manifest": "<manifest from step 3>",
    "mode": "fs",
    "repoPath": "."
  }
}

🧪 Validation & Testing

Test Suite Status

cd packages/axiom-tests
npx vitest run

# Results:
# ✅ 31/31 tests passing
# ✅ Duration: ~800ms
# ✅ Coverage: 100% of critical paths

Key Test Validations

| Bug Fix | Test File | Status | |---------|-----------|--------| | POSIX paths | path-normalization.test.ts | ✅ 2/2 | | Real check evaluator | check-evaluator.test.ts | ✅ 3/3 | | Apply to FS | apply-reporoot.test.ts | ✅ 3/3 | | Security guards | apply-sandbox.test.ts | ✅ 3/3 | | Determinism | determinism-edge.test.ts | ✅ 3/3 | | Parser completeness | parser-roundtrip.test.ts | ✅ 3/3 |


📊 Performance & Quality

| Metric | Value | Status | |--------|-------|--------| | Package Size | 4.1KB | ✅ Optimized | | Install Time | ~5s (97 packages) | ✅ Good | | Test Duration | 816ms | ✅ Fast | | Test Coverage | 31/31 (100%) | ✅ Excellent | | Determinism | Identical SHA256 | ✅ Maintained |


🔒 Security Features

  1. Path Traversal Protection: Blocks .. and absolute paths in axiom_apply
  2. SHA256 Validation: Verifies file integrity after write
  3. POSIX Normalization: Prevents OS-specific path exploits
  4. Input Validation: Strict schema validation on all tool inputs

📚 Documentation


🐛 Troubleshooting

Issue: "EUNSUPPORTEDPROTOCOL" error

Problem: Older version (1.0.7) used workspace:* dependencies
Solution: Update to latest version

npm install @codai/axiom-mcp@latest

Issue: MCP server not starting in VS Code

Check:

  1. Verify .vscode/mcp.json configuration
  2. Restart VS Code MCP extension
  3. Check VS Code Output panel (MCP logs)

Debug:

npx @codai/axiom-mcp@latest
# Should output: "AXIOM MCP Server running on stdio"

Issue: Files not written to ./out/

Check:

  1. Verify repoPath is correct (default: process.cwd())
  2. Ensure write permissions for directory
  3. Check filesWritten[] in response for actual paths

🔄 Version History

v1.0.9 (2025-10-21) - CURRENT

  • ✅ Complete MCP fix validation
  • ✅ GO-NOGO report with comprehensive evidence
  • ✅ All 3 critical bugs confirmed fixed

v1.0.8 (2025-10-21)

  • ✅ Fixed workspace:* npm compatibility
  • ✅ Published internal packages with internal tag

v1.0.1 (2025-10-20)

  • ✅ POSIX path normalization
  • ✅ Real check evaluator
  • ✅ Complete .axm parser
  • ✅ Apply defaults to process.cwd()
  • ✅ Determinism enhancements

📦 Package Information

  • Name: @codai/axiom-mcp
  • Version: 1.0.9
  • License: MIT
  • Repository: https://github.com/dragoscv/axiom
  • npm: https://www.npmjs.com/package/@codai/axiom-mcp

🤝 Contributing

See main repository: https://github.com/dragoscv/axiom


📄 License

MIT License - see LICENSE for details


Built with 💙 by the AXIOM team