Fluent (ServiceNow SDK)

by modesty

Not rated
GitHub

About

Manage ServiceNow metadata, modules, records, and tests using Fluent, a TypeScript-based declarative DSL. Supports all ServiceNow SDK CLI commands.

Details

Author
modesty
Categories
Developer Tools, Other, Automation, API

Setup

Install Fluent (ServiceNow SDK) in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/modesty/fluent-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

AnMCP serverthat bringsServiceNow Fluent SDKcapabilities to AI-assisted development environments. Enables natural language interaction with ServiceNow SDK commands, API specifications, code snippets, and development resources.

Note: Since v0.6.0 the server speaksbothMCP@2026-07-28andMCP@2025-11-25from one handler set — the stdio entry inspects the opening message and serves whichever era the client opens with.v0.5.1is the last release built on the v1 MCP SDK (2025-11-25 only).

- SDK Command Tools-sdk_infoplus ServiceNow SDK command tools forinit,build,install,dependencies,transform,download,clean,pack,explain,query, andcicd
- Rich Resources- API specifications, instructions, and code snippets for67 ServiceNow metadata types
- API Documentation Lookup-explain_fluent_apireturns SDK docs for any Fluent API or guide — no project required
- Lazy Auto-Authentication- Detects and caches an auth profile only when an auth-requiring command orcheck_auth_statusneeds it
- Explicit Project Context- Resolves each project command from itsworkingDirectoryargument, the initialized session, orFLUENT_MCP_WORKING_DIR, then fails with actionable guidance instead of guessing
- MCPB Bundle- Builds a self-contained.mcpbdistribution with the server, resources, and production dependencies
- Client-Friendly Schemas- Optional inputs advertise their canonical value types while the enforced schema acceptsnullas an omitted-value compatibility form

This MCP server implements theModel Context Protocolspecification with the following capabilities:

- Resources- 300+ resources across 67 ServiceNow metadata types (API specs, instructions, snippets, prompts)
- Tools- 13 ServiceNow SDK command tools plus 4 resource/auth tools (17 total), with full parameter validation. Read tools (get-api-spec,get-snippet,get-instruct,check_auth_status) declare anoutputSchemaand returnstructuredContentfor programmatic consumers
- Prompts- Development workflow templates for common ServiceNow tasks (coding_in_fluent,create_custom_ui)
- Logging & Progress- Structured logs are written to stderr; progress notifications are sent for long-running commands (any command with a 30s or longer timeout — deploy, build, transform, download, dependencies, query, pack, cicd) when the client supplies a progress token

The server requiresno client capabilitiesand issuesno server→client requests: Roots, Sampling, and Elicitation are not used (MCP 2026-07-28 removed server-initiated requests, and all input arrives with thetools/callarguments). Automatic workspace detection through Roots is gone for every client, including MCPB hosts.

- Session Management- Tracks the directory established byinit_fluent_appfor subsequent project commands
- Working Directory Resolution-workingDirectorytool argument → initialized session →FLUENT_MCP_WORKING_DIR→ actionable failure. Accepted paths are non-empty absolute paths other than the filesystem root. The server never guesses from its process cwd or installed package directory. Clients must passworkingDirectoryor configureFLUENT_MCP_WORKING_DIRwhen no session directory exists.
- Non-interactiveinit_fluent_app- Intent-specific arguments must be supplied with the call (creation:appName,packageName,scopeName,template; conversion:from); a missing argument fails with an error naming exactly what is absent. The tool does not prompt or elicit missing values.
- Error Handling- Comprehensive error messages with actionable guidance
- Type Safety- Full TypeScript implementation with strict typing

- Dual-era stdio: a 2026-07-28 opening (per-request_metaenvelope,server/discover) and a 2025-11-25initializeare both served from the same handler set; the SDK entry point pins one era per connection.
- The six cacheable results of 2026-07-28 (tools/list,prompts/list,resources/list,resources/templates/list,resources/read,server/discover) advertisettlMs: 3600000/cacheScope: 'public'— everything they return is static for the process lifetime.
- The server advertises instructions during initialization;tools/listis a side-effect-free read that returns tools in deterministic name order.
- Optional tool arguments advertise their canonical JSON types so clients render normal form fields. The enforced call schema additionally acceptsnullas an omitted value;workingDirectoryalso treats an empty string as omitted before applying the fallback chain.
- Structured logs go to stderr, keeping stdout reserved for MCP protocol traffic. Runtimelogging/setLevelandnotifications/messageare not used.
- Resource misses use the standard JSON-RPC invalid-params code (-32602).

