Almide MCP Server

Compile, run, and check Almide code with AI agents

README.md

Almide MCP Server

An MCP (Model Context Protocol) server that lets AI agents compile, run, and check Almide code.

Tools

Tool Description
compile Compile .almd source to Rust or TypeScript
run Compile and execute .almd source with arguments
check Check for syntax/compilation errors with diagnostic hints
emit-ast Parse source and return the AST as JSON

Resources

Resource URI Description
Grammar almide://grammar EBNF grammar + stdlib reference

Setup

Prerequisites

  • Node.js 18+
  • almide compiler in PATH (or set ALMIDE_BIN)

Install

git clone https://github.com/almide/mcp-server.git
cd mcp-server
npm install
npm run build

Claude Code

Add to ~/.claude.json:

{
  "mcpServers": {
    "almide": {
      "command": "node",
      "args": ["/path/to/mcp-server/dist/index.js"]
    }
  }
}

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "almide": {
      "command": "node",
      "args": ["/path/to/mcp-server/dist/index.js"],
      "env": {
        "ALMIDE_BIN": "/path/to/almide"
      }
    }
  }
}

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "almide": {
      "command": "node",
      "args": ["/path/to/mcp-server/dist/index.js"]
    }
  }
}

Usage Examples

Once connected, an AI agent can:

# Check code for errors
almide.check({ code: 'module app\nfn add(a: Int, b: Int) -> Int = a + b' })

# Compile to Rust
almide.compile({ code: '...', target: 'rust' })

# Run code
almide.run({ code: '...', args: ['hello'] })

# Get AST
almide.emit-ast({ code: '...' })

Environment Variables

Variable Description Default
ALMIDE_BIN Path to almide binary almide (from PATH)

License

MIT

Tools 4

compileCompile .almd source to Rust or TypeScript
runCompile and execute .almd source with arguments
checkCheck for syntax/compilation errors with diagnostic hints
emit-astParse source and return the AST as JSON

Environment Variables

ALMIDE_BINPath to almide binary

Try it

Check the following Almide code for any syntax or compilation errors: [code]
Compile this Almide module into Rust code: [code]
Execute this Almide script with the argument 'hello' and show me the output
Generate the AST for this Almide function to help me understand its structure

Frequently Asked Questions

What are the key features of Almide?

Compile Almide source code to Rust or TypeScript. Execute Almide code directly with custom arguments. Validate code for syntax and compilation errors with diagnostic feedback. Generate and inspect the Abstract Syntax Tree (AST) of Almide source code. Access language grammar and standard library references.

What can I use Almide for?

Debugging Almide code by identifying syntax errors through AI-assisted diagnostics. Automating the transpilation of Almide code into Rust or TypeScript targets. Rapidly prototyping and testing Almide logic by executing code snippets via AI. Analyzing Almide code structure by generating and reviewing JSON-based ASTs.

How do I install Almide?

Install Almide by running: git clone https://github.com/almide/mcp-server.git && cd mcp-server && npm install && npm run build

What MCP clients work with Almide?

Almide works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Almide docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Open Conare