N-Query MCP (Preview)
Overview, Tools, and Client Integration Guide
Purpose
This documentation provides internal stakeholders with the necessary information to understand and consume the N-query MCP server, including:
- Overview & capabilities
- Environments & endpoints
- Authentication and token requirements
- IDE / LLM integration examples
- Usage verification and expected behavior
- Troubleshooting
- Additional references
1. Overview
N-query MCP provides an Apollo-compatible MCP server that enables LLM clients, developers, and automation systems to interact with N-query's GraphQL schema more effectively.
The MCP server is deployed within EKS and exposed via the N-query Router domain under the /mcp/preview endpoint. (see Environments & Endpoints for URLs).
Capabilities
The N-query MCP server exposes the following tools:
| Tool | Description |
|---|---|
| introspect | Allows for the N-query schema to be introspected. |
| search | Allows searching for schema fields, types, directives, etc. |
| validate | Validates GraphQL operations against the schema. |
| execute | Executes GraphQL operations against the schema. |
Once setup, the tools list should look like this:
MCP Server: N-query tools list.
2. Environments & Endpoints
The MCP server is deployed to multiple environments. LLM responses may be inaccurate.
| Environment | URL |
|---|---|
| Staging | https://stg.api.n-able.com/mcp/preview |
| Production | https://api.n-able.com/mcp/preview |
3. Authentication & Authorization
To communicate with the MCP server, consumers must provide a valid CTS token via the HTTP header:
Authorization: Bearer <CTS_TOKEN>
Permissions
The CTS token must grant access to the underlying domain data being queried or mutated via CAS.
CTS tokens inherit permissions from the SSO user who created them, meaning authorization depends on the creating user’s CAS permissions.
If a token does not have adequate permissions:
- Queries may fail
- Certain fields may not resolve
- Access may be denied at the CAS layer
- Result sets may be filtered or partially returned
4. IDE & LLM Integrations (Non-Exhaustive Examples)
These are examples, not the full set of supported integrations.
Any MCP-compatible IDE/LLM client may be used.
Example: GitHub Copilot - IntelliJ
Open GitHub Copilot Chat
Switch to Agent mode
Select Configure Tools
Add MCP server configuration:
{
"servers": {
"n-query": {
"url": "https://api.n-able.com/mcp/preview",
"requestInit": {
"headers": {
"Authorization": "Bearer <CTS_TOKEN>"
}
}
}
}
}Restart IntelliJ and the MCP tools should be visible.
Example: GitHub Copilot - VS Code
Update settings.json:
{
"servers": {
"n-query": {
"url": "https://api.n-able.com/mcp/preview",
"type": "http",
"headers": {
"Authorization": "Bearer <CTS_TOKEN>"
}
}
},
"inputs": []
}After restart, an Agent can invoke MCP tooling.
Example: Gemini CLI / Workspace
Example:
{
"mcpServers": {
"nquery": {
"httpUrl": "https://api.n-able.com/mcp/preview",
"headers": {
"Authorization": "Bearer <CTS_TOKEN>"
}
}
}
}Example: Claude Code
Example:
{
"mcpServers": {
"nquery": {
"type": "http",
"url": "https://api.n-able.com/mcp/preview",
"headers": {
"Authorization": "Bearer <CTS_TOKEN>"
}
}
}
}5. Verification & Example Query (Expected Behavior)
Once MCP is configured properly:
✔️ There should be no console errors
- No connection failures
- No token-related errors
- MCP tools visible to the Agent
✔ MCP n-query server visible to the agent
✔ Requests authenticated using CTS token
✔ Agent can resolve schema and execute queries
After verification, you can test functionality by asking:
"Give me the AssetCount"
The MCP agent should then:
- Use the execute tool
- Run a GraphQL query similar to:
query GetAssetCount {
assetSearch(first: 1) {
totalCount
}
}Expected raw MCP output:
{
"data": {
"assetSearch": {
"totalCount": "ASSETS_COUNT_NUMBER"
}
}
}Expected natural language response from the agent:
"You have “XX” assets in total."
This proves that:
- Auth is correct
- execute is functioning
- Router schema is reachable
- No console errors
- Query pipeline works end-to-end
6. Error Handling & Troubleshooting
| Error | Likely Cause | Resolution |
|---|---|---|
| 401 Unauthorized | Invalid or missing token | Provide valid CTS token |
| 404 Not Found | Wrong URL | Ensure /mcp/preview endpoint is included |
| Unknown MCP Tools | Misconfigured client | Reconfigure and restart IDE |
7. Additional References
N-query MCP Overview - https://portal.n-able.dev/docs/n-query/component/n-able-graphql-router/mcp/overview/
N-query in a nutshell - https://portal.n-able.dev/docs/default/system/n-query/
Apollo MCP Server - https://www.apollographql.com/docs/apollo-mcp-server
Updated 10 days ago