Get the FREE Ultimate OpenClaw Setup Guide →

FSharp.MCP.DevKit

Experimental prototype of an F# development toolkit delivered via the Model Context Protocol (MCP).

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio ehotwagner-fsharp.mcp.devkit dotnet run -p ./FSharp.MCP.DevKit.fsproj --no-build

How to use

The FSharp.MCP.DevKit is an MCP server that exposes an interactive F# tooling environment through the MCP framework. It provides a persistent FSI session, supports executing F# code with robust error handling, loads scripts with dependency tracking, and lets you reference .NET assemblies and NuGet packages. It also integrates documentation generation and search capabilities, enabling API reference creation, package discovery, and project documentation generation. The server includes analysis features such as advanced symbol detection, syntax validation, and code structure analysis, all accessible via MCP tools and IPC communication.

To use it, start the server via the configured command (dotnet run with the appropriate project path). Once running, you can connect your MCP client to the server and issue commands to:

  • Manage an FSI session and evaluate F# expressions or scripts.
  • Generate and query package documentation, browse NuGet packages, and search through generated docs.
  • Perform safe code manipulation, including AST-validated insertions and Fantomas-based formatting.
  • Run the analysis tools to detect symbols, validate syntax, and inspect code structure, with position-sensitive capabilities for editor integrations.

How to install

Prerequisites:

  • .NET 9.0 SDK or newer installed on your system.
  • Basic familiarity with MCP workflow and VSCode or your preferred editor.

Installation steps:

  1. Install .NET SDK 9.0+ from the official site: https://dotnet.microsoft.com/download
  2. Clone or download the repository containing FSharp.MCP.DevKit.
  3. Restore and build the project (in your shell):
# Navigate to the repository root
cd path/to/repo

# Restore dependencies
dotnet restore

# Build the solution (optional if running directly with --no-build)
dotnet build
  1. Run the MCP server (as described in the mcp_config section) to start listening for MCP clients:
dotnet run -p ./FSharp.MCP.DevKit.fsproj --no-build
  1. Connect your MCP client to the running server and begin issuing MCP commands to leverage the FSI, documentation tools, and code analysis features.

Additional notes

Tips and notes:

  • Ensure the FSharp.MCP.DevKit.fsproj path matches your actual project layout when starting the server.
  • The server exposes FSI capabilities; interactive sessions may vary in behavior depending on your environment (console vs. IDE terminal).
  • If you encounter issues with code analysis or symbol resolution, verify that the F# Compiler Services dependencies are correctly restored and accessible.
  • For performance, consider running the server in a development environment where dependencies are cached (dotnet restore) to reduce startup times.
  • Environment variables related to MCP configuration can be added as needed by your deployment scenario (e.g., MCP_PORT, MCP_LOG_LEVEL); placeholder examples:
ENV MCP_PORT=5000
ENV MCP_LOG_LEVEL=Info

Related MCP Servers

Sponsor this space

Reach thousands of developers