
SQL MCP for ServiceNow
🆕 Do you like it?
Now the same SQL engine is available as Kinto, a native certified app on the ServiceNow Store.
Chat from your browser: any authorized user without providing credentials, with answers in tables, charts and diagrams out of the box. And get answers to complex questions that other people were not prepared for and where other AIs fall short.
Or use the JavaScript API (SQL runs on Rhino) to automate your processes with answers grounded in live ServiceNow data. Don't scale guesswork.
With full traceability down to the database cell for the strictest audits.
A SQL Editor with a Pivot Table for analytics from your browser.
Or you can use it as a free VS Code extension:
This SQL MCP extension for VS Code turns ServiceNow's APIs into a virtual SQL database you can query in natural language.
You can literally:
Use the Claude Code / Codex chat to ask your ServiceNow instance anything about your data in natural language. No SQL skills needed: LLMs write SQL queries on behalf of the user.
Use it from an MCP powered by SQL. It makes a great difference when your Vibe Coding Development Environment is capable of talking to ServiceNow data: write code, then explore, audit, troubleshoot, create test data, verify results and fix code, the way a senior admin would.
Try asking:
- "Which incidents in the Network group have been open for more than 30 days?"
- "Which business rules run before insert on incident, and what do they do?"
- "Create 20 test incidents for the Service Desk group."
🧩 What it is
A virtual database means that all the tables are empty and are populated in real time to answer users' queries.
It runs as the user calling it, enforcing ACLs and Business Rules.
It does not use any native SQL access to ServiceNow: it runs its own SQL engine, purpose-built for ServiceNow.
An MCP with one tool only: execute_sql, to reduce mistakes and hallucinations.
The LLM can:
- explore the data model with SHOW TABLES and SHOW COLUMNS FROM
- read data: SELECT, transpiled to GraphQL for maximum efficiency
- write data: INSERT, UPDATE and DELETE, transpiled to the REST Table API
- aggregate data: COUNT, SUM, AVG, MIN and MAX with GROUP BY, transpiled to the REST Aggregate API
SQL injection is impossible since virtual SQL queries never reach your ServiceNow instance.
Zero data copy: nothing to install in your instance. No additional entitlement required. Tested on Zurich and later releases.
🎯 Why SQL MCP
It spreads knowledge, not only answers. It's capable of reasoning about ServiceNow data and providing precise answers to complex questions in long conversations.
Hallucinations are drastically reduced. With SQL, every answer is grounded in live ServiceNow data: when the LLM is connected to a source of truth, it has no reason to make things up. And with no tool catalog, the LLM never has to figure out which tool is the right one.
With a virtual database, all the deterministic data computing is done outside the LLM, reducing token consumption and mistakes. Don't pay for an LLM to pretend to be a relational database.
No more LLM black boxes: you can see how the LLM interprets your intent by reading the SQL it generates.
It has been tested with commercial (GPT, Claude) and open-weight (DeepSeek, GLM, gpt-oss and MiniMax M3) LLMs.
🚀 Setup (3 minutes)
🚨 Use a capable model in an MCP client such as Claude Code or OpenAI Codex. 🚨
Watch the setup video for a step-by-step guide.
Requirements
- A ServiceNow instance with the GraphQL, REST Table and Aggregate APIs enabled.
- An OAuth2 client (client ID + secret) with the password grant, and the credentials of the user the MCP will run as.
- Two system properties, in Global scope:
glide.oauth.inbound.ropc.grant_type.disabled set to false, so the password grant is allowed.
glide.authenticate.multifactor.for_integrations set to false, only if that user has MFA: the extension sends the password without an MFA code.
- Read access for that user to
sys_db_object, sys_dictionary and sys_documentation.

- Install the extension from the VS Code Marketplace.
- Configure Connection: Open the Command Palette (
Ctrl+Shift+P) and run SQL MCP for ServiceNow: Configure Connection. Credentials are encrypted and stored in sn_auth.config at your workspace root. Keep this file out of version control.
- Sync Metadata: Run
SQL MCP for ServiceNow: Refresh Tables Cache. Tables are stored in sn_tables.cache at your workspace root.
- Connect your MCP client:
- Claude Code:
./.mcp.json is auto-created/updated in your workspace after connection setup, and refreshed each time VS Code starts. You can also run SQL MCP for ServiceNow: Copy MCP Config for Claude.
- OpenAI Codex:
~/.codex/config.toml is auto-created/updated after connection setup (inside a managed block), and that block is refreshed each time VS Code starts. You can also run SQL MCP for ServiceNow: Copy MCP Config for Codex.

📝 SQL Editor
For when you want to run the queries yourself: open a .snsql file and get IntelliSense, execution (Ctrl+Shift+E, Cmd+Shift+E on macOS), multi-table joins, and the labels shown in the UI for choice and reference fields with DISPLAYVALUE().

-- Display all tables
SHOW TABLES
-- Display columns of a given table
SHOW COLUMNS FROM incident
-- Get assignee for incidents
SELECT i.number as [Incident], u.name as [Assignee]
FROM incident i
JOIN sys_user u ON i.assigned_to = u.sys_id
-- Use DISPLAYVALUE() to transform references, dates, currencies, etc. into the values displayed in the UI
SELECT i.number as [Incident], DISPLAYVALUE(i.priority) as [Priority]
FROM incident i
WHERE i.active = true
LIMIT 10
-- The same label without DISPLAYVALUE(): join sys_choice
SELECT i.number as [Incident], c.label as [Priority]
FROM incident i
JOIN sys_choice c ON c.value = CAST(i.priority AS STRING)
AND c.element = 'priority'
AND c.name = 'task'
AND c.language = 'en'
WHERE i.active = true
LIMIT 10
⚙️ Settings
sql-servicenow.maxResults: Maximum rows read from ServiceNow per query (default: 10,000).
💬 Feedback
Found a bug? Have an idea? Open an issue on GitHub.
⭐⭐⭐⭐⭐ If SQL MCP for ServiceNow saved you time and you find it useful, writing a quick review on the Marketplace helps other ServiceNow developers find it. It takes 30 seconds and makes a real difference.
👥 Who's behind this?
KintoSoft. Saving marriages between developers and ServiceNow since 2026.