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 MCP-compatible AI clients, such as VS Code with GitHub Copilot, Cursor, Claude Desktop, or ChatGPT.
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](Visual Studio Code - The open source AI code editor |
| 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 |
The Foglight MCP Server supports any MCP-compatible AI client that can connect over HTTP. Below are configuration examples for the most common clients.
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.
Create or edit .cursor/mcp.json (project scope) or ~/.cursor/mcp.json (global scope):
{
"mcpServers": {
"FMS MCP Server": {
"type": "http",
"url": "https://<FOGLIGHT_MCP_ENDPOINT>/mcp",
"auth": {
"CLIENT_ID": "foglight-mcp",
"scopes": ["openid", "profile", "email"]
}
}
}
}
Authentication is handled via OAuth2. When you first connect, Cursor opens the identity provider login page automatically.
Open claude_desktop_config.json via Settings > Developer > Edit Config and add:
{
"mcpServers": {
"FMS MCP Server": {
"url": "https://<FOGLIGHT_MCP_ENDPOINT>/mcp"
}
}
}
Save the file and fully restart Claude Desktop. The Foglight tools will appear under the hammer icon in the chat input.
ChatGPT supports MCP servers over HTTP only. The Foglight MCP endpoint must be reachable from the internet.
ChatGPT MCP support requires developer mode and is available for Pro, Plus, Business, Enterprise, and Education plans (web only). See Developer mode and MCP apps in ChatGPT for prerequisites and plan-specific details.
To connect:
foglight-mcphttps://<FOGLIGHT_MCP_ENDPOINT>/mcpOAuthfoglight-mcp, default scopes openid, profile, email).For the full OAuth configuration fields, publishing workflow, and admin controls, refer to the OpenAI MCP documentation and ChatGPT developer mode guide.
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
Cause
During OAuth sign-in, your AI client sends a redirect URI back to the identity provider (for example, Keycloak). Each client uses its own native callback URI. If that URI is not registered as an allowed redirect URI on the foglight-mcp OAuth client, the identity provider rejects the request with:
HTTP 400 — Invalid parameter: redirect_uri
Resolution
Contact your Quest account manager and request that your AI client’s redirect URI be added to the allowed redirect URIs for the foglight-mcp OAuth client. Include the following in your request:
No wildcard is needed — provide the exact URI.
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.