Crystal MCP Server

A Model Context Protocol (MCP) server for the Crystal programming language. This server provides LLMs with context-aware tools to analyze, inspect, and work with Crystal codebases.

Project Goal

The goal of this project is to bridge the gap between AI assistants and the Crystal development environment. By exposing the Crystal compiler's capabilities and ecosystem tools through the MCP standard, we enable AI agents to:

Features (Tools)

The server exposes the following tools:

Compiler Tools

Ecosystem Tools

Quality Tools

Installation

Manual Install

  1. Clone the repository:

    git clone https://gitlab.com/renich/crystal-mcp.git
    cd crystal-mcp
  2. Build the project:

    make build
  3. Install to ~/.local/bin:

    make install

Configuration

Add the server to your MCP client configuration (e.g., ~/.opencode/config.json):

{
  "mcpServers": {
    "crystal-mcp": {
      "command": "/home/YOUR_USER/.local/bin/crystal-mcp",
      "args": [],
      "env": {}
    }
  }
}

Development

This project uses a GNUmakefile for common development tasks.

Viewing Documentation

After generating the documentation with make docs, you can view it by opening docs/technical/api/index.html in your web browser.

Dependencies

License

GPLv3