Skip to content

09 Integrations and Plugins

Yuri Augusto Francisco de Paiva edited this page Dec 2, 2026 · 4 revisions

Integrations & Plugins

Farol runs in any MCP client. This page covers Claude Code and Visual Studio 2026 (validated for the MVP), Google Antigravity, GitHub Copilot and VS Code.


1. Claude Code Plugin (plugins/farol)

The Claude Code plugin provides the richest integration with Farol by pairing the MCP server with an automated post-edit verification hook and three skills.

plugins/farol/
├── .claude-plugin/
│   └── plugin.json       # Plugin manifest & marketplace metadata
├── .mcp.json             # MCP server declaration pinning Farol.Mcp
├── hooks/
│   └── hooks.json        # PostToolUse verification hook for C# and VB.NET
└── skills/
    ├── modernize/SKILL.md        # .NET Framework to modern .NET
    ├── maintain-legacy/SKILL.md  # changing code that stays on .NET Framework
    └── refactor/SKILL.md         # refactorings through Farol's write path

Installation

Add the repository marketplace and install the plugin directly from within Claude Code:

/plugin marketplace add yuriafp/Farol
/plugin install farol@farol

The PostToolUse Verification Hook

Whenever Claude Code edits a C# or VB.NET file using Edit, Write, or MultiEdit, the hook automatically intercepts the action and triggers Farol's dotnet_check:

{
  "type": "mcp_tool",
  "if": "Edit(**/*.cs)",
  "server": "plugin:farol:farol",
  "tool": "dotnet_check",
  "input": {
    "format": "hook",
    "edited": "${tool_input.file_path}"
  },
  "timeout": 60,
  "statusMessage": "Farol: checking the edit for new compiler errors"
}

A second entry does the same for Edit(**/*.vb).

  • Immediate Interception: The edited parameter forces Farol to read the edited file directly from disk, eliminating file watcher races.
  • Decision Blocking: If the edit introduced new compiler errors, Farol returns {"decision": "block", "reason": "..."}, immediately alerting the agent to fix the issue before proceeding.
  • Warning Injection: If new compiler warnings are introduced, Farol injects them into the agent's context as additionalContext.
  • Edits Farol does not check: the hook fires for every edit, so Farol first passes over files that are not C# or VB and paths outside the trusted directories, answering {}.
  • Its Own Solution (AC-44): the hook passes no workspace. In a root that holds no single solution (for example a folder of repositories), Farol uses the workspace in use whose folder holds the edited file, else the solution nearest above it, so each edit is checked against its own solution.
  • When No Solution Can Be Picked: Claude Code never shows an agent a hook's error, so Farol's first answer in a server process says, as added context, that it cannot tell which solution the file belongs to and how to name one (dotnet_workspace with action='load' and workspace set to the solution). Later answers are {}.
  • During a Load (AC-48, AC-49): the hook waits for the load only until it has run for Farol:HookLoadWaitSeconds (default 20 s) since its start, so later edits during the same load are not held. If the load is still running then, the answer is added context saying the edit is checked once the load is done, in the answer to the next edit. The edit is kept out of the load's baseline, so the first check after the load lists all of the file's errors and warnings as new.

The Skills (0.3.0)

Until 0.2.0 the plugin had one skill, farol. Since 0.3.0 it has three, by job:

  • modernize: inventory, portability, configuration, the migration plan and conversions.
  • maintain-legacy: changes to code that stays on .NET Framework.
  • refactor: renames, signatures, moves and extractions through Farol, checked after each step.

The server serves the same files to every client, as resources farol://skills/<name> and as the prompts skill_modernize, skill_maintain_legacy and skill_refactor. Visual Studio, VS Code and Antigravity get them without the plugin (Tools layer, section 5).


2. Visual Studio 2026 & GitHub Copilot Chat

Visual Studio 2026 (version 18.0+) supports MCP servers natively.

Configuration

Add Farol to .mcp.json next to your solution (or globally in %USERPROFILE%\.mcp.json):

{
  "servers": {
    "farol": {
      "type": "stdio",
      "command": "dotnet",
      "args": ["dnx", "Farol.Mcp@0.3.0", "--yes"]
    }
  }
}

Once configured, GitHub Copilot Chat in Agent Mode gets Farol's 23 tools.


3. Google Antigravity

Google Antigravity reads MCP configuration from %USERPROFILE%\.gemini\config\mcp_config.json.

Because Antigravity may launch MCP servers from its own installation directory rather than the active repository directory, configure Farol with a trusted path covering your source folder:

{
  "mcpServers": {
    "farol": {
      "command": "dotnet",
      "args": ["dnx", "Farol.Mcp@0.3.0", "--yes", "--", "--Farol:TrustedPaths:0", "C:/Users/<you>/source/repos"]
    }
  }
}

Trust the folder that holds your repositories rather than making it the root: a solution in the folder Farol starts in still loads on its own, and any solution under the trusted folder loads once a call names it. Farol's own options go after --, so dnx doesn't read them as its own. Tip: with Farol installed as a global .NET tool (dotnet tool install --global Farol.Mcp), the command is farol and the args are just the options.


4. Visual Studio Code

Not yet validated for the MVP (Claude Code and Visual Studio 2026 are); the configuration is the same as for Visual Studio.

Configure Farol in .vscode/mcp.json within your workspace:

{
  "servers": {
    "farol": {
      "type": "stdio",
      "command": "dotnet",
      "args": ["dnx", "Farol.Mcp@0.3.0", "--yes"]
    }
  }
}

5. NuGet Package Distribution (Farol.Mcp)

Farol is packaged as a framework-dependent .NET tool and published to nuget.org:

  • Package ID: Farol.Mcp
  • Package Types: DotnetTool and McpServer
  • Registry Metadata: Ships with .mcp/server.json conforming to the Model Context Protocol Registry schema.
  • Embedded BuildHosts: Ships with the required Roslyn MSBuild BuildHost binaries embedded in the package, enabling classic .NET Framework analysis even when run out of NuGet caches.

Execution Options

On-Demand Execution via dnx (Recommended)

Requires .NET 10 SDK:

dotnet dnx Farol.Mcp@0.3.0 --yes

Pass Farol-specific arguments after --:

dotnet dnx Farol.Mcp@0.3.0 --yes -- --read-only --offline

Global .NET Tool Installation

# Install
dotnet tool install --global Farol.Mcp

# Update
dotnet tool update --global Farol.Mcp

# Run
farol --read-only

6. MCP Registry

Farol is listed in the MCP Registry as io.github.yuriafp/farol, from 0.2.0 on. The server.json points at the Farol.Mcp NuGet package, whose README carries the mcp-name line the Registry verifies. The registry.yml workflow publishes it with GitHub OIDC when a GitHub release is published, retrying while nuget.org indexes the package; run by hand, it only validates.

Farol Wiki Documentation

Welcome to the official technical documentation for Farol, an open-source Model Context Protocol (MCP) server that equips AI coding agents (Claude Code, GitHub Copilot, Google Antigravity, Cursor, Codex) with compiler-accurate understanding of C# and VB.NET solutions.


Core Documentation

Clone this wiki locally