OCaml

Provides OCaml development tooling via MCP for real-time build, analysis, and file operations.
  • other

51

GitHub Stars

other

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "tmattio-ocaml-mcp": {
      "command": "ocaml-mcp-server",
      "args": []
    }
  }
}

You run a specialized MCP server to give AI assistants deep integration with your OCaml projects, enabling real-time code analysis, build status, and project-wide tooling through OCaml Platform components like Dune and Merlin.

How to use

Start by installing the OCaml MCP server, then run it in stdio mode for local use or as an HTTP server to accept remote connections. You will interact with the server through your MCP client, which can request build status, code analysis, and file operations that align with OCaml tooling.

How to install

opam install ocaml-mcp-server

Usage examples

Run the server locally using the standard interface, or expose it over HTTP for remote clients.

# Using stdio
ocaml-mcp-server

# As an HTTP server
ocaml-mcp-server --socket 8080

Additional notes

The OCaml MCP server integrates with Merlin, Dune RPC, ocamlformat, and other OCaml Platform tools to provide a cohesive development experience. It exposes a suite of OCaml-focused tools and analysis capabilities that you can invoke from your MCP client.

Available tools

dune/build-status

Real-time build status with error reporting from the Dune build system.

dune/build-target

Build specific targets with streaming output.

dune/run-tests

Execute tests with detailed results (work-in-progress).

ocaml/module-signature

Obtain module signatures from compiled artifacts.

ocaml/find-definition

Jump to symbol definitions (work-in-progress).

ocaml/find-references

Find all usages of a symbol (work-in-progress).

ocaml/type-at-pos

Get type information at the cursor position (work-in-progress).

ocaml/project-structure

Analyze project layout and dependencies.

ocaml/eval

Evaluate OCaml expressions within the project context.

fs/read

Read files with Merlin diagnostics for OCaml code.

fs/write

Write files with automatic OCaml formatting.

fs/edit

Edit files while preserving OCaml syntax validity.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational