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
| Tool | Scope | Parameters | Description |
|---|---|---|---|
listar_workspaces | read | — | List the available workspaces |
buscar | read | workspaceId, consulta | Search documents by text |
arvore | read | workspaceId | Tree of collections and documents |
ler_documento | read | documentoId | Read a document’s markdown |
ler_comentarios | read | documentoId | List a document’s comments |
listar_skills | read | workspaceId | List the workspace’s AI skills |
listar_modelos_documento | read | workspaceId | List document templates (types) |
criar_documento | write | colecaoId, titulo, conteudoMarkdown | Create a document in a collection |
criar_documento_do_tipo | write | colecaoId, tipoDocId, titulo? | Create a document from a template |
atualizar_documento | write | documentoId, conteudoMarkdown, titulo? | Replace a document’s content |
Read tools require
docs:ler; write tools requiredocs: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.