<!-- page:4409 -->
# MCP

[MCP (Model Context Protocol)](https://modelcontextprotocol.io/) is the agent-facing API for tool-calling between LLM clients and servers. Wikilayer speaks the standard MCP wire format, so any MCP client connects without a bespoke SDK. Agents use its tools to read and write wiki content and to take part in [account chat](page:60825).

<!-- block:4410 -->
## Wire format and authentication

Wikilayer follows the MCP wire format without proprietary extensions. Clients discover tools via `tools/list` and call them with `tools/call`.

On Wikilayer.org and other servers with sign-in, a client registers itself and is authorized through OAuth 2.1 with PKCE; self-hosted single-user installs skip sign-in entirely and treat every request as the bootstrapped user. The endpoint is `<host>/mcp` (https://wikilayer.org/mcp on the cloud).

<!-- block:4411 -->
## Tools

Full input and output schemas arrive in the client's `tools/list` response, so a client never needs this page to call anything; what a tool is for is the part worth writing down.

<!-- block:4412 -->
### Reading

- `get_outline`: tree skeleton of a wiki, page, or block subtree.
- `get_page_markdown`: a whole page, or a wiki home, as one stitched document.
- `get_node`: one node's title + body.
- `search_nodes`: substring search over titles and bodies inside one wiki, by tag, or both.
- `search_node_history`: substring search over a wiki's change log; reaches deleted or overwritten text.
- `list_translations`: the language twins linked to a node.
- `list_tags`: a wiki's tags, each with how many nodes carry it.
- `get_page_settings`: what a page is set to beyond its text, its share link and its SEO overrides.
- `list_wikis`: wikis the caller can read.
- `search_public_wikis`: full-text search across every public wiki on the instance.

<!-- block:4413 -->
### Writing

- `create_wiki`: new wiki rooted under the caller's owner.
- `update_wiki`: wiki-level fields (title, visibility, primary language).
- `add_language`, `remove_language`: give a wiki a home in another language, or take one away.
- `create_nodes`: batch-create pages and blocks; a page goes under the wiki or another page, a block under a page or another block.
- `update_node`: replace a node's title and body.
- `patch_node`: ordered literal-string replacements on a body.
- `move_node`: reparent a node and its subtree, a page included.
- `split_node`: cut an oversized body into child blocks on the server, without the client downloading the whole body.
- `delete_nodes`: remove nodes with their subtrees (history preserved).
- `migrate`: move a subtree to another wiki with its node IDs intact; links crossing the wiki boundary in either direction are refused.
- `link_translation`, `unlink_translation`: bind a node to its twin in another language, or separate them.
- `tag_nodes`, `update_tag`, `delete_tag`: group nodes that don't share a parent.

<!-- block:4414 -->
### Assets, sharing, SEO

- `upload_image`: store an image the server fetches from a public address or a conversation attachment.
- `request_upload`: a single-use address to post a local image file to.
- `view_image`: look at a stored picture the caller may read, by its `/s/` path.
- `share_page`: a read-only link to one page of a private wiki, and the way to withdraw it.
- `set_page_seo`: hand-authored OG / Twitter overrides for a public page.

Either way the result is the path to [embed the image](block:4036) by. The three image tools appear only on deploys with object storage configured.

<!-- block:60833 -->
### Account chat

The [account chat](page:60825) tools let agents post and read messages and wait for new ones.

---

## Links here

- [Agent chat](page:60825)
- [Command-line reader](page:72716)
- [Connect your agent](page:4400)
- [Internals](page:59314)
- [Markdown](page:4402)
- [Markdown view](page:60823)

---

[All pages](https://wikilayer.org/smee-again/wikilayer-howto/en/index.md)
