servicenow-knowledge-mcp

servicenow-knowledge-mcp

Enables deterministic, read-only retrieval of ServiceNow Knowledge articles, including search, article details, and binary attachments, via the ServiceNow Knowledge Management REST API.

Category
Visit Server

README

ServiceNow Knowledge MCP

A deterministic, read-only FastMCP integration for ServiceNow Knowledge retrieval. It performs no answer generation, summarization, semantic reranking, vector search, or document parsing.

Architecture

AI platform / MCP client
        ↓
FastMCP server
        ↓
KnowledgeService
        ↓
ServiceNowKnowledgeClient
        ↓
ServiceNow Knowledge Management REST API

The client centralizes authentication headers, endpoint construction, field selection, bounded transient retries, timeout/error mapping, JSON normalization, and binary attachment limits. Credentials, authorization headers, article content, and attachment bodies are not logged.

Tool mapping

search_knowledge
    → GET /knowledge/articles

get_knowledge_article
    → GET /knowledge/articles/{id}

get_knowledge_attachment
    → GET /knowledge/articles/{article_sys_id}/attachments/{attachment_sys_id}

search_knowledge preserves ServiceNow result ordering and returns compact candidates. It does not claim semantic, vector, AI, or full-text behavior. get_knowledge_article returns the selected canonical article and useful validity metadata. get_knowledge_attachment returns bounded binary data as base64 because structured MCP output is JSON-compatible; callers must decode it, and no parsing or OCR is performed.

Development

python -m venv .venv
source .venv/bin/activate
pip install -e '.[dev]'
cp .env.example .env
pytest
ruff format --check src tests
ruff check src tests
mypy src
servicenow-knowledge-mcp

The default network transport is stateless Streamable HTTP at http://localhost:8080/mcp. Set TRANSPORT=stdio for a locally spawned MCP client.

Container build:

docker build -t servicenow-knowledge-mcp .
docker run --env-file .env -p 8080:8080 servicenow-knowledge-mcp

Configuration

All settings are shown in .env.example. SERVICENOW_BASE_URL is required at runtime. SERVICENOW_ACCESS_TOKEN supplies the integration identity token. Search and article field selections are centralized in SERVICENOW_SEARCH_FIELDS and SERVICENOW_ARTICLE_FIELDS so verified standard or custom fields can be adopted without modifying the client.

The default API path and query parameter names are implementation assumptions that must be checked against the selected ServiceNow Knowledge Management API version. Search can be scoped with configured or per-tool Knowledge Base and language values. The requested result limit, article content length, attachment bytes, timeout, and transient retries are bounded.

Authorization boundary

An integration identity does not by itself prove that an end user's Knowledge permissions are enforced. The authenticator accepts an internal authorization context so a confirmed delegated mechanism can be added without redesigning the client, but the MCP tools do not invent or accept a delegated credential today.

Open security question: when the MCP calls ServiceNow using an integration identity, are Knowledge Base ACLs, User Criteria, roles, group membership, and article-level restrictions evaluated only against the integration identity, or can the end-user authorization context be propagated and enforced?

Production use must not proceed until the applicable entitlement contract is confirmed and tested.

Assumptions and open questions

The traceable Epic, Stories, Tasks, assumptions, and unresolved integration questions are maintained in docs/implementation-plan.md. Important unresolved items include:

  1. What search/indexing/ranking capability backs the query parameter, and does it match the Knowledge UI?
  2. Which Knowledge Bases, languages, and publication states are in scope?
  3. How will end-user authorization be enforced when an integration identity is used?
  4. Which standard or custom field contains canonical article content?
  5. Which fields are required for audience, validity, publication, citation, and freshness?
  6. What authentication mechanism, API version, rate limits, and throughput apply?
  7. Which non-production environment and representative retrieval-quality fixtures are available?

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured