The Foglight MCP Server enables integration between Foglight and AI-powered development tools through the Model Context Protocol (MCP). This allows developers and administrators to interact with Foglight monitoring data directly from VS Code using GitHub Copilot or other MCP-compatible clients.
This section covers the following key areas:
This section explains what MCP (Model Context Protocol) is and what the Foglight MCP Server provides. It is written for readers who are already familiar with Foglight concepts (FMS, agents, alarms, PI/Performance Investigation, Top SQL), but are new to MCP.
MCP (Model Context Protocol) is an open protocol that lets an AI client (for example, an assistant built into an IDE or chat tool) call tools exposed by a server.
In practice, MCP provides:
Think of MCP as a “connector” layer between an AI assistant and operational systems like Foglight.
Foglight already contains rich monitoring and performance data. MCP makes that data easier to use in interactive workflows where you want to:
MCP does not replace the Foglight UI. It provides a programmatic interface that AI clients can use to help you navigate Foglight data faster.
The Foglight MCP Server is an MCP server that exposes Foglight data through a set of tools.
Typical capability areas include:
| Capability | Description |
|---|---|
| Alarms | Get current and historical alarms, and summary statistics |
| Agents and infrastructure | List monitored agents and agent managers |
| Database Performance Investigation (PI) | Instance list, highlights, resource breakdown, top queries |
| TopSQL (cross-database) | Top statements across domains ranked by impact and other metrics |
| Topology / GraphQL | Execute GraphQL queries for advanced topology/metric access |
Exact tool names and parameters depend on the server build and deployment configuration, but the usage pattern is consistent.
Use these when you want to answer “What is wrong right now?” or “What happened last week?”
Examples of questions you can ask:
Use these when you want to understand what Foglight is monitoring and whether collection infrastructure looks healthy.
Examples of questions you can ask:
Use these when you want to diagnose database performance.
Examples of questions you can ask:
Use this when you want the most impactful statements across all monitored databases.
Examples of questions you can ask:
Use GraphQL when you need access to Foglight topology properties/metrics not covered by the higher-level tools.
GraphQL queries require correct Foglight topology field names. Many deployments use a workflow like: search schema for the right fields, generate a GraphQL query, then execute the query.
Examples of questions you can ask:
Before you start, ensure you have the following:
| Requirement | Description |
|---|---|
| Visual Studio Code | Install Visual Studio Code |
| Foglight MCP endpoint | Access to your Foglight MCP endpoint: https://<FOGLIGHT_MCP_ENDPOINT>/mcp |
| Foglight Cloud account | A Foglight Cloud account with permission to access Foglight Server |
To add the MCP server to VS Code:
.vscode/mcp.json.{
"servers": {
"foglight-mcp-sso": {
"type": "http",
"url": "https://<FOGLIGHT_MCP_ENDPOINT>/mcp"
}
}
}
Do not add any extra credential prompts unless instructed for your environment. Keep the URL exactly as provided for your environment.
When you use a Foglight MCP tool for the first time, VS Code opens an interactive sign-in flow automatically.
To sign in:
foglight-mcp.To validate that the MCP server is working correctly, try one of these simple read-only checks in your AI client:
If SSO is working, you should receive results after signing in.
This section provides solutions for common issues when connecting to the Foglight MCP Server.
Cause
This error typically occurs when:
/mcp or wrong host)Resolution
https://<FOGLIGHT_MCP_ENDPOINT>/mcp in a browser and confirm you can sign in.Cause
Your user or group is not allowed to access Foglight MCP.
Resolution
Request access to the Foglight MCP application/role in your IdP.
Cause
This issue typically occurs when:
Resolution
The following capabilities are not currently supported by the MCP Server:
These limitations may be addressed in future releases.
Does MCP mean Foglight data is sent to a public AI service?
Not necessarily. MCP describes how an AI client calls tools. Where the AI model runs and what data is shared depends on your deployment and the client configuration.
Should I use GraphQL for everything?
Usually no. Prefer the higher-level tools (Alarms, PI, TopSQL) for common operations. Use GraphQL for advanced/custom data retrieval.
What if a tool returns an ID or compressed SQL text?
That is expected in some workflows. Use the returned IDs to call the next tool in the chain. Use the decompress tool when a response provides compressed/encoded SQL text.