Skip to main content
Version: 3.x

Fig MCP Server

The Fig MCP (Model Context Protocol) Server enables AI tools such as GitHub Copilot CLI, Claude Desktop, Cursor, and other MCP-compatible clients to interact with your Fig configuration management system.

Experimental

This integration is experimental and may not work as expected. Create a ticket on GitHub if a problem is found.

Features

  • Configuration Analysis: Ask AI to review settings across all clients, identify patterns, and suggest improvements
  • Anomaly Detection: Let AI spot unusual values, inconsistencies, or misconfigured settings
  • Event Log Queries: Query event logs and setting change timelines through natural language
  • Session Monitoring: View active client run sessions with health, memory, and version info
  • Setting History: Review the value change history of any setting
  • Operational Management (opt-in): Update setting values, manage webhooks, lookup tables, users, and more
  • Configurable Safety: Each operation category can be independently enabled or disabled — read-only by default

Architecture

Fig.Mcp is a standalone ASP.NET Core application that proxies requests to the Fig API over HTTP. It does not connect to the database directly. This design provides:

  • Deployment independence — deploy and scale separately from the API
  • Isolated attack surface — the MCP server runs in its own process
  • Simple operation gating — disabled tools are simply not registered, so the AI never sees them
  • Easy testing — mock HTTP responses without needing a full API bootstrap
┌──────────────┐     MCP Protocol      ┌──────────────┐    REST/HTTP     ┌──────────────┐
│ AI Tool │ ◄──────────────────► │ Fig.Mcp │ ◄──────────────► │ Fig.Api │
│ (Copilot, │ (stdio or HTTP) │ MCP Server │ (JSON + JWT) │ │
│ Claude, │ │ │ │ │
│ Cursor) │ └──────────────┘ └──────────────┘
└──────────────┘

Transport Modes

Fig.Mcp supports two MCP transport modes:

ModeUse CaseHow It Works
stdio (default)Local AI tools (Copilot CLI, Claude Desktop, Cursor)AI tool launches fig-mcp as a subprocess
HTTPRemote/server-side AI agents, hosted tool platformsRuns as an HTTP server with Streamable HTTP + SSE

Configuration

All settings are configured via appsettings.json or environment variables.

Basic Settings

{
"McpSettings": {
"FigApiBaseUrl": "https://localhost:7281",
"Username": "admin",
"Password": "your-password",
"Transport": "stdio"
}
}
SettingDescriptionDefault
FigApiBaseUrlURL of the Fig APIhttps://localhost:7281
UsernameFig user to authenticate asadmin
PasswordPassword for the Fig user(empty)
Transportstdio or httpstdio

Environment variable override format: McpSettings__FigApiBaseUrl, McpSettings__Password, etc.

Tool Gates

Each tool category can be independently enabled or disabled. By default, all reads are enabled and all writes are disabled.

{
"McpSettings": {
"ToolGates": {
"ReadSettings": true,
"WriteSettings": false,
"ReadEvents": true,
"ReadSessions": true,
"ReadHistory": true,
"ManageClients": false,
"DeleteClients": false,
"ManageUsers": false,
"ManageWebHooks": false,
"ManageLookupTables": false,
"ManageScheduling": false,
"ManageTimeMachine": false,
"ExecuteCustomActions": false,
"ImportExportData": false,
"ManageConfiguration": false
}
}
}

Disabled tools are not registered with the MCP server — the AI never sees them and cannot invoke them.

Setup

GitHub Copilot CLI

Add to .github/copilot/mcp.json in your repository:

{
"servers": {
"fig": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/src/mcp/Fig.Mcp"],
"env": {
"McpSettings__FigApiBaseUrl": "https://localhost:7281",
"McpSettings__Username": "admin",
"McpSettings__Password": "your-password"
}
}
}
}

Claude Desktop

Add to your claude_desktop_config.json:

{
"mcpServers": {
"fig": {
"command": "dotnet",
"args": ["run", "--project", "/path/to/src/mcp/Fig.Mcp"],
"env": {
"McpSettings__FigApiBaseUrl": "https://localhost:7281",
"McpSettings__Username": "admin",
"McpSettings__Password": "your-password"
}
}
}
}

