---
name: iblai-connect-servicenow
description: "Read and write ServiceNow data through the ServiceNow REST API (Table API), REST API Explorer and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with ServiceNow data, or to set up a ServiceNow MCP connection on ibl.ai."
metadata:
  kind: guide
---

# ServiceNow connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/servicenow — not part of the iblai/vibe repository. Checked against ServiceNow, Inc.'s documentation on October 20, 2026; test it against your own ServiceNow setup before you rely on it.

ServiceNow is a workflow platform for IT service management, HR and customer service. Each instance stores records in tables such as incident, problem, change_request, sys_user, the CMDB and knowledge articles.

## Auth & conventions

- **API:** ServiceNow REST API (Table API), REST API Explorer (REST). The Table API gives create, read, update and delete on any table the caller's roles allow, at /api/now/table/{tableName}. Filter with encoded sysparm_query; page with sysparm_limit, sysparm_offset and the Link header.
- **Base URL:** https://{instance}.servicenow.com/api/now/table/{tableName}
- **Access:** Issued by your administrator. Credentials come from the customer's own instance: an admin creates an integration user with roles that grant table access, or registers an OAuth client. Test calls in the instance's REST API Explorer.
- **Auth:** Basic authentication (instance user); OAuth 2.0 authorization code (MCP Server Console). Table API examples use basic auth with an instance user; the calling user needs roles for the table. MCP Server Console supports only OAuth 2.0 authorization code, via Machine Identity Console or an external IdP.
- **Limits:** Table API sysparm_limit defaults to 10,000 records per call and is applied before ACL evaluation; paginate with sysparm_offset or the Link header. Very large limits can hurt instance performance.
- Keep ServiceNow credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Incidents** — GET /api/now/table/incident with sysparm_query filters, e.g. active=true^priority=1.
- **Change and problem records** — GET /api/now/table/change_request and /api/now/table/problem.
- **Users and groups** — Read sys_user and group tables, subject to the caller's roles and ACLs.
- **Any table by name** — Table API reads any table the caller can access; sysparm_fields limits returned columns.

## Writes

- **Create records** — POST /api/now/table/{tableName}, e.g. open a new incident.
- **Update records** — PUT or PATCH /api/now/table/{tableName}/{sys_id}, e.g. reassign or resolve an incident.
- **Delete records** — DELETE /api/now/table/{tableName}/{sys_id}; returns 204. **Confirm with the user first.**

## Expose it to an ibl.ai agent (MCP)

ServiceNow, Inc. publishes an official MCP server, ServiceNow MCP Server Console (https://www.servicenow.com/docs/r/intelligent-experiences/configuring-mcp-server-console.html). Register it below as-is, or host your own server that wraps the calls in this skill.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/vibe --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - ServiceNow supports per-user OAuth: `auth_type=oauth2` with `auth_scope=user` and a linked `oauth_service` makes each person connect their own account in the chat. It needs an `auth_{provider}` credential in the organization's credential store first.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "List all open P1 incidents assigned to the Network group"
- "Create an incident: VPN down for the Boston office, impact 2, urgency 1"
- "What changes are scheduled for this weekend?"
- "Resolve INC0012345 with the note 'Router replaced'"

## Guardrails

- Records can hold employee and customer personal data, HR case details and security incident data. ServiceNow offers a U.S. Government Community Cloud and a National Security Cloud for federal use.
- Request the narrowest ServiceNow scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Respect the documented limits above: page through results and back off on rate-limit responses instead of retrying in a loop.

## References

- Table API reference (Zurich): https://www.servicenow.com/docs/bundle/zurich-api-reference/page/integrate/inbound-rest/concept/c_TableAPI.html
- Configure MCP Server Console: https://www.servicenow.com/docs/r/intelligent-experiences/configuring-mcp-server-console.html
- ServiceNow MCP Server Console: https://www.servicenow.com/docs/r/intelligent-experiences/configuring-mcp-server-console.html
- This connector on ibl.ai: https://ibl.ai/developer/connectors/servicenow
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
