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).

ItemValue
Endpointhttps://SUA-WIKI/api/mcp
TransportStreamable HTTP (POST to the endpoint). There is no classic SSE or stdio.
Authenticationnwk_… API key in the Authorization: Bearer or X-Api-Key header
Limit12 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.

ScopeGrants
docs:lerThe read tools
docs:escreverRead and write
(none) or *Full access, with the permissions of whoever created the key
colecoes:gerenciar, exportacoes, workspace:adminShown 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

ToolScopeArgumentsWhat it does
listar_workspacesR—Workspaces you can access
arvoreRworkspaceId, colecaoId, contendo, incluirDocumentos, limiteCollections and documents
buscarRworkspaceId, consulta, colecaoId, limiteText search, accent-insensitive
consultar_baseRworkspaceId, afirmacao, colecaoId, limiteSearch by meaning; requires semantic search on
ler_documentoRdocumentoIdA document’s Markdown
ler_comentariosRdocumentoIdThe comments
perguntarRworkspaceId, pergunta, colecaoId, tipoIdAnswer with sources
analisar_conflitosRworkspaceId, colecaoId, tipoIdDocuments that contradict each other
listar_tagsRworkspaceIdWorkspace tags

Documents and collections

ToolScopeArgumentsWhat it does
criar_documentoWcolecaoId, titulo, conteudoMarkdown, parentDocumentoIdCreates a document
criar_documento_do_tipoWcolecaoId, tipoDocId, titulo, parentDocumentoIdCreates from a template
atualizar_documentoWdocumentoId, conteudoMarkdown, tituloReplaces the content (creates a version)
renomear_documentoWdocumentoId, tituloRenames
mover_documentoWdocumentoId, colecaoId, parentId, ordemMoves in the tree
arquivar_documentoWdocumentoIdSends to the trash (reversible)
tipificar_documentoWdocumentoId, tipoDocIdSets the type (empty removes it)
criar_tagWworkspaceId, nome, corCreates the tag, or returns the existing one
definir_tags_documentoWdocumentoId, tagIds[]Replaces the document’s tags
criar_colecaoWworkspaceId, nome, parentId, icone, descricao, visibilidade, siglaCreates a collection
atualizar_colecaoWcolecaoId, nome, parentId, paraRaiz, ordem, icone, descricao, visibilidadeChanges the collection
excluir_colecaoWcolecaoIdDeletes (admin only)

Boards

ToolScopeArgumentsWhat it does
criar_quadroWcolecaoId, titulo, nos[], conexoes[]Creates a board with boxes and arrows
escrever_quadroWdocumentoId, nos[], conexoes[]Redraws a document’s board
escrever_quadro_jsonWdocumentoId, edgelessJsonWrites a ready-made Excalidraw scene

Document templates

ToolScopeArgumentsWhat it does
listar_modelos_documentoRworkspaceIdWorkspace types
obter_modeloRworkspaceId, tipoDocIdA type with template and instructions
modelos_do_projetoRcolecaoIdThe project’s roles and each one’s current template
templates_do_projetoRcolecaoIdThe project’s code template repositories
criar_modeloWworkspaceId, nome, templateMd, descricao, instrucoesIa, papelId, ehVariantePadrao, icone, indexavel, chaveCreates a type (admin)
atualizar_modeloWworkspaceId, tipoDocId, nome, templateMd, descricao, instrucoesIa, papelId, ehVariantePadrao, chaveChanges a type (admin)

Skills

ToolScopeArgumentsWhat it does
listar_skillsRworkspaceIdWorkspace skills
ler_skillRworkspaceId, skillIdA full skill
criar_skillWworkspaceId, nome, descricao, instrucoes, colecaoId, tipoRaizId, ativoCreates (admin)
atualizar_skillWworkspaceId, skillId, nome, descricao, instrucoes, colecaoId, tipoRaizId, ativo, limpar[]Changes (admin)

Agents and runs

ToolScopeArgumentsWhat it does
listar_agentesRworkspaceIdWorkspace agents
ler_agenteRworkspaceId, agenteIdA full agent
criar_agenteWworkspaceId, nome, descricao, instrucoes, ferramentas[], colecaoId, provider, modelo, ativo, tipoRaizId, maxIteracoes, maxCriacoes, skills[], maxTokensExecucaoCreates (admin)
atualizar_agenteWworkspaceId, agenteId, the same fields, plus limpar[]Changes (admin)
rodar_agenteWagenteId, tarefa, colecaoId, documentoAtualId, aguardarRuns 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_execucaoRexecucaoIdProgress, pending questions and proposals
responder_execucaoWexecucaoId, resposta, escolhidas[]Answers an agent’s question
parar_execucaoWexecucaoIdStops it
aplicar_propostaWtipo (editar or criar), titulo, conteudoMarkdown, documentoId, colecaoId, parentDocumentoId, iconeApplies a proposal

If a scope is missing, the tool returns an error saying which one.