@sophia-wiki/mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| SOPHIA_TOKEN | Yes | Your Sophia personal API token, beginning with `sph_…`. | |
| SOPHIA_API_URL | Yes | URL of the Sophia API, e.g. https://sophia.example.com/sophia/api (`/api` is added if missing). | |
| SOPHIA_WEB_URL | No | Optional. Base of the web app for page links (default: the API URL without `/api`, ending in `/sophia`). | |
| ATLASSIAN_EMAIL | No | Optional, all three Atlassian variables or none: email used with the Atlassian API token to download Confluence attachments by URL (read only). | |
| ATLASSIAN_SITE_URL | No | Optional, all three Atlassian variables or none: to download Confluence attachments by URL (read only). | |
| ATLASSIAN_API_TOKEN | No | Optional, all three Atlassian variables or none: API token used with the Atlassian email to download Confluence attachments by URL (read only). | |
| SOPHIA_MAX_ATTACHMENT_MB | No | Optional. Largest file `upload_attachment` / `import_attachment` accepts (default 100). | 100 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Sophia is a wiki (spaces of Markdown pages with version history, comments and files). Spaces are identified by key (ENG), pages by uuid. Start with list_spaces, get_page_tree or search_pages; read with get_page and write with create_page / update_page (send the version you read; on a 409 re-read, merge and save again). Bodies are GitHub-flavoured Markdown with a few Sophia tokens (files, mentions, panels, internal links): the tool descriptions explain them, and raw HTML is not rendered. The import_* tools migrate content from Confluence with its full history and need an import:write token owned by a global admin: read Confluence with its own MCP, convert each page version to Sophia Markdown yourself, and write it here; they are idempotent by source id. Writes act as the token owner. When a tool answers with a permission error, do not retry: tell the user which scope the token lacks.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| whoamiA | Show the person this token acts as (name, email, global role). Use it to check the connection; every write is made as this person and limited by their role. |
| list_spacesA | List the spaces you can see, with their key (used by the other tools), your role in each (viewer < editor < admin) and member count. Archived spaces are read-only and only listed when asked. |
| get_page_treeA | The live page tree of a space as an indented list of "title (page id)", in sidebar order. Pass root_page_id to see only one subtree. Use the ids with get_page. |
| get_pageA | Read a page: title, version, URL, breadcrumbs and the body as Sophia Markdown (exact text, to edit and send back with update_page). Long bodies are cut at max_chars: continue with offset, and never save a cut body. With version, reads that older version; with history, lists all versions. Body = GitHub-flavoured Markdown (tables, task lists, fenced code). Raw HTML is NOT rendered (shown as text), so convert it. Sophia syntax: files |
| search_pagesA | Search page titles and text (prefix match) in the spaces you can see, newest first. One line per hit: title · space · page id · updated · plain-text snippet. Use get_page for the whole page. |
| recent_pagesB | The pages updated last, across the spaces you can see: title · space · page id · updated. |
| create_pageA | Create a page in a space (needs editor role there), at the root or under a parent page. Returns its id, version 1 and URL. To add files, create the page first, then upload_attachment and update_page. Body = GitHub-flavoured Markdown (tables, task lists, fenced code). Raw HTML is NOT rendered (shown as text), so convert it. Sophia syntax: files |
| update_pageA | Save a new version of a page (needs editor role). Always read the page first (get_page) and send the version you read: if someone saved in between, Sophia answers 409 and you must re-read, merge their changes with yours and save again with the new version. Send the COMPLETE new body (it replaces the old one); title and body are each optional, the one you omit stays as it is. Body = GitHub-flavoured Markdown (tables, task lists, fenced code). Raw HTML is NOT rendered (shown as text), so convert it. Sophia syntax: files |
| list_commentsA | The comments of a page as threads (oldest first, replies indented). Each line: date, comment id, author and text; deleted ones that still hold replies show as "(deleted comment)". |
| add_commentA | Add a comment to a page, or reply to one with parent_comment_id (reply to the first comment of a thread). Markdown, mentions |
| list_attachmentsB | The ready files of a page: name · type · size · the token |
| upload_attachmentA | Upload a local file (absolute path on the machine running this server) to a page you can edit. Returns the token |
| import_idsA | Pure computation, no API call. Derives the Sophia ids an import will use (UUIDv5 of "confluence_page:" etc. in a fixed namespace), so you can write internal links |
| import_find_usersA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Search people by name or email, including deactivated ones. Returns "Sophia user id · name · email". Sophia user ids are what the other import tools take as authors and what mentions use: |
| import_ensure_userA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Make sure a person exists, by email. No password and no mail is created: an imported person later signs in with SSO (linked by verified email) or, in local mode, with "forgot password". If the email already exists it returns that person WITHOUT changing them. Use deactivated=true for people who left the company but authored content. |
| import_create_spaceA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Create a space from a Confluence space. Idempotent by source_id: if it was imported before it returns that space (created=false) and changes nothing. The key must be 2–50 characters, uppercase letter first, then uppercase letters or digits (Confluence keys may need adjusting). Add its people afterwards with import_add_member. |
| import_add_memberA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Only works in a space created with import_create_space (otherwise 403 IMPORT_SPACE_NOT_IMPORTED). Add a person to a space with a role (viewer < editor < admin). If they are already a member their role is NOT changed (created=false). |
| import_pageA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Only works in a space created with import_create_space (otherwise 403 IMPORT_SPACE_NOT_IMPORTED). Create a page with its WHOLE history. versions go in chronological order (oldest first): the last one is the current text, the earlier ones become history. Idempotent by source_id (created=false, nothing changes). The page id is deterministic (see import_ids), so you can write internal links to ANY page, imported or not, in one pass: |
| import_page_versionsA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Only works in a space created with import_create_space (otherwise 403 IMPORT_SPACE_NOT_IMPORTED). Append versions (oldest first) after the page's current one, for a second pass, a long history sent in batches, or a final version with corrected links. They must be newer than what the page already has. The last one becomes the current text. Batches above 500 versions or ~20 MB are split automatically. Not idempotent: do not resend a batch that succeeded. Body = GitHub-flavoured Markdown (tables, task lists, fenced code). Raw HTML is NOT rendered (shown as text), so convert it. Sophia syntax: files |
| import_attachmentA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Only works in a space created with import_create_space (otherwise 403 IMPORT_SPACE_NOT_IMPORTED). Upload a file to an imported page under the uuid you chose (the one written in the body as |
| import_commentA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Only works in a space created with import_create_space (otherwise 403 IMPORT_SPACE_NOT_IMPORTED). Create a comment on an imported page with its original author and dates. Idempotent by source_id. Replies use parent_comment_id = the Sophia id, or the Confluence id, of a comment you imported before; the API flattens threads to ONE level: a reply to a reply attaches to the first comment of the thread. Comments cannot carry files. Markdown rules are the same as pages (mentions, ticket keys, links); raw HTML is not rendered. |
| import_lookupA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Map Confluence ids to Sophia ids (up to 200 per call). For pages it gives the Sophia page id to build internal links: |
| import_check_pageA | Needs a token with the import:write scope whose owner is a global admin. Nothing is emailed or notified, and no per-row audit events are written. Lists the files a page body references that are not ready (never uploaded, or still pending). Run it after importing the attachments of a page: an empty list means every |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 23 tools
The surface splits into two clearly labeled clusters: core wiki tools and import_-prefixed Confluence migration tools. Within each cluster tools target distinct resources (pages, comments, attachments, spaces, users), though a few pairs (create_page vs import_page, list_attachments vs import_check_page, import_ids vs import_lookup) require reading the long descriptions to see the boundary.
Core tools are mostly verb_noun (list_spaces, create_page, update_page, add_comment, upload_attachment), and the import suite is uniformly import_<action>. Minor deviations exist (recent_pages is adjective-first, whoami is verb-only, get_page_tree uses a compound noun), but the pattern remains readable.
23 tools is on the heavy side for a wiki server, and the set is effectively two suites glued together. Each cluster (12 core + 11 import) is individually well-scoped, but the combined surface sits at the borderline where an agent must scan a lot of tools.
Page read/create/update, comments, attachments and search are covered, and the import lifecycle is thorough. However, no delete operations exist anywhere (page, comment, attachment), comments cannot be edited or resolved, and there is no ordinary space-creation path outside the import flow—notable gaps for a wiki surface.