AI agents, API and CLI
Let your AI assistant read, search and write your wiki.
Connect an assistant through the MCP server, work from the terminal with the CLI, or call the REST API from your own code.
An MCP server, nothing to install
Give your assistant one URL and sign in. It can then find, read and create pages.
A CLI built for agents
Readable tables in a terminal, JSON when the output is piped to a program.
A REST API
List, search, read, create, archive and restore pages over HTTPS with an API key.
Your access, no more
Every connection acts as you. Read-only keys and connections cannot change anything.
How it works
Three ways to connect
All three use the same API underneath, so they have the same permissions, limits and errors. Which one to use depends on what is doing the work.
| Connection | Use it when |
|---|---|
| MCP server | Your AI assistant supports the Model Context Protocol. There is nothing to install. |
| CLI | You work in a terminal, or your agent runs shell commands. |
| REST API | You are writing your own script or integration. |
Connect an assistant with the MCP server
SlimWiki runs an MCP server at one address. It speaks MCP over HTTP (the Streamable HTTP transport).
https://api.slimwiki.com/mcpAdd the server to your assistant
In an assistant that supports remote MCP servers, add a server (often called a connector) with the URL above. In Claude Code:
Claude Code claude mcp add --transport http slimwiki https://api.slimwiki.com/mcpSign in and choose Allow
The first time the server is used, your browser opens SlimWiki. The page shows the name of the app that wants to connect and what it will be able to do. Choose Allow to connect, or Deny to refuse.
Ask your assistant to use the wiki
For example: “Search the wiki for our release checklist and summarize it.” The assistant calls the tools below.

What an assistant can do
The MCP server gives an assistant these tools:
| Tool | What it does |
|---|---|
whoami | Says which user the connection acts as. |
list_accounts | Lists the accounts you belong to. |
list_wikis | Lists the wikis in an account. |
list_pages | Lists the pages in a wiki. |
search_pages | Searches the titles and content of the pages in a wiki. |
get_page | Reads one page with its content. |
create_page | Creates a page, optionally under another page. |
archive_page | Moves a page to the archive. |
restore_page | Brings an archived page back. |
The last three change the wiki, so they need write access. Things to know:
- It acts as you. The assistant can reach only the wikis and pages you can, and a connection allowed for reading only cannot create, archive or restore pages.
- It cannot delete permanently. There is no tool to delete a page. An assistant can archive a page, and archiving can be undone.
- It cannot edit an existing page. A page's content is set when the page is created.
- There is a rate limit. Each tool call counts as one request towards a limit of 120 requests per minute.
Create an API key
The REST API, and the CLI or MCP server when no browser is available, are authenticated with a personal API key. A key acts as the person who created it, with exactly their access.
Open your profile and choose the API keys tab
Name the key
Say what it is for, such as “Nightly export”, so you can recognize it later.
Choose its access
Read and write can make changes where you are allowed to; Read only cannot change anything. Prefer a read-only key when a tool only needs to look things up.
Choose an expiry
Never expires, 30 days, 90 days or 1 year.
Choose Create key and copy it
The key starts with
swk_and is shown only once. Store it somewhere safe, such as a password manager.

Work from the terminal with the CLI
The slimwiki command-line tool lists, searches, reads and creates pages. It is a package on npm and needs Node.js 22.19 or later.
Install it
Install npm i -g slimwikiSign in
Sign in slimwiki auth loginYour browser opens. Check that the code shown there matches the one in your terminal and choose Allow. The CLI is given an API key of its own, valid for 90 days, which appears under Profile → API keys as “SlimWiki CLI”.
Find, read and create pages
Examples slimwiki page list --search "release checklist" slimwiki page get release-checklist slimwiki page create --title "Release notes" --file notes.json

Teach an agent how SlimWiki works
The SlimWiki skill is a single instructions file, SKILL.md, for agents that support skills. It tells the agent how accounts, wikis and pages fit together, which actions exist, how to write page content, and what each error means.
The skill does not connect to SlimWiki by itself. It uses whichever connection the agent has: the MCP server, the CLI, or the API with a key. The Agent skill guide shows how to install it.
Build on the REST API
The API is served from https://api.slimwiki.com. Send your key as a bearer token in the Authorization header of every request. With the key in the SLIMWIKI_API_KEY environment variable:
curl "https://api.slimwiki.com/v1/me" \
-H "Authorization: Bearer $SLIMWIKI_API_KEY"These are the endpoints:
| Request | What it does |
|---|---|
| GET /v1/me | Retrieve the key owner |
| GET /v1/accounts | List accounts |
| GET /v1/wikis | List wikis |
| GET /v1/wikis/{wiki_id} | Retrieve a wiki |
| GET /v1/wikis/{wiki_id}/pages | List pages in a wiki |
| GET /v1/wikis/{wiki_id}/pages/search | Search pages in a wiki |
| GET /v1/wikis/{wiki_id}/pages/lookup | Find a page by slug or hash |
| POST /v1/pages | Create a page |
| GET /v1/pages/{page_id} | Retrieve a page |
| DELETE /v1/pages/{page_id} | Delete a page |
| POST /v1/pages/{page_id}/archive | Archive a page |
| POST /v1/pages/{page_id}/restore | Restore a page |
A key can make 120 requests per minute.
Questions and answers
Which AI assistants can connect to SlimWiki?
Any assistant that supports remote Model Context Protocol (MCP) servers can connect to the MCP server by signing in. Agents that run shell commands can use the slimwiki CLI, and anything that can make HTTPS requests can use the REST API.
What can an assistant see?
Only what you can. A connection acts as the person who signed in or created the API key, with exactly their access to wikis and pages.
Can an assistant delete my pages?
Not through the MCP server: it has no tool to delete a page. An assistant with write access can archive a page, and an archived page can be restored. The REST API does have a request that deletes a page, and it needs a read-and-write key. A read-only key or connection cannot change anything.
Can an assistant edit an existing page?
No. Through the API, the CLI and the MCP server, a page's content is set when the page is created. An assistant can create new pages and archive or restore existing ones.
Where do I create an API key?
In SlimWiki, open your profile and choose the API keys tab. You choose whether the key is read only or read and write, and when it expires. The key is shown once, when you create it.