MCP Integration

Wikantik exposes three separate agent-facing surfaces. Each is a distinct servlet path with its own auth filter, rate limiter, and tool set. Pick which surface to give an agent based on the trust you want to extend, then wire the client.

Endpoint matrix

PathModuleProtocolToolsCapabilitiesAuth filterDefault scope
/wikantik-admin-mcpwikantik-admin-mcpMCP Streamable HTTP18 read + write + analyticstools, resources, prompts, completionsMcpAccessFiltermcp (or all)
/knowledge-mcpwikantik-knowledgeMCP Streamable HTTP16 read-only retrieval + KG + spine + projectiontoolsKnowledgeMcpAccessFiltermcp (or all)
/tools/*wikantik-toolsOpenAPI 3.12 (search_wiki, get_page)OpenAPI document at /tools/openapi.jsonToolsAccessFiltertools (or all)

The two MCP endpoints share the same access-filter implementation and the same wikantik-mcp.properties, so a legacy property-file key (or a DB-backed mcp key) authorises both. The OpenAPI endpoint is independent: it has its own properties file and key scope.

Default to giving an agent /knowledge-mcp only. Authoring (/wikantik-admin-mcp) is a separate trust decision — grant it once you have decided that the agent should be allowed to write pages, mark them verified, propose KG entries, or rename/delete content. The OpenAPI surface exists for clients that cannot speak MCP at all (OpenWebUI, custom HTTP integrations, ChatGPT-style "Custom GPT" tools).

Quickstart (5 minutes)

  1. Mint a key. Log into the wiki as an admin, open the admin panel and go to API Keys (/admin/apikeys). Create a key bound to a real principal (e.g. your account or a dedicated service user) with scope mcp. Copy the plaintext token — it is shown once.

  2. Smoke-test the endpoint with curl:

    # /knowledge-mcp — list tools
    curl -sS -X POST http://localhost:8080/knowledge-mcp \
      -H "Authorization: Bearer $WIKANTIK_KEY" \
      -H "Content-Type: application/json" \
      -H "Accept: application/json, text/event-stream" \
      -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
    

    A 403 means the bearer token is wrong or the scope is insufficient. A 503 means the filter is fail-closed (no auth configured anywhere) — see Authentication below.

  3. Wire it into your client. Drop the snippet for your client from Client setup below.

  4. Sanity-check inside the client. Ask the agent to call retrieve_context with a query you know lands on a specific page; confirm the cited URLs match.

Authentication and authorization

Every Wikantik agent surface fronts a servlet filter that checks each request before it reaches the transport servlet. The filters share a uniform model:

A request is allowed if it satisfies any one of:

  1. A Bearer token that resolves to an active DB-backed API key with a matching scope.
  2. A Bearer token that exactly matches one of the legacy property-file keys (mcp.access.keys / tools.access.keys).
  3. A source IP inside one of the configured CIDR allowlist entries.

If none match, the response is 403 Access denied. If no keys, no CIDRs, and *.access.allowUnrestricted is unset, the filter is fail-closed and returns 503 MCP not configured (a CRITICAL line is also logged at startup). This is intentional: the rewrite preferred safe-by-default over silent open mode.

DB-backed keys (preferred)

Managed via the admin UI at /admin/apikeys, backed by the api_keys table. Each key is bound to a Wikantik principal: when an agent presents the token, the filter wraps the request with that principal's identity. All downstream JAAS / ACL / policy-grant checks then run against that principal, so an agent only ever sees what its bound user can see, and writes are attributed to that user in version history and audit logs.

Available scopes (ApiKeyService.Scope):

ScopeWire stringCovers
MCPmcp/wikantik-admin-mcp, /knowledge-mcp
TOOLStools/tools/*
ALLallAll three

Scope matching uses Scope.matches()ALL covers any required scope; MCP does not cover TOOLS and vice versa.

Keys are stored as SHA-256 hashes; the plaintext is shown exactly once at creation. Revoke via DELETE /admin/apikeys/{id} or the admin UI.

REST surface (admin-only, protected by AdminAuthFilter):

GET    /admin/apikeys             list keys (hash masked, no plaintext)
POST   /admin/apikeys             generate; response carries one-time plaintext
DELETE /admin/apikeys/{id}        revoke

Legacy keys

For lightweight single-user setups (or environments without a database), comma-separated bearer tokens can be set in properties:

mcp.access.keys   = generated-token-1,generated-token-2
tools.access.keys = different-token-for-openapi-clients

Legacy keys have no principal binding — every call lands as the wiki's default unauthenticated identity. Use only on private/local instances.

CIDR allowlists

mcp.access.allowedCidrs   = 10.0.0.0/8,127.0.0.1/32
tools.access.allowedCidrs = 10.0.0.0/8

Useful when an agent runs on a sidecar pod / loopback and you want to skip the bearer token entirely. CIDR matches are evaluated against ServletRequest.getRemoteAddr() — make sure your reverse proxy preserves the client IP (or the CIDR list is meaningless).

Unrestricted mode

mcp.access.allowUnrestricted   = true
tools.access.allowUnrestricted = true

Every request is treated as a superuser. Only use in trusted, single-tenant local development. When set, the filter logs a startup warning each time the webapp comes up.

Rate limiting

Token-bucket rate limiter applied after auth. Defaults from wikantik-mcp.properties:

mcp.ratelimit.global    = 100   # requests/sec across all clients
mcp.ratelimit.perClient = 10    # requests/sec per resolved client identity

/tools/* has its own knobs (tools.ratelimit.global, tools.ratelimit.perClient, both default 0 = disabled). Excess requests get 429 Rate limit exceeded with a Retry-After: 1 header. Rate-limit hits are written to the SecurityLog logger.

Configuration reference

All keys are picked up from a wikantik-mcp.properties (or wikantik-tools.properties) loaded from the classpath. Defaults ship inside the JAR; operators override by placing a file with the same name on a parent classloader (e.g. tomcat/tomcat-11/lib/wikantik-mcp.properties).

wikantik-mcp.properties (admin MCP + knowledge MCP)

PropertyDefaultNotes
mcp.server.namewikantik-mcpReported in the MCP initialize handshake.
mcp.server.titleWikantik Knowledge BaseHuman-readable server title.
mcp.server.version2.0.0Reported alongside Release.getVersionString() to clients.
mcp.instructions.filewikantik-mcp-instructions.txtClasspath resource read at boot. Replaced by setting mcp.instructions=... inline.
mcp.access.keys(empty)Legacy comma-separated bearer tokens.
mcp.access.key(empty)Legacy single-token form (prefer mcp.access.keys).
mcp.access.allowedCidrs(empty)Comma-separated CIDR allowlist.
mcp.access.allowUnrestrictedfalseAcknowledges the fail-closed default.
mcp.ratelimit.global100Requests/sec across all clients.
mcp.ratelimit.perClient10Requests/sec per resolved client.

The same file feeds both McpAccessFilter (admin) and KnowledgeMcpAccessFilter (knowledge), so one configuration block governs both endpoints.

wikantik-tools.properties (OpenAPI tool server)

PropertyDefaultNotes
tools.access.keys(empty)Legacy comma-separated bearer tokens.
tools.access.allowedCidrs(empty)Comma-separated CIDR allowlist.
tools.access.allowUnrestrictedfalseAcknowledges the fail-closed default.
tools.ratelimit.global00 disables rate limiting.
tools.ratelimit.perClient00 disables rate limiting.
wikantik.public.baseURL(request scheme/host)Used to build absolute citation URLs in tool responses.

Wider Wikantik properties that affect agent behaviour

PropertyEffect
wikantik.datasourceEnables DB-backed API keys, structural index, KG inclusion policy, retrieval-quality CI. Defaults to JNDI jdbc/wikantikDS.
wikantik.admin.bootstrapBootstrap admin override for first-time setup; bypasses ACLs at startup only.
wikantik.indexnow.apiKeyRequired by ping_search_engines for IndexNow submissions.
wikantik.structural_spine.enforcement.enabledDefault true. Auto-assigns canonical IDs and rejects bad relations on save.
wikantik.runbook.enforcement.enabledDefault true. Schema-validates type: runbook pages at save time.
wikantik.frontmatter.enforcement.enabledDefault true. Save-time guard that rejects pages whose YAML frontmatter fails strict parsing (e.g. unquoted colon in title:). Disable only as a temporary escape hatch while running the audit at GET /admin/frontmatter-issues on an existing dirty corpus.
wikantik.verification.stale_daysDefault 90. After this many days, a verified page reports confidence: stale.
wikantik.retrieval.cron.enabledDefault true. Nightly retrieval-quality CI run.
wikantik.retrieval.cron.hour_utcDefault 3. Hour of day (UTC) for the nightly run.
wikantik.kg.policy.defaultexclude. Cluster-primary KG inclusion policy. Per-page override via kg_include frontmatter.

Tool inventory

Tool names below are canonical wire identifiers (snake_case). Every tool ships with at least one worked input/output example in its schema (Phase 6 of the agent-grade content rewrite, 2026-04-25) — agents should surface examples to the model when constructing the first call rather than reasoning purely from JSON Schema types.

/wikantik-admin-mcp (18 tools)

Read-only / analytics — no author resolution required, registered with readOnly=true annotation:

ToolPurpose
read_pageFetch raw Markdown body + parsed frontmatter for a page.
get_page_historyVersion log: numbers, authors, dates, change notes.
diff_pageUnified diff between two versions of a page.
get_backlinksPages that link to a given page.
get_outbound_linksPages a given page links to.
get_broken_linksWiki-wide enumeration of references to nonexistent pages.
get_orphaned_pagesPages with no inbound links (system pages excluded).
get_wiki_statsDashboard summary: total pages, broken/orphaned counts, recent changes.
verify_pagesCompound check across many pages — existence, link health, metadata completeness, optional SEO readiness.
preview_structured_dataWhat a page's frontmatter will produce in HTML — meta tags, OG/Twitter, JSON-LD, BreadcrumbList, Atom, News Sitemap.
ping_search_enginesSubmit URLs/sitemap to Google Ping + IndexNow after a publish.
list_proposalsList pending knowledge-graph proposals (only when KG is configured).

Write / author-configurable — implement AuthorConfigurable; the MCP exchange's clientInfo.name is injected as the default author before each call:

ToolPurpose
write_pagesCreate or replace one or more pages. Author defaults from the client identity.
update_pagePatch a page with expectedContentHash for optimistic locking.
rename_pageMove a page (and optionally rewrite incoming links) with confirm=true.
delete_pagesPermanent delete with confirm=true. System pages refused.
mark_page_verifiedStamp verified_at/verified_by/confidence frontmatter.
propose_knowledgePropose a new node or edge for the knowledge graph (KG-conditional).

The admin endpoint also serves resources, prompts, and completions (see Capabilities).

/knowledge-mcp (16 tools)

Knowledge-graph traversal & introspection (registered when KnowledgeGraphService is configured):

ToolPurpose
discover_schemaEnumerate node types, edge types, properties, mention coverage.
query_nodesFilter / search graph nodes by type and properties.
get_nodeOne node + its declared edges with provenance.
traverseBounded BFS from a starting node with depth and provenance filters.
search_knowledgeFull-text search over node names + property values.
find_similarEmbedding-nearest-neighbour over node mentions (only when NodeMentionSimilarity is configured).

Hybrid retrieval / RAG (registered when ContextRetrievalService is configured):

ToolPurpose
retrieve_contextPrimary RAG entry point. Hybrid BM25 + dense + graph-aware rerank with fail-closed BM25 fallback. Returns chunked results with citation URLs and confidence.
get_pagePinned fetch of a specific page once you know its name.
list_pagesBrowse-style page enumeration, optionally prefix-filtered.
list_metadata_valuesDistinct frontmatter keys + their values across the corpus — discovery before targeted filtering.

Structural-spine navigation (registered when StructuralIndexService is configured) — fastest path for structural questions because they hit the index, not full-text search:

ToolPurpose
list_clustersEnumerate clusters with hub pages and member counts.
list_tagsEnumerate tags with frequency.
list_pages_by_filterPages matching cluster=, tag=, type=, etc.
get_page_by_idResolve a page by its stable canonical_id (ULID).
traverse_relationsWalk typed relations declared in frontmatter (relations: block) — declared graph, not derived.

Agent-grade projection (registered when ForAgentProjectionService is configured):

ToolPurpose
get_page_for_agentToken-budgeted projection of a page: summary, key facts, headings outline, typed relations, recent changes, MCP tool hints, verification state. Default-of-choice for "read this page" — falls back gracefully via degraded flag and missing_fields rather than failing the whole request. Memoised in wikantik.forAgentCache (1h TTL).

/tools/* (2 tools)

ToolPathPurpose
search_wikiGET /tools/search_wiki?q=...&max_results=...OpenAPI shape over ContextRetrievalService (same hybrid retrieval as retrieve_context). Response shape includes citation URLs and ranked snippets.
get_pageGET /tools/get_page?name=...Single page fetch with frontmatter parsed into a structured field.

OpenAPI 3.1 document live at GET /tools/openapi.json. Every operation includes worked example payloads — sufficient for ChatGPT Custom GPT tools, OpenWebUI tool servers, or any other client that consumes a static OpenAPI document.

Capabilities on /wikantik-admin-mcp

Beyond tools, the admin server advertises the standard MCP capability surface:

Resources (6)

Direct read-only data access without invoking a tool. Resource subscriptions are enabled (resources(true, true)); the server publishes notifications/resources/updated whenever a page save or delete crosses the WikiEventManager (wired by WikiEventSubscriptionBridge).

wiki://pages                          — list every page
wiki://recent-changes                 — recent modifications, newest first
wiki://pages/{pageName}               — read a page (template)
wiki://pages/{pageName}/version/{v}   — read a specific version (template)
wiki://pages/{pageName}/attachments   — list attachments (template)
wiki://pages/{pageName}/backlinks     — backlinks for a page (template)

Prompts (8)

Guided workflows the agent can invoke verbatim. Each prompt declares typed arguments (some prompts accept page names with autocompletion).

NamePurpose
create-articleStructured article creation with metadata.
summarize-topicCross-page research and synthesis on a topic.
audit-linksLink-integrity check around a starting page.
rename-pageSafe rename workflow with backlinks update.
wiki-health-checkEnd-to-end wiki health report.
publish-clusterHub + sub-articles cluster publish, with verify pass.
extend-clusterAdd a new article into an existing cluster, including cross-references.
seo-auditRun verify_pages with seo_readiness and consume preview_structured_data.

Completions (3)

Page-name autocompletion served against ReferenceManager.findCreated():

audit-links / pageName
rename-page / oldName
rename-page / newName

Server-side instructions

The MCP initialize response carries an instructions text loaded from wikantik-mcp-instructions.txt (classpath). The instructions cover page format (Markdown + YAML frontmatter), CamelCase naming, link syntax, and tool usage. Three safeguards keep the text in sync with the live registry:

  1. Build-time (unit): InstructionsRegistryDriftTest (under wikantik-admin-mcp/src/test/) loads the resource at test time, asks McpToolRegistry what it actually registers, and asserts every registered tool is mentioned by name and every tool-shaped mention is registered. The unit-test build fails on drift, so a stale instructions file cannot reach packaging unnoticed.
  2. Build-time (wire): McpInstructionsDriftIT (under wikantik-it-tests/wikantik-selenide-tests) does the same check against a deployed server: it pulls the instructions text from the SDK's getServerInstructions() and the live tool list from tools/list, then asserts both directions of the diff. This is the safety net for operator-supplied mcp.instructions.file overrides — the unit test only sees the file shipped in the WAR; the IT sees whatever the deployed server actually returns.
  3. Runtime: McpServerInitializer.logToolNameDriftIfAny re-runs the same check on every server start and warns at WARN level if the loaded file (bundled or override) has drifted from the registered tool set.

The instructions were rewritten end-to-end on 2026-04-30 to match the current 18-tool surface (read_page, write_pages, update_page, delete_pages, rename_page, mark_page_verified, verify_pages, preview_structured_data, ping_search_engines, get_backlinks, get_outbound_links, get_broken_links, get_orphaned_pages, get_wiki_stats, get_page_history, diff_page, plus list_proposals / propose_knowledge when the knowledge service is wired). The legacy locking section (lock_page / unlock_page) is gone — concurrency is now optimistic via expectedContentHash on update_page.

Page model agents need to understand

Every wiki page is Markdown with optional YAML frontmatter:

---
canonical_id: 01KQ0...      # ULID auto-assigned by the structural-spine filter
type: article               # article | hub | runbook | reference | report | ...
cluster: wikantik-development
tags: [mcp, integration]
related: [About, KnowledgeGraphCore]
depends-on: [KnowledgeGraphCore]
summary: Short, used for meta description / og:description / Atom <summary>
date: 2026-04-29
verified_at: 2026-04-29T14:00:00Z
verified_by: jakefear
confidence: authoritative   # authoritative | provisional | stale (usually computed)
audience: [humans, agents]
kg_include: true            # cluster-policy override
---
# Page Title

Body in Markdown. Internal links use [text](PageName).

Save-time enforcement is on: pages without canonical_id get one auto-assigned and injected; pages with invalid relations: are rejected; type: runbook pages are schema-validated; cluster KG-inclusion policy is applied. Most of the agent surface area assumes these invariants — read [StructuralSpineDesign](StructuralSpineDesign) and [AgentGradeContentDesign](AgentGradeContentDesign) for the full model.

Frontmatter validation and normalization

YAML quoting trips up agents: a value like title: Woodworking Joinery: Structural Mechanics parses as a nested mapping start because of the unquoted colon, and the page used to save with empty metadata + a WARN log. Two layers now close that hole:

  1. MCP-side normalization (Layer 1). WritePagesTool and UpdatePageTool route every save through FrontmatterNormalizer: any embedded --- block is parsed strictly, merged with the explicit metadata argument (explicit wins on conflict), and re-emitted via FrontmatterWriter (SnakeYAML's emitter, which always quotes correctly). If the embedded YAML is malformed, the tool returns a structured error with the message + 1-based line/column + a quoting hint instead of silently dropping metadata.
  2. Save-time validation (Layer 2). FrontmatterValidationPageFilter runs at preSave priority -1006 (before chunking, defaults, structural spine, runbook validation). Rejects any save whose --- block fails FrontmatterParser.parseStrict. Catches non-MCP paths (REST, JSP editor). Gated by wikantik.frontmatter.enforcement.enabled (default true).

FrontmatterParser.parse(...) keeps its graceful-degrade behaviour for read-side callers — the strict path is opt-in via parseStrict(...) and only used on writes. Operators adopting the validator on an existing wiki should run GET /admin/frontmatter-issues first to find broken pages, fix them, then leave the flag at its default true.

GET /admin/frontmatter-issues returns {data: {issues: [{pageName, error, line?, column?}](), issue_count, scanned, error_count}}. Scan cost is O(N) page reads on the request thread — it's a migration tool, not a polling target.

Why this rewrite is worth the effort to wire up

The point of the rebuild was agents reading agents-grade content, not humans browsing. Three load-bearing capabilities:

  1. get_page_for_agent is the right default for "read this page", not read_page or get_page. It returns a token-budgeted projection — summary, key facts, headings outline, typed relations, recent changes, MCP tool hints, verification state — without the full markdown body. Per-extractor try/catch: failure of one section surfaces as a degraded flag plus missing_fields, not a total error. Memoised by (canonical_id, updated_at_millis) so repeat reads in a session are essentially free.

  2. Verification metadata is part of the wire format. verified_at, verified_by, confidence, and audience flow through the /for-agent projection and the structural index. Authors stamp pages via mark_page_verified; operators triage at GET /admin/verification?confidence=stale. Agents can — and should — refuse to act on pages where confidence: stale.

  3. Runbooks are a first-class type. A page with type: runbook carries a structured runbook: block (when_to_use, inputs, steps, pitfalls, related_tools, references), validated at save time and re-validated on read. Tell agents: when planning a multi-step task, search for runbooks first (e.g. list_pages_by_filter with type=runbook, or retrieve_context filtered by type). The seed corpus lives at [AgentCookbook](AgentCookbook).

A fourth, quieter improvement: every tool now ships with worked input/output examples in its schema (top-level for OpenAPI ops; outputSchema.examples plus per-property examples on MCP tools). First-call success rates rise materially when the agent sees concrete payloads instead of inferring from types alone.

Client setup

Claude Code (.mcp.json in the repo, or ~/.claude/mcp_servers.json global)

{
  "mcpServers": {
    "wikantik-knowledge": {
      "type": "http",
      "url": "http://localhost:8080/knowledge-mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    },
    "wikantik-admin": {
      "type": "http",
      "url": "http://localhost:8080/wikantik-admin-mcp",
      "headers": { "Authorization": "Bearer YOUR_AUTHORING_KEY" }
    }
  }
}

Claude Code surfaces tool examples to the model. Add the admin server only on agents you trust to write.

Claude Desktop (claude_desktop_config.json)

Same shape under mcpServers. Claude Desktop currently only supports the stdio transport directly, so for a remote HTTP MCP endpoint use mcp-remote as a wrapper:

{
  "mcpServers": {
    "wikantik-knowledge": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://wiki.example.com/knowledge-mcp",
        "--header", "Authorization: Bearer YOUR_KEY"
      ]
    }
  }
}

Gemini CLI (~/.gemini/settings.json)

{
  "mcpServers": {
    "wikantik-knowledge": {
      "httpUrl": "http://localhost:8080/knowledge-mcp",
      "headers": { "Authorization": "Bearer YOUR_KEY" }
    }
  }
}

Gemini CLI loads MCP server metadata at session start and activates tools on demand.

OpenWebUI / non-MCP HTTP clients

Point at the OpenAPI tool server:

URL:           http://localhost:8080/tools/openapi.json
Auth header:   Authorization: Bearer YOUR_TOOLS_KEY

OpenWebUI (and similar) consume the OpenAPI document directly. Two operations are exposed: search_wiki and get_page.

Plain HTTP / scripted use

# Hybrid retrieval over /knowledge-mcp
curl -sS -X POST http://localhost:8080/knowledge-mcp \
  -H "Authorization: Bearer $WIKANTIK_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call",
       "params":{"name":"retrieve_context",
                 "arguments":{"query":"how do agents read pages","maxResults":5}}}'

# OpenAPI tool server
curl -sS "http://localhost:8080/tools/search_wiki?q=hybrid+retrieval&max_results=5" \
  -H "Authorization: Bearer $TOOLS_KEY"

Drop a fragment like this into the agent's project / system prompt so it does not blindly full-text-search:

You have access to a Wikantik MCP server. Use it like this:

Workflow recipes

RAG / question answering

  1. retrieve_context with the user's query.
  2. For each top-ranked hit, fetch with get_page_for_agent (cheap thanks to the cache).
  3. Cite with the citation URLs from the retrieval response, not by hand-crafting URLs.

Authoring an article cluster

  1. discover_schema + list_clusters to confirm cluster naming.
  2. Use the publish-cluster MCP prompt on /wikantik-admin-mcp to generate hub + members.
  3. write_pages (one round trip).
  4. verify_pages with checks=["seo_readiness", ...] to confirm cross-references and metadata.
  5. preview_structured_data on the hub to confirm JSON-LD / breadcrumb shape.
  6. mark_page_verified on each page once the cluster is reviewed.
  7. ping_search_engines (requires wikantik.indexnow.apiKey).
  1. get_wiki_stats for the dashboard.
  2. get_broken_links and get_orphaned_pages for the worklist.
  3. Use the audit-links prompt on a starting page to walk the local link graph.
  4. After fixes, verify_pages to confirm.

Knowledge-graph traversal from a known page

  1. get_page_for_agent to get the page's canonical_id.
  2. traverse_relations with that id to walk the declared graph.
  3. Use traverse (KG, not spine) only when the declared graph is insufficient — it walks the derived co-mention graph and is more permissive.

Retrieval-quality investigation

  1. GET /admin/retrieval-quality?limit=20 to read recent runs.
  2. POST /admin/retrieval-quality/run with {"query_set_id": "core-agent-queries", "mode": "HYBRID_GRAPH"} to trigger an ad-hoc run.
  3. Diff the per-mode nDCG@5/@10, Recall@20, MRR. Smoke gate is nDCG@5 >= 0.5.

Observability

Prometheus metrics relevant to integrations:

Log streams worth tailing:

Safety checklist before pointing an agent at production

  1. Mint a DB-backed key bound to a real principal — never share legacy property-file keys across agents.
  2. Use scope=mcp for read-only research agents. Reserve scope=all for human-supervised authoring, never automation.
  3. Set mcp.access.allowedCidrs to the intended source range; do not rely on bearer tokens alone for agents on shared networks.
  4. Confirm mcp.access.allowUnrestricted is unset (or false) in production. The fail-closed default is what you want.
  5. Confirm rate limits are enforced (mcp.ratelimit.global > 0).
  6. Confirm wikantik.runbook.enforcement.enabled=true (default) so authoring agents cannot land malformed runbooks.
  7. Confirm wikantik.structural_spine.enforcement.enabled=true (default) so authoring agents cannot land bad relations.
  8. Decide your KG inclusion policy — see [KgInclusionPolicy](KgInclusionPolicy).
  9. Make sure your reverse proxy passes through:
    • The Authorization header.
    • The Accept: text/event-stream header (the Streamable HTTP transport requires SSE).
    • The client IP (so CIDR allowlists work).
  10. If you supply your own mcp.instructions.file override, mirror the live tool registry in it. The bundled file is regression-tested by InstructionsRegistryDriftTest; an external override is not.

Troubleshooting

SymptomLikely cause
503 MCP not configuredFilter is fail-closed — no API keys, no CIDRs, allowUnrestricted not set. Set one.
403 Access deniedBearer token unknown / revoked, or scope insufficient (tools key against /wikantik-admin-mcp will 403).
403 Key not authorized for MCPA DB-backed key with scope=tools was presented at an MCP endpoint. Mint a key with scope=mcp or scope=all.
429 Rate limit exceededRate-limit knobs too tight, or runaway agent. Inspect SecurityLog.
MCP tools list empty on /knowledge-mcpNone of KnowledgeGraphService, ContextRetrievalService, StructuralIndexService, ForAgentProjectionService are configured — check wikantik.datasource and the embeddings setup.
get_page_for_agent returns degraded: trueOne of the four extractors failed; the named field appears in missing_fields. Check log for the underlying exception.
Startup log warns about tool-name driftAn external mcp.instructions.file override disagrees with the live registry. The bundled instructions are regression-tested at build time; only an operator-supplied override can drift in a live deployment. Refresh the override or remove it.
Authoring tool says expectedContentHash mismatchOptimistic-lock guard fired. Re-fetch the page, recompute the hash, retry.
WikiEngine could not be created — MCP server not startedThe bootstrap servlet listener ran before SPIs were ready. Confirm WikiBootstrapServletContextListener is wired with a lower load-on-startup value than the MCP listeners (admin = 2, knowledge = 3, tools = 2).

Pointers

Relationships
Part_of: McpAuditTools