# Test with MCP Inspector npx @modelcontextprotocol/inspector npx @modesty/fluent-mcp # Build the optional self-contained MCPB distribution npm run bundle # Or use in your MCP client (see Configuration below)

The optionalnpm run bundlecommand producesfluent-mcp-<version>.mcpb. The bundle containsdist/,res/, and production dependencies, and itsmanifest.jsondeclares all 17 tools. MCPB hosts expose these user-configurable values to the server:

- FLUENT_MCP_WORKING_DIR— optional default project directory; otherwise passworkingDirectoryon project-aware tool calls
- SN_INSTANCE_URL— optional instance URL for lazy authentication validation
- SN_AUTH_TYPE— authentication type (basicoroauth, defaultoauth)

The npm package remains the primary distribution channel. MCPB does not restore Roots-based workspace detection or interactiveinit_fluent_appprompting.

Create a new Fluent app in ~/projects/time-off-tracker to manage employee PTO requests

Note:Authentication is validated lazily on the first auth-requiring command orcheck_auth_status, then cached for the session. Useinit_fluent_appto establish project context, passworkingDirectoryper call, or setFLUENT_MCP_WORKING_DIR. Any optional argument sent asnullis treated as omitted;workingDirectoryalso treats an empty string as omitted and falls through to the next source.

Looking up Fluent APIs withexplain_fluent_api

explain_fluent_apiwrapsnow-sdk explainand returns SDK documentation for any Fluent API classortopic guide. It works from any directory — no Fluent project required.

topicmatches an API name (e.g.BusinessRule,Acl), a guide name (e.g.business-rule-guide,atf-guide), or a tag keyword (e.g.flow,atf,email). The SDK resolves by exact name first, then by tag.

Standardized URI patterns following MCP specification:

67 metadata types across the following categories:

Core Types:acl,application-menu,business-rule,client-script,cross-scope-privilege,data-policy,form,import-set,instance-scan,list,property,role,scheduled-script,script-action,script-include,scripted-rest,sla,state-model,table,ui-action,ui-page,ui-policy,user-preference

Service Catalog:catalog-item,catalog-item-record-producer,catalog-ui-policy,catalog-client-script,catalog-variable,variable-set

Email:email-notification,inbound-email-action

Automation & Workflow:flow,custom-action,playbook

Integration & Connections:alias,alias-template,retry-policy,rest-message,data-lookup

AI & Now Assist:ai-agent,ai-agent-workflow,now-assist-skill-config

Service Portal:service-portal,sp-header-footer,sp-page-route-map

Workspace & Analytics:workspace,dashboard

ATF (Automated Test Framework):atf-appnav,atf-catalog-action,atf-catalog-validation,atf-catalog-variable,atf-email,atf-form,atf-form-action,atf-form-declarative-action,atf-form-field,atf-form-sp,atf-list,atf-reporting,atf-rest-api,atf-rest-assert-payload,atf-server,atf-server-catalog-item,atf-server-record,atf-ui-test-script

This release of the MCP server tracks@servicenow/sdk4.10.1, covering the authoring-surface additions shipped across 4.10.0 and 4.10.1:

- New metadata type:state-model— theStateModelAPI defines a table'sstate machine(states, transitions, and the conditions that gate them) in a single call, writingsttrm_model/sttrm_state/sttrm_state_transition/sttrm_transition_conditionrecords, or thechg_model/prb_model/prb_task_modelsubclass auto-selected fromtable. It can also edit out-of-box models in place by referencing their real sys_ids.
- New metadata type:atf-list— theatf.list.ATF steps (relatedListVisibility,applyFilterToList,recordPresentInList,openRecordInList,listUIActionVisibility,clickListUIAction) exercise list and related-list UI behavior.
- New tools:cicd_fluent_app(install/publish/rollback an app through thesn_cicdAPI — changes instance state) andcicd_fluent_test(run, watch, or fetch results for ATF suites and tests), wrapping the newnow-sdk cicdcommand.query_fluent_recordsgainsselectfor the new--selectpath extractor.
- $meta.useEsLatest— new cross-cutting flag that runs a record's script field(s) at the latest ECMAScript version the platform supports. It reaches the APIs whose type carries$meta(BusinessRule,Acl,ScriptInclude,ScriptAction,ScheduledScript,UiPage,RestApiroutes,SPWidget,SPMenu, and others) —not every API with a server-side script field:StateModeltransition conditions are server-side scripts whose type accepts no$metaat all (see the source-of-truth note below).
- Tableactionsobject formactionsnow accepts the exportedTableActionAccessshape{ read?, update?, delete?, create? }, where each action is three-state.The array form is deprecated: it is a complete enumeration, soactions:
['read']also writes the other three asfalse. The SDK also no longer derives defaults foractions,allowClientScripts,allowNewFields,allowUiActions,allowWebServiceAccess, ormaxLength.
- Reference columnmtom— creates a many-to-many relationship. Note the semantic split:referenceKeyno longer means many-to-many, and now stores a field from the referenced table in place ofsys_id.
- UI Action iconsUiAction'sformandlistobjects both accepticonNameandshowIconOnly.
- Form$metaFormnow honors$meta.installMethodto route its output folder (previously accepted but inert).
- PlaybooktimerSchedulestartWithDelaycan evaluate its delay against acmn_schedulerecord instead of elapsed clock time, on all three variants.
- Catalog dynamic default values— a variable'sdependentQuestionwidened to accept aReferenceVariable/RequestedForVariablein addition to a name string;CatalogUiPolicyactions acceptvariable, andCatalogClientScriptacceptsorder.
- $overrideonsys_
fields$overridecan setsys_domainand most othersys_columns on any table;sys_id,sys_scope,sys_update_name, andsys_domainpathremain framework-managed and error if overridden.
- Service Portal— widget/page/instance CSS fields accept SCSS or CSS,widgetParametersnow correctly serializes a plain object,SPInstance's placeholder properties are functional rather than ignored, andurlSuffixaccepts hyphens. Theservice-portalspec also gained the previously undocumentedServicePortal()(sp_portal) API.

Source-of-truth note: several release-note claims are not corroborated by the installed package and were treated as corrections — "dependent questions" are adynamic default value, not visibility or option control (and the property is not new, only its type widened);runServerSideScript"surface support" already shipped in 4.9.0; and theadd_messageinference change is an internal transform fix with no authoring-surface change. The overview guide also listsStateModel,AliasTemplate,InboundEmailAction,CatalogItem,CatalogItemRecordProducer, and the instance-scan checks as accepting$meta.useEsLatest, but their declarations carry no$meta. See.mosey/upgrade-sdk-4.10.1.md.

This release of the MCP server tracks@servicenow/sdk4.9.0 — a maintenance and bug-fix release (Flow, ClientScript, ImportSet, SLA transform/build reliability) with select authoring-surface additions:

- New metadata type:atf-ui-test-script— theatf.uiTestScript.runTest()ATF step runs a TestingLibrary test body in the client test runner to test custom UI components (Angular/React widgets, embedded SPAs, custom workspaces,now-web components) that the standardatf.form./atf.catalog.steps cannot reach.
- Multi-language choice labels— a choice field'schoicesvalue may be an array ofChoiceConfigobjects, each with alanguage(BCP 47) key, producing one translatedsys_choicerecord per language.
- protectionPolicyon AI Agent & AI Agentic WorkflowAiAgentandAiAgenticWorkflowacceptprotectionPolicy: 'read' | 'protected'for post-install access control.
- Role.federatedId— optional identifier to match a role to an externally federated role during identity federation.
- Table index platform columns— a tableindexentry'selementmay reference platform default columns (for example,sys_created_on).
- Now Assist Skill Kit providers— new LLM providers selectable by name:Now LLM LTS Generic,Google Cloud Vertex AI,Amazon Bedrock.

Source-of-truth note: two release-note claims are not corroborated by the installed package and were treated as corrections — Formtable_field.fieldis documented as a schema column name (not loosened to "any string"), and the four named NASK model strings appear nowhere in the package (modelis a free string). See.mosey/upgrade-sdk-4.9.0.md.

This release of the MCP server tracks@servicenow/sdk4.8.0 and adds support for the following Fluent APIs and SDK enhancements:

