{{ theme.skipToContentLabel || 'Skip to content' }}

MCP tools, prompts and resources ​

Server: kontext mcp — JSON-RPC 2.0 over stdio, newline-delimited. Protocol versions 2024-11-05, 2025-03-26, 2025-06-18 and 2025-11-25 (the client's version is echoed when supported). Capabilities: tools, prompts, resources, logging. Tool results are text; errors are returned as isError: true results.

Tools ​

Every tool carries MCP annotations, which clients use to decide what needs approval: ctx_brief, ctx_search, ctx_read, ctx_why and ctx_log are readOnlyHint: true; ctx_capture, ctx_inbox, ctx_prepare_commit, ctx_init and ctx_init_submit write only the local inbox, the working tree and the git index and are destructiveHint: false. All are openWorldHint: false.

ctx_brief ​

ParameterTypeDefault
focusstring[]paths or topic words to prioritise
budget_tokensintegerbrief.budget_tokens (1400)approximate size
adaptersbooleantrueinclude adapter brief sections
ParameterTypeDefault
querystringrequiredwords, identifiers, paths
kindsstring[]decision, convention, learning, incident, architecture, doc, commit
sourcesstring[]alllocal and/or adapter names
limitinteger10maximum hits (up to 50)
budget_tokensinteger1200approximate size of the answer

Each hit: N. title — snippet [kind · status · date · source] <uri>.

ctx_read ​

ParameterTypeDefault
uristringrequiredkx:<id>, file:<path>[#section], git:<sha>, inbox:<id>, an adapter URI, or a plain path
level0 | 1 | 21one line, overview, full

ctx_why ​

ParameterTypeDefault
targetstringrequiredpath, path:line, path:start-end, commit sha, or symbol
limitinteger12items per section

ctx_log ​

ParameterTypeDefault
kindstringdecisionkind to list
allbooleanfalseinclude superseded / rejected
limitinteger40rows

ctx_capture ​

ParameterTypeDefault
kindstringrequireddecision, convention, learning, incident (aliases accepted)
titlestringrequiredshort statement
bodystringrequiredMarkdown: context, decision or lesson, consequences
summarystringone line
pathsstring[]paths or globs it governs
tagsstring[]
visibilityteam | privatecapture.default_visibility
supersedesstring[]ids of entries it replaces
statusstringaccepted for decisions
promotebooleanfalsewrite into the store now instead of the inbox

ctx_inbox ​

ParameterTypeDefault
actionlist | show | promote | droplist
idsstring[]for show / promote / drop

ctx_prepare_commit ​

ParameterType
promotestring[]inbox ids to write into the store and stage
dropstring[]inbox ids to discard

Returns the report described in Capture and review.

ctx_init ​

ParameterTypeDefault
countinteger1how many tasks to return (up to 5)

When the repository has no .ai/ yet, ctx_init first runs scan, history and render (no hooks) and then returns the first task.

ctx_init_submit ​

ParameterType
task_idstring (required)purpose, mod:<module>, dec:<area>, refresh:<module>
summarystringone line, at most ~200 characters
overviewstringMarkdown, 5–15 lines
decisionsobject[]{title, decision, summary?, context?, consequences?, paths?, commits?, date?, status?, tags?} — for dec: tasks
learningsobject[]{title, body, paths?, tags?}
skipbooleanskip the task
reasonstringwhy it is skipped

paths, commits and tags also accept comma-separated strings.

Adapter tools ​

Tools of MCP adapters with expose are listed with their original schemas (names prefixed with <adapter>_ unless they already start with it); tools declared in adapter config are listed with the schema from params. Their descriptions start with [adapter].

Prompts ​

NameArgumentsPurpose
kontext-inittasks (optional)bootstrap and deepen the repository's knowledge
kontext-commitprepare the current change for commit
kontext-reflectcapture at most three durable items from the session

Resources ​

URIContent
kontext://briefthe brief (without adapter sections)
kontext://entry/<id>an entry's Markdown (template kontext://entry/{id})

Server-initiated requests ​

The MCP client inside kontext (used by mcp adapters) answers ping and roots/list (with the repository root) from the servers it starts; other server requests are declined.

Released under the MIT or Apache-2.0 license.