Get the FREE Ultimate OpenClaw Setup Guide →

SageFs

Sage Mode for F# development — REPL with solution or project loading, Live Testing for FREE, Hot Reload, and session management.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio willehrendreich-sagefs sagefs \
  --env SAGEFS_PORT="default (auto-detect)" \
  --env SAGEFS_LOG_LEVEL="info"

How to use

SageFs is a cross-editor, single daemon MCP server for F# projects. It runs as a persistent daemon and exposes MCP-style endpoints that clients (editors, CLIs, or AI agents) can connect to in order to create isolated sessions, feed code, and retrieve diagnostics, tests, and results. Start the daemon once on your machine, then connect editors and tools to the same live session surface so they share the same FSI environment, file watching, and hot reload. The MCP affordance ensures only valid actions are exposed to agents depending on the current session state, reducing token waste for AI workflows. You can interact with SageFs either through editor plug-ins that talk MCP to the daemon or via the included CLI/AI clients that ship with the toolchain.

To get started, launch the SageFs daemon locally and then create a session for your project. A client (for example, an editor integration) will call an API like POST /api/sessions/create with the path to your .fsproj or directory. SageFs will spawn an isolated worker process (an FSI session) for that project and begin watching files. As you edit and save, the daemon performs hot reloads and forwards results back to the client. You can run code, run tests, and inspect diagnostics in real time. AI agents using the MCP protocol can discover which tools are valid at each step (type-check, compile, run tests, inspect APIs) and execute only the actions that make sense for the current session state.

SageFs supports multiple editors concurrently. Open the same session from VS Code, Neovim, a terminal UI, a web dashboard, or an AI agent, and all clients share the same live session. This enables cross-editor workflows where test results, diagnostics, and browser refreshes stay in sync across tools.

How to install

Prerequisites

  • .NET 10 SDK installed on your machine
  • A machine capable of running a .NET tool and an F# project

Installation steps

  1. Install the SageFs CLI as a global dotnet tool:
dotnet tool install --global SageFs
  1. Ensure the tool is in your PATH. You can verify installation by running:
sagefs --version
  1. Start the SageFs daemon (one per machine or per user as desired):
sagefs
  1. Connect an editor or client to the daemon and create a session for your project. For example, in a compatible editor or via an MCP client:
# Example (pseudocode; actual client commands depend on your editor/plugin)
open_mcp_connection
POST /api/sessions/create with { "path": "/path/to/your/project" }

Notes

  • If you’re behind a firewall or need a specific port, configure SAGEFS_PORT or related environment variables as shown in the mcp_config.
  • The daemon shares sessions across multiple clients; you can attach more editors or AI agents to the same session for collaborative workflows.

Additional notes

Tips and common issues:

  • Prerequisites: Ensure .NET 10 SDK is installed and available in your PATH before installing SageFs.
  • If you modify PATH after installation, restart your shell so the sagefs command is found.
  • For AI agents, rely on the MCP affordance to expose only valid actions for the current session state, reducing wasted tokens.
  • The daemon uses a per-session FSI process; heavy project trees should rely on file watching and incremental type-check to keep feedback fast.
  • If you encounter connection issues, verify the daemon is running (sagefs) and that your client is pointing to the correct local host/port exposed by the daemon.
  • Environment variables you may want to adjust include SAGEFS_LOG_LEVEL for verbosity and SAGEFS_PORT to bind to a specific port.

Related MCP Servers

Sponsor this space

Reach thousands of developers