- New metadata type:playbook— thePlaybookDefinitionAPI (sys_pd_process_definition, from@servicenow/sdk/automation) for guided, record-driven multi-step processes with lanes, activities, triggers, and inputs/outputs.
- New metadata type:rest-message— theRestMessageAPI (sys_rest_message) for outbound HTTP integrations with shared auth/headers and callable functions.
- New metadata types:aliasandalias-template— theAlias(sys_alias) andAliasTemplate(sys_alias_templates) APIs for Connection & Credential aliases and reusable connection-setup templates.
- New metadata type:retry-policy— theRetryPolicyAPI (sys_retry_policy) controlling transient-failure handling for connections (fixed-interval, exponential-backoff, orRetry-After).
- New metadata type:data-lookup— theDataLookupAPI (dl_definition) that auto-copies field values from a matcher table to a source record.
- Declarative deletion (Now.del())— top-level statement to remove records by coalesce keys or sys_id.
- Type enhancements$overrideonDataPolicy/UserPreference;$meta.installMethodonRecord/Acl/Alias/UserPreference; ACLfieldaccepts known field names, system columns, or'';TableaccessibleFromnow defaults to'public'.
- New CLI toolquery_fluent_recordswrapsnow-sdk queryfor read-only Table REST queries (JSON envelope output).

This release of the MCP server tracked@servicenow/sdk4.7.x and added support for the following Fluent APIs and SDK enhancements:

- New metadata type:data-policy— theDataPolicyAPI (sys_data_policy2) for server-side mandatory/read-only field enforcement that cannot be bypassed via API, import, or web service.
- Flow error handling & parallelismwfa.flowLogic.tryCatch,wfa.flowLogic.doInParallel, andwfa.flowLogic.appendToFlowVariables(append toArray.Objectflow variables).
- Flow stages— declarestageswithFlowStage({ label, value, … })and activate them in the body viawfa.stage(...)for progress tracking.
- Table augments— add columns to an existing platform/cross-scope table viaTable({ augments: '<table>', schema }); added columns must use the current app's ownership prefix:<scope>_in a named custom scope (for example,x_acme_), oru_in global and Store-app contexts.
- AI Agent— newagentDescriptor;dataAccessacceptsroleMap(role names) orroleList(role sys_ids).
- NASKsecurityControlsacceptsroleMap(role names) alongsideroleRestrictions(role sys_ids).
- Universal field override ($override)— escape hatch on Fluent constructors to set unmodeled columns by DB column name.
- Protection policyprotectionPolicydocumented onsys_policy-backed APIs (Action, Subflow, business rules, scripted REST, etc.).
- CLIfluent_transformgains--table/--id(transform by table hierarchy);initgains thetypescript.vuetemplate; OAuthclient_credentialsfor CI/CD viaSN_SDK_
env vars (see Configuration).
- MCP— read tools now returnstructuredContent(with declaredoutputSchema); long-running commands emit progress notifications.

Addedcustom-action,inbound-email-action,sp-header-footer, andsp-page-route-mapmetadata types; the declarativeFormAPI; subflow-of-subflow and custom actions in flows; AIAF auto-ACL generation; NASK output/input-type enhancements;Tabledictionary overrides; and a project-freeexplaincommand with tag search,--list,--peek, and--format=raw.

Requirements:Node.js 20.18.0+, npm 11.4.1+,@servicenow/sdk4.10.1

Add to your MCP client configuration file:

{ "mcpServers": { "fluent-mcp": { "command": "npx", "args": ["-y", "@modesty/fluent-mcp"], "env": { "FLUENT_MCP_WORKING_DIR": "/absolute/path/to/your/fluent-project", "SN_INSTANCE_URL": "https://your-instance.service-now.com", "SN_AUTH_TYPE": "basic", "SN_USER_NAME": "local-username", "SN_PASSWORD": "local-password" } } } }

- Claude Desktop / macOS:~/Library/Application Support/Claude/claude_desktop_config.json
- VSCode Copilot:.vscode/mcp.json(use Command Palette:MCP: Add Server...)
- Cursor:Settings → Features → MCP Settings
- Windsurf:Settings → Cascade → MCP Servers → View raw config
- Gemini CLI:~/.gemini/settings.json

VSCode note:For VSCode, the JSON structure uses"mcp": { "servers": { ... } }instead of"mcpServers".

Note:On the first auth-requiring command (orcheck_auth_status), the server detects an existing auth profile matchingSN_INSTANCE_URL, stores it in the session, and auto-injects it. Concurrent first calls share one validation promise. A new profile is added automatically only when setup can complete non-interactively (basic auth withSN_USER_NAME/SN_USERNAME+SN_PASSWORD); otherwise the server emits a single notice with the manualauth --addcommand to run.

