# \[ANN\] Crystal MCP - An MCP Server for Crystal Tooling

**URL:** https://forum.crystal-lang.org/t/ann-crystal-mcp-an-mcp-server-for-crystal-tooling/8682
**Category:** Community
**Created:** [January 30, 2026, 7:48am UTC](https://forum.crystal-lang.org/t/ann-crystal-mcp-an-mcp-server-for-crystal-tooling/8682 "2026-01-30T07:48:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![renich](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/renich/32/2137_2.png) [@renich](https://forum.crystal-lang.org/u/renich)
#### Post date: [January 30, 2026, 7:48am UTC](https://forum.crystal-lang.org/t/ann-crystal-mcp-an-mcp-server-for-crystal-tooling/8682/1 "2026-01-30T07:48:58Z")

</div>

Hi everyone,

I’d like to share a project I’ve been working on: **Crystal MCP** (v0.1.2).

It’s an implementation of the [Model Context Protocol](https://modelcontextprotocol.io/) for Crystal. The goal is to let AI coding agents (like OpenCode or Claude) interact with Crystal’s existing tooling to better understand your code.

### What it does

Instead of just reading text, this server uses the Crystal compiler and ecosystem tools to provide deeper context to the AI:

- **Macro Expansion** : It can run `crystal tool expand` to show the AI exactly what code is being generated behind the scenes.
- **Implementations** : It uses `crystal tool implementations` to find definitions.
- **Linting** : It runs `ameba` to check for code issues.
- **Dependencies** : It inspects `shard.lock` to see what libraries are installed.

### Usage

It’s designed to work with any MCP-compliant client. For **OpenCode** :

1. **Install** :

2. **Configure** :  
Add it to your `~/.config/opencode/opencode.json` (or equivalent MCP settings):

### Repository

The code is available here:

> **[Rene Bon Ćirić (Renich) / Crystal MCP · GitLab](https://gitlab.com/renich/crystal-mcp)**
>
> GitLab.com

It’s still early days (v0.1.2), so there are likely rough edges. If you find it useful or have suggestions for improvement, I’d appreciate the feedback.

Thanks!

---

<div class="post-metadata">

### Author: ![Herta](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@Herta](https://forum.crystal-lang.org/u/Herta)
#### Post date: [March 20, 2026, 11:47pm UTC](https://forum.crystal-lang.org/t/ann-crystal-mcp-an-mcp-server-for-crystal-tooling/8682/2 "2026-03-20T23:47:34Z")

</div>

Does crystal-mcp not support Windows? I checked the compilation and installation scripts, and they seem to only include Linux-related content. Do I need to compile it myself using crystal build on Windows?

---

<div class="post-metadata">

### Author: ![renich](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/renich/32/2137_2.png) [@renich](https://forum.crystal-lang.org/u/renich)
#### Post date: [March 21, 2026, 12:34am UTC](https://forum.crystal-lang.org/t/ann-crystal-mcp-an-mcp-server-for-crystal-tooling/8682/3 "2026-03-21T00:34:23Z")

</div>

I am sorry. It’s been years since I used it. I’d be the least prepared maintainer of that aspect of the MCP. If you figure it out, would you care to jump in as a maintainer?

---

<div class="post-metadata">

### Author: ![Herta](https://avatars.discourse-cdn.com/v4/letter/h/73ab20/32.png) [@Herta](https://forum.crystal-lang.org/u/Herta)
#### Post date: [March 21, 2026, 9:12am UTC](https://forum.crystal-lang.org/t/ann-crystal-mcp-an-mcp-server-for-crystal-tooling/8682/4 "2026-03-21T09:12:24Z")

</div>

I’m sorry, but I’ve just started learning Crystal and can’t be of much help.
