Skip to content

The MCP endpoint, tools, resources, and prompts.

MCP

Serangkai serves MCP over Streamable HTTP at /api/mcp. See Connect an agent for authentication.

Tools

ToolScopeDoes
get_rangka_capabilitiesreadDescribes supported types, components, and limits
set_connection_namereadNames this connection in Settings, unless the owner already named it
list_foldersreadLists folders
searchreadSearches rangka and folders, optionally within a folder subtree
list_rangkareadLists rangka
get_rangkareadReads a rangka's content and current version
create_folderwriteCreates a folder, optionally nested
create_rangkawriteCreates a rangka, optionally inside a folder
update_rangkawriteChanges content, visibility, or folder

Text types are markdown, html, javascript, json, and image (SVG markup). Bundles and PDFs go through the REST upload.

Safe updates

update_rangka requires baseVersion, the version the agent read with get_rangka, whenever content changes. If the rangka changed since then, the update is refused with the current version so the agent can re-read and merge. Metadata-only updates don't need it, and unchanged content creates no new version.

Structured output

Every tool declares an outputSchema and returns structuredContent, with the same JSON repeated as text for older clients. List results are objects, such as { folders } and { rangka }. Typed output lets clients that turn MCP tools into a code API call Serangkai from generated code. Serangkai itself never runs agent-written code on the server.

Resources

URIContents
serangkai://capabilitiesThe same data as get_rangka_capabilities
serangkai://guides/markdownMarkdown, components, Mermaid, charts, and limits
serangkai://guides/htmlSelf-styled HTML, the document theme, markers, and sandbox rules
serangkai://components/selarasSupported component tags, props, slots, and examples
serangkai://tokens/selarasTheme-aware CSS custom properties for HTML rangka
serangkai://templates/*Starting points: report, technicalDoc, dashboard, diagram, interactiveApp, canvasBoard

Prompts

create_report, create_dashboard, create_html_document, create_custom_dashboard, and create_canvas_board give an agent starting instructions for common work.