HTTP Mode (Remote Agents)

Run the MCP server as an HTTP service:

McpSettings__Transport=http dotnet run --project src/mcp/Fig.Mcp -- --urls http://localhost:3001

Docker

docker run -e McpSettings__FigApiBaseUrl=http://fig-api:8080 \
-e McpSettings__Username=admin \
-e McpSettings__Password=your-password \
-e McpSettings__Transport=http \
-p 3001:8080 \
mzbrau/fig-mcp:latest

Or using docker-compose (see docker-compose.yml in the repository root).

Available Tools

Read-Only Tools (enabled by default)

ToolGateDescription
ListClientsReadSettingsList all registered clients with settings
GetClientDescriptionsReadSettingsLightweight client name + description list
GetEventsReadEventsQuery event logs by time range
GetEventCountReadEventsTotal event log count
GetClientTimelineReadEventsSetting change timeline for a client
GetSettingHistoryReadHistoryValue history for a specific setting
GetLastChangedReadHistoryLast-changed timestamps across all clients
GetRunSessionsReadSessionsActive client sessions with health info
GetApiVersionReadSettingsFig API version
GetApiStatusReadSettingsAPI health status
ListLookupTablesReadSettingsAll lookup tables
ListWebHooksReadSettingsAll webhooks
ListWebHookClientsReadSettingsWebhook clients
ListCheckPointsReadSettingsTime machine checkpoints
GetCheckPointDataReadSettingsCheckpoint payload
ListDeferredChangesReadSettingsScheduled setting changes
GetCustomActionStatusReadSettingsCustom action execution status
GetCustomActionHistoryReadSettingsCustom action execution history
GetDeferredImportsReadSettingsPending deferred imports
GetClientRegistrationHistoryReadSettingsClient registration history

Write Tools (disabled by default)

ToolGateDescription
UpdateSettingValuesWriteSettingsUpdate setting values for a client
ToggleLiveReloadWriteSettingsEnable/disable live reload for a session
RequestClientRestartWriteSettingsRequest a client restart
ChangeClientSecretManageClientsRotate a client's secret
DeleteClientDeleteClientsDelete a client
CreateLookupTableManageLookupTablesCreate a lookup table
UpdateLookupTableManageLookupTablesUpdate a lookup table
DeleteLookupTableManageLookupTablesDelete a lookup table
CreateWebHookManageWebHooksCreate a webhook
UpdateWebHookManageWebHooksUpdate a webhook
DeleteWebHookManageWebHooksDelete a webhook
TestWebHookClientManageWebHooksTest webhook connectivity
ApplyCheckPointManageTimeMachineRestore to a checkpoint
UpdateCheckPointNoteManageTimeMachineAdd note to checkpoint
RescheduleDeferredChangeManageSchedulingReschedule a deferred change
DeleteDeferredChangeManageSchedulingCancel a scheduled change
ExecuteCustomActionExecuteCustomActionsExecute a custom action
ListUsers / GetUser / CreateUser / UpdateUser / DeleteUserManageUsersUser management
ExportData / ImportData / ExportValuesOnly / ImportValuesOnlyImportExportDataData import/export
GetConfiguration / UpdateConfigurationManageConfigurationAPI configuration

Example AI Interactions

Once connected, you can ask your AI tool questions like:

  • "List all registered Fig clients and summarize their settings"
  • "Are there any settings with empty or default descriptions that should be documented?"
  • "Show me the event log for the last 24 hours — are there any unusual patterns?"
  • "Which clients have the most settings? Are any over-configured?"
  • "Compare the settings between the production and staging instances of ServiceX"
  • "Show me the value history for the DatabaseConnectionTimeout setting"
  • "Which clients haven't reported a run session recently?"

Security Considerations

  • The MCP server authenticates to the Fig API using a pre-configured user's credentials
  • It inherits the permissions of that user — a ReadOnly user cannot perform write operations
  • Tool gates provide an additional layer of protection at the MCP level
  • For production, use environment variables or secret providers for credentials — never commit passwords
  • In HTTP transport mode, consider network-level access controls (firewall, VPN, etc.)