The server writes its complete structured log stream to stderr so stdout remains reserved for MCP protocol traffic. Configure the minimum severity before launch withFLUENT_MCP_LOG_LEVEL(defaultinfo; usedebugto include raw SDK CLI output). Runtimelogging/setLevelandnotifications/messageare intentionally not used.

CI/CD (non-interactive) authentication — SDK v4.7.0+

For headless pipelines, the ServiceNow SDK CLI reads credentials directly fromSN_SDK_*environment variables (the MCP server inherits and passes these through to spawned commands — no extra configuration needed). SetSN_SDK_NODE_ENV=SN_SDK_CI_INSTALLto enable CI mode, then:

OAuth uses theclient_credentialsgrant against/oauth_token.do. See the SDK'sci-integrationguide (viaexplain_fluent_api) for instance setup details.

Create a new Fluent app in ~/projects/asset-tracker for IT asset management
Show me the business-rule API specification and provide an example snippet
Build the app with debug output, then deploy it

Note:Authentication is validated lazily usingSN_INSTANCE_URLandSN_AUTH_TYPE; those settings do not replace an SDK auth profile unless non-interactive setup can complete. If you need to set up a new profile, run:npx @servicenow/sdk auth --add <instance-url> --type <basic|oauth> --alias <alias>

TheMCP Inspectorprovides a web interface for testing MCP servers.

# Test published package npx @modelcontextprotocol/inspector npx @modesty/fluent-mcp # Or for local development (built server) npm run build && npm run inspect # Or against the TypeScript entry point, no build required npm run inspect:dev

- The Tools tab shows all 17 tools in deterministic name order.
- Optional parameters render with their normal types rather than as nullable union forms.
- Structured server logs appear on the server process stderr/terminal output; stdout remains reserved for MCP protocol traffic.

Scenario 1: Explore Business Rule Resources

Objective:Access API specs and code snippets for business rules
- Launch Inspector and wait for server connection
- Navigate toResourcestab
- Find and clicksn-spec://business-rulein the resource list
- Review the API specification showing all available methods and parameters
- Go back and search forsn-snippet://business-rule/0001
- Click the snippet to view a complete TypeScript example
- Verify content includes proper imports and follows Fluent patterns

- API spec displays structured documentation with method signatures
- Snippet shows runnable TypeScript code with ServiceNow metadata patterns
- Content is properly formatted and readable

Objective:Verify SDK version and help information retrieval
- Navigate toToolstab
- Selectsdk_infofrom the tool list
- Test Version:

- Setflagparameter to-v
- ClickExecute
- Verify response shows the SDK version (e.g.,4.10.1)

- Setflagparameter to-h
- Setcommandparameter tobuild
- ClickExecute
- Verify response shows build command documentation with options

- Version command returns SDK version string
- Help command returns detailed command documentation
- List metadata (-lm) returns available Fluent metadata types
- No unexpected protocol errors; command logs are emitted on stderr rather than through MCPnotifications/message
- Commands execute within 2-3 seconds

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

The MCP server for Bitrix24 provides AI assistants with structured access to the Bitrix24 API. It delivers up-to-date method descriptions, parameters, and valid values, allowing assistants to work with precise data instead of guesswork. This reduces code errors and accelerates Bitrix24 integration development.

A production-ready Model Context Protocol (MCP) server for ServiceNow platform integration. Built with TypeScript for Node.js 20+, this server enables LLMs and AI assistants to interact with ServiceNow instances through a standardized interface.

One remote MCP server for 500+ production APIs — Stripe, HubSpot, Postgres, Gmail, and more. OAuth and API key auth, credential management, and a CLI.

Single tool to control all 100+ API integrations, and UI components

Agent-native developer Q&A API with MCP + A2A endpoints for citations, job pickup, and answer submission.

Control Apache Airflow via its API using JWT authentication.

Self-hosted MCP gateway: convert REST/SOAP/GraphQL/SQL APIs into MCP tools with 29 pre-built adapters, OAuth2, RBAC and audit log.

A universal bridge to convert any web API into an MCP server, supporting multiple transport types.

Dynamically creates MCP servers from web API configurations, integrating any REST API, GraphQL endpoint, or web service into MCP-compatible tools.

Hosted MCP server and coordination layer for AI coding agents — live API contracts, database schema, frontend/backend mismatch detection, and shared handoff tickets for Claude Code, Cursor, Codex, and Lovable.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.