MCP server

Let AI agents and IDEs read and edit your wiki via Model Context Protocol.

What is the MCP server

Next Wiki exposes a Model Context Protocol (MCP) server, so AI agents, IDEs and assistants (Claude, your own agents, etc.) can read and edit your wiki with your permission — searching, reading documents and proposing or applying changes.

Endpoint: https://YOUR-WIKI/api/mcp (Streamable HTTP transport).

Authentication

The MCP server uses the same API key as the REST API. Create one in Settings → API (starts with nwk_) and send it as a header:

X-Api-Key: nwk_your_token

The key’s scopes apply: read tools need docs:ler, write tools need docs:escrever. A key without scopes has full access (with the owner’s permissions).

Connect a client

Point your MCP client at the endpoint with the API key header. Example configuration (the exact shape depends on the client):

{
  "mcpServers": {
    "next-wiki": {
      "url": "https://YOUR-WIKI/api/mcp",
      "headers": { "X-Api-Key": "nwk_your_token" }
    }
  }
}

Available tools

ToolScopeParametersDescription
listar_workspacesreadList the available workspaces
buscarreadworkspaceId, consultaSearch documents by text
arvorereadworkspaceIdTree of collections and documents
ler_documentoreaddocumentoIdRead a document’s markdown
ler_comentariosreaddocumentoIdList a document’s comments
listar_skillsreadworkspaceIdList the workspace’s AI skills
listar_modelos_documentoreadworkspaceIdList document templates (types)
criar_documentowritecolecaoId, titulo, conteudoMarkdownCreate a document in a collection
criar_documento_do_tipowritecolecaoId, tipoDocId, titulo?Create a document from a template
atualizar_documentowritedocumentoId, conteudoMarkdown, titulo?Replace a document’s content

Read tools require docs:ler; write tools require docs:escrever. If a key lacks the scope, the tool returns an error explaining what’s missing.

See the API reference for the full REST surface.