MCP server
Connect Claude, IDEs and other AI clients to read and edit the wiki through the Model Context Protocol.
What it is
Next Wiki ships a Model Context Protocol (MCP) server. With it, Claude, IDEs and your own agents read and edit the wiki with your key: they search, read documents, create and update pages, run the wiki’s agents and approve proposals.
It’s the way to automate the wiki from the outside. The REST API serves the app itself and doesn’t accept API keys (see API).
| Item | Value |
|---|---|
| Endpoint | https://SUA-WIKI/api/mcp |
| Transport | Streamable HTTP (POST to the endpoint). There is no classic SSE or stdio. |
| Authentication | nwk_… API key in the Authorization: Bearer or X-Api-Key header |
| Limit | 12 requests per minute per IP, by default (RATE_LIMIT_SENSIVEL) |
Create the key
In Configurações → APIs & Acesso (the page opens with the title API & Access), create a key. It is shown only once.
| Scope | Grants |
|---|---|
docs:ler | The read tools |
docs:escrever | Read and write |
(none) or * | Full access, with the permissions of whoever created the key |
colecoes:gerenciar, exportacoes, workspace:admin | Shown on the screen and have no effect yet. A key with only these calls no tool at all. |
On top of the scope, the key owner’s permissions always apply: someone who can’t edit a collection can’t edit it through MCP; creating an agent, skill or template requires being an admin.
Connect a client
Claude Code (or another client that accepts remote MCP over HTTP):
{
"mcpServers": {
"next-wiki": {
"type": "http",
"url": "https://SUA-WIKI/api/mcp",
"headers": { "Authorization": "Bearer nwk_sua_chave" }
}
}
}
Claude Desktop only loads local servers; use the mcp-remote bridge:
{
"mcpServers": {
"next-wiki": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://SUA-WIKI/api/mcp",
"--transport", "http-only",
"--header", "Authorization: Bearer nwk_sua_chave"]
}
}
}
--transport http-only matters: without it, mcp-remote tries SSE first and fails.
With curl, send Accept: application/json, text/event-stream — application/json alone
gets 406. The sequence is initialize (keep the Mcp-Session-Id header),
notifications/initialized and then tools/call.
Agents as prompts
Each active agent in your workspaces shows up as an MCP prompt. Your client “puts on”
the agent’s persona and uses the wiki’s tools with the client’s model. To run the
agent on the server, with the wiki’s model, use rodar_agente.
Tools
R = read, W = write. Optional arguments in italics.
Search and reading
| Tool | Scope | Arguments | What it does |
|---|---|---|---|
listar_workspaces | R | — | Workspaces you can access |
arvore | R | workspaceId, colecaoId, contendo, incluirDocumentos, limite | Collections and documents |
buscar | R | workspaceId, consulta, colecaoId, limite | Text search, accent-insensitive |
consultar_base | R | workspaceId, afirmacao, colecaoId, limite | Search by meaning; requires semantic search on |
ler_documento | R | documentoId | A document’s Markdown |
ler_comentarios | R | documentoId | The comments |
perguntar | R | workspaceId, pergunta, colecaoId, tipoId | Answer with sources |
analisar_conflitos | R | workspaceId, colecaoId, tipoId | Documents that contradict each other |
listar_tags | R | workspaceId | Workspace tags |
Documents and collections
| Tool | Scope | Arguments | What it does |
|---|---|---|---|
criar_documento | W | colecaoId, titulo, conteudoMarkdown, parentDocumentoId | Creates a document |
criar_documento_do_tipo | W | colecaoId, tipoDocId, titulo, parentDocumentoId | Creates from a template |
atualizar_documento | W | documentoId, conteudoMarkdown, titulo | Replaces the content (creates a version) |
renomear_documento | W | documentoId, titulo | Renames |
mover_documento | W | documentoId, colecaoId, parentId, ordem | Moves in the tree |
arquivar_documento | W | documentoId | Sends to the trash (reversible) |
tipificar_documento | W | documentoId, tipoDocId | Sets the type (empty removes it) |
criar_tag | W | workspaceId, nome, cor | Creates the tag, or returns the existing one |
definir_tags_documento | W | documentoId, tagIds[] | Replaces the document’s tags |
criar_colecao | W | workspaceId, nome, parentId, icone, descricao, visibilidade, sigla | Creates a collection |
atualizar_colecao | W | colecaoId, nome, parentId, paraRaiz, ordem, icone, descricao, visibilidade | Changes the collection |
excluir_colecao | W | colecaoId | Deletes (admin only) |
Boards
| Tool | Scope | Arguments | What it does |
|---|---|---|---|
criar_quadro | W | colecaoId, titulo, nos[], conexoes[] | Creates a board with boxes and arrows |
escrever_quadro | W | documentoId, nos[], conexoes[] | Redraws a document’s board |
escrever_quadro_json | W | documentoId, edgelessJson | Writes a ready-made Excalidraw scene |
Document templates
| Tool | Scope | Arguments | What it does |
|---|---|---|---|
listar_modelos_documento | R | workspaceId | Workspace types |
obter_modelo | R | workspaceId, tipoDocId | A type with template and instructions |
modelos_do_projeto | R | colecaoId | The project’s roles and each one’s current template |
templates_do_projeto | R | colecaoId | The project’s code template repositories |
criar_modelo | W | workspaceId, nome, templateMd, descricao, instrucoesIa, papelId, ehVariantePadrao, icone, indexavel, chave | Creates a type (admin) |
atualizar_modelo | W | workspaceId, tipoDocId, nome, templateMd, descricao, instrucoesIa, papelId, ehVariantePadrao, chave | Changes a type (admin) |
Skills
| Tool | Scope | Arguments | What it does |
|---|---|---|---|
listar_skills | R | workspaceId | Workspace skills |
ler_skill | R | workspaceId, skillId | A full skill |
criar_skill | W | workspaceId, nome, descricao, instrucoes, colecaoId, tipoRaizId, ativo | Creates (admin) |
atualizar_skill | W | workspaceId, skillId, nome, descricao, instrucoes, colecaoId, tipoRaizId, ativo, limpar[] | Changes (admin) |
Agents and runs
| Tool | Scope | Arguments | What it does |
|---|---|---|---|
listar_agentes | R | workspaceId | Workspace agents |
ler_agente | R | workspaceId, agenteId | A full agent |
criar_agente | W | workspaceId, nome, descricao, instrucoes, ferramentas[], colecaoId, provider, modelo, ativo, tipoRaizId, maxIteracoes, maxCriacoes, skills[], maxTokensExecucao | Creates (admin) |
atualizar_agente | W | workspaceId, agenteId, the same fields, plus limpar[] | Changes (admin) |
rodar_agente | W | agenteId, tarefa, colecaoId, documentoAtualId, aguardar | Runs on the server. Requires a collection (colecaoId or the agent’s); one active run per person in each collection. With aguardar (default), waits up to 75 s; past that, returns the execucaoId and the run continues. A created document is already in the wiki; an edit comes back as a proposal |
status_execucao | R | execucaoId | Progress, pending questions and proposals |
responder_execucao | W | execucaoId, resposta, escolhidas[] | Answers an agent’s question |
parar_execucao | W | execucaoId | Stops it |
aplicar_proposta | W | tipo (editar or criar), titulo, conteudoMarkdown, documentoId, colecaoId, parentDocumentoId, icone | Applies a proposal |
If a scope is missing, the tool returns an error saying which one.