Slima

io.github.slima-ai由 GitHub 帳號 slima-ai 發布v0.1.13更新於 Oct 26, 2026

MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.

已驗證Streamable HTTP可網頁執行效率與工作流檔案與儲存AI 與機器學習

概覽

AI 產生的概覽

Slima MCP 將 AI 助理連接到專為小說作者設計的 AI 寫作 IDE Slima,可管理書籍、編輯稿件檔案並執行 AI 試讀回饋。

可以做什麼
  • 建立、列出並檢視書籍,包含檔案結構與字數統計
  • 讀取、搜尋並以語意檢索稿件檔案與章節
  • 編輯、寫入、新增、附加與刪除檔案,每次寫入都會記入版本歷史
  • 更新結構化檔案,例如人物關係圖、節拍板、時間軸、劇本與世界地圖
  • 留下、列出並處理作者註記與編輯評論討論串
  • 以指定讀者人設對章節執行 AI 試讀分析並取得報告
適用情境
適合在 Slima 中保存小說或劇本、希望助理直接在對話中起草、修改、檢索與評論稿件的作者。也適合取得針對章節的結構化讀者回饋。
執行需求
可使用託管的遠端端點並以 OAuth 登入,或透過 npx 執行本機 npm 套件 slima-mcp(需要 Node.js)。本機使用需在 SLIMA_API_TOKEN 提供 Slima API 權杖,或執行一次瀏覽器授權將憑證存到磁碟。需要連線至 Slima API 的網路存取。
安裝前請注意
API 權杖可存取你的 Slima 書庫,並保存在本機憑證檔案中;若外洩請在 Slima 設定中撤銷。許多工具會寫入、取代、附加或刪除檔案,並建立書籍、註記與評論,不過寫入都會記入版本歷史。analyze_chapter 會消耗作者的額度。Script Studio 書籍僅允許寫入規劃路徑,結構化檔案為唯讀。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Slima,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.slima-ai%2Fslima/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "slima": {
      "type": "http",
      "url": "https://mcp.slima.ai/mcp"
    }
  }
}

README

Slima MCP

[npm version] [License: MIT]

MCP (Model Context Protocol) Server for Slima - AI Writing IDE for Novel Authors.

Connect your Slima books to any MCP-compatible AI tool - one server, all platforms.

Supported Platforms

Desktop Applications (Local MCP - stdio)

PlatformStatusNotes
Claude Desktop✅Native MCP support
ChatGPT Desktop✅Developer Mode (2025.10+)
Gemini CLI✅Native MCP support
Cursor✅Native MCP support
VS Code✅Via MCP extensions

Web Applications (Remote MCP - HTTP)

PlatformStatusNotes
Claude.ai✅OAuth login, no token needed
ChatGPT Web✅OAuth login, no token needed

MCP became the industry standard in December 2025 when Anthropic, OpenAI, and Block co-founded the Agentic AI Foundation under the Linux Foundation.

Features

Book Management

  • Create new books
  • List and view your books
  • Get file/folder structure
  • Track writing statistics

File Operations

  • Read any file by path
  • Edit specific text (search & replace)
  • Write (replace) file content
  • Create new files
  • Delete files
  • Append content to files
  • Search across all files

AI Beta Reader

  • Get feedback from virtual reader personas
  • Analyze chapters with different reader perspectives

Quick Start

Pick the path that matches how you use AI:

Recommended: claude.ai / ChatGPT Web (auto-updating)

If you chat with Claude or ChatGPT in a browser, this is the easiest and most future-proof option. Configure once and you will automatically get every Slima MCP update — no upgrade commands, no config edits.

MCP URL: https://mcp.slima.ai/mcp

claude.ai (Pro / Max / Team / Enterprise)
  1. Sign in at claude.ai.
  2. Open Settings → Connectors (or Integrations depending on your plan).
  3. Click Add custom connector.
  4. Fill in:
    • Name: Slima
    • URL: https://mcp.slima.ai/mcp
  5. Click Connect → you will be redirected to slima.ai to approve → return to claude.ai.
  6. The Slima tools icon appears in your chat input. You're done.
ChatGPT (Plus / Pro, Developer Mode)
  1. Sign in at chatgpt.com.
  2. Open Settings → Connectors → Advanced and toggle Developer Mode on (2025.10+).
  3. Back in Connectors, click Create → Custom MCP Server.
  4. Fill in:
    • Name: Slima
    • Server URL: https://mcp.slima.ai/mcp
    • Authentication: OAuth
  5. Click Create → approve the OAuth flow.

After setup, Slima features roll out automatically on your next conversation. No restarts, no reinstalls.


Local: Claude Desktop / Cursor / Gemini CLI

Use this if you want offline-friendly operation, faster startup, or you need to run MCP alongside other stdio servers.

Recommended config — pinned to the major version so you pick up new features automatically but never break on a 1.0 release:

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{  "mcpServers": {    "slima": {      "command": "npx",      "args": ["-y", "slima-mcp@0"],      "env": {        "SLIMA_API_TOKEN": "slima_your_token_here"      }    }  }}

Get your token from Account settings → Authorized Apps or run npx slima-mcp@0 auth once to save it to disk.

Cursor
json
{  "mcpServers": {    "slima": {      "command": "npx",      "args": ["-y", "slima-mcp@0"],      "env": {        "SLIMA_API_TOKEN": "slima_your_token_here"      }    }  }}
Gemini CLI
bash
gemini mcp add slima --command "npx -y slima-mcp@0"

Or install it as a Gemini CLI extension (it asks for your API token once and keeps it in the system keychain):

bash
gemini extensions install https://github.com/slima-ai/slima-mcp

Why slima-mcp@0 instead of slima-mcp / slima-mcp@latest? Using @0 pins to the current major version — npx fetches new 0.x.y releases automatically (so you get features + bug fixes), but when we ship 1.0.0 with breaking changes you won't silently pick it up without updating your config. We'll announce the @1 switch in the release notes.

⚠️ This only holds if you do not also have a global slima-mcp install. npx pkg@<range> will happily satisfy the range from a package already on your PATH and never contact the registry at all. Measured on 2026-09-09 with a global 0.2.0 present and 0.3.0 on npm:

commandresolved
npx -y slima-mcp@00.2.0 — used the global install
npx -y slima-mcp0.2.0 — same
npx -y slima-mcp@latest0.3.0 — a dist-tag forces a registry lookup
npx -y [email protected]0.3.0 — the global can't satisfy an exact newer version

So a stale global install makes the npx form silently stop upgrading, while the server keeps telling you to upgrade. Remove it — see below.

Migrating from a global install

If you already installed globally with npm install -g slima-mcp:

bash
# Remove the old global install — REQUIRED, not just tidiness.# Leaving it in place makes `npx -y slima-mcp@0` resolve to the old global copy# forever (see the warning above), so you'd stay outdated while being told to upgrade.npm uninstall -g slima-mcp
# Then change your config `command` from "slima-mcp" to the npx form above, and restart the client.# Verify: `npx -y slima-mcp@0 --version` must print the version shown by `npm view slima-mcp version`.

⚠️ Check every place you may have installed it. A global install can exist per Node version manager environment and per OS — on WSL setups it is common to have one under nvm and one under Windows' AppData/Roaming/npm, at two different versions, with only one of them on the PATH your MCP client actually uses.

Or, if you want to stay on a global install, remember to periodically run:

bash
npm install -g slima-mcp@latest

Otherwise your local client will drift from the MCP tools/schema the Slima backend exposes.

Self-host (advanced)

You can also clone this repo and deploy the Cloudflare Worker yourself. See wrangler.toml + npm run deploy:worker. Not required for normal use.


Remote MCP Security

The hosted Remote MCP Server at https://mcp.slima.ai/mcp uses:

  • OAuth 2.0 + PKCE for authentication — no tokens copy-pasted.
  • No secrets stored server-side — credentials never leave Slima's auth server.
  • Session-based: OAuth tokens are stored in Cloudflare KV, scoped per session.
  • Revocable anytime from Account settings → Authorized Apps: revoking an app takes effect on its next request.

Book Types: Writing Studio vs Script Studio

Slima books come in two flavors, distinguished by the book_type field. MCP behaves slightly differently for each:

📖 Writing Studio (book_type: "book")📝 Script Studio (book_type: "script")
Creation via MCP✅ create_book works❌ use the Slima app UI
Read (any file)✅✅
Write / Edit / Delete✅ any path✅ only under .script_studio/planning/**/*
Structured files (series.json, *.character, *.scene, *.storyline, *.note, *.location, season.json, episode.json)n/a❌ read-only via MCP — edits must go through the Script Studio UI
analyze_chapter (AI Beta Reader)✅❌ not yet supported on structured scenes
search_contentall filesstructured files excluded by default; pass include_structured: true to include them

For per-book details, ask your AI client to read the resource slima://books/{book_token}/schema — it returns a JSON spec of exactly which paths are writable/read-only for that specific book.

list_books tags every book with its studio icon (📝 / 📖) so you (and the AI) can tell them apart at a glance.


Available Tools

39 tools. R = read-only (never changes your book); W = changes something and says so in its description. Reads and writes are always separate tools.

Start here (teaching)

ToolR/WDescription
get_capabilitiesRWhat this server supports: writable file types, content types, tools, guides
list_guidesRList the Slima guides and when to load each
load_guideRLoad one guide in full
list_writing_skillsRList the writing craft procedures (develop a character, revise a scene, ...)
load_writing_skillRLoad one writing skill in full

Book Management

ToolR/WDescription
create_bookWCreate a new Writing Studio book in your library
list_booksRList the books in your library (paginated)
get_bookRGet details of a specific book
get_book_structureRGet the file/folder structure of a book
get_writing_statsRGet word-count totals for a book

File Operations

ToolR/WDescription
read_fileRRead the content of any file by path
get_chapterRRead a chapter by path or file name
edit_fileWReplace a specific text segment (search and replace)
write_fileWReplace the entire content of an existing file
create_fileWCreate a new file in a book
delete_fileWDelete a file or an empty folder
append_to_fileWAppend content to the end of a file
search_contentRSearch for text across all files
semantic_searchRFind passages by meaning rather than exact words

Every write is a commit in the book's version history, so it can be reviewed and reverted.

Structured Files (one field at a time)

ToolR/WDescription
view_relationship_mapRSee a .map relationship graph as a picture plus a readable summary
update_relationship_mapWChange a relationship map (.map)
update_beat_boardWChange a beat board (.beats)
update_timelineWChange a timeline (.timeline)
update_scriptWChange a screenplay (.script)
update_world_mapWChange a world map (.geomap)

Notes and Comments

ToolR/WDescription
list_notesRThe author's margin notes on a book
create_noteWLeave a note beside the manuscript (does not touch the prose)
list_commentsREditorial comment threads, open and resolved
create_commentWLeave an editorial comment
resolve_commentWMark a comment thread addressed
reopen_commentWReopen a resolved comment thread

AI Beta Reader

ToolR/WDescription
list_personasRList the virtual reader personas
analyze_chapterWRun AI Beta Reader feedback on a chapter from one persona (spends the author's credits)
get_reader_testRCollect a Beta Reader report that was still running

Teams

ToolR/WDescription
list_teamsRList the teams this account belongs to
get_teamROne team: its members and roles
list_team_rulesRThe team's coaching rules (house style)
list_team_memoriesRWhat the team has established: recurring characters, naming conventions, decisions
list_team_skillsRThe team's own writing procedures

Usage Examples

Once configured, you can ask your AI:

Book & Content:

  • "Create a new book called 'My Novel'"
  • "List my books in Slima"
  • "Show me the structure of my novel"
  • "Read chapter 3 of my book"
  • "What are my writing stats?"

File Operations:

  • "Read the character profile for my protagonist"
  • "Edit chapter 1 and change 'John' to 'James'"
  • "Create a new file called worldbuilding.md with notes about the magic system"
  • "Search for all mentions of 'blue eyes' in my book"
  • "Append this new paragraph to chapter 5"

AI Feedback:

  • "Get feedback on chapter 5 from a young reader perspective"
  • "Analyze my opening scene from a critic's perspective"

CLI Commands

bash
slima-mcp auth      # Authenticate with browser (recommended)slima-mcp status    # Check authentication statusslima-mcp logout    # Remove saved credentialsslima-mcp --help    # Show helpslima-mcp --version # Show version

Token is stored in ~/.slima/credentials.json with secure permissions.

Environment Variables

VariableRequiredDefaultDescription
SLIMA_API_TOKENNo*-Your Slima API token
SLIMA_API_URLNohttps://api.slima.aiAPI endpoint (for development)
DEBUGNofalseEnable debug logging

*Not required if you used slima-mcp auth

Development

Local CLI Development

bash
# Clone the repositorygit clone https://github.com/slima-ai/slima-mcp.gitcd slima-mcp
# Install dependenciesnpm install
# Build CLInpm run build
# Run testsnpm test
# Run in development modenpm run dev

Cloudflare Worker Development

bash
# Build the Workernpm run build:worker
# Run Worker locallynpm run dev:worker
# Deploy to Cloudflarenpm run deploy:worker
# Deploy to the test environment (test-mcp.slima.ai)npm run deploy:worker:test

Project Structure

slima-mcp/├── src/│   ├── core/           # Shared core modules│   │   ├── api/        # Slima API Client│   │   ├── tools/      # MCP Tool implementations│   │   └── utils/      # Utilities and errors│   ├── cli/            # CLI entry point (stdio transport)│   │   ├── index.ts    # CLI main│   │   ├── auth.ts     # Authentication commands│   │   └── server.ts   # MCP Server for CLI│   └── worker/         # Cloudflare Worker (HTTP transport)│       ├── index.ts    # Worker entry point│       └── oauth.ts    # OAuth 2.0 + PKCE client├── wrangler.toml       # Cloudflare Worker config├── tsup.config.ts      # CLI build config└── tsup.worker.config.ts # Worker build config

Security

  • API tokens are stored locally and never shared
  • All communication with Slima API uses HTTPS
  • Tokens can be revoked anytime from Slima settings

Release & Deployment

npm (Automatic)

Merge to main with a version bump in package.json triggers automatic npm publish via GitHub Actions.

bash
# 1. Bump version on dev branchnpm version patch   # 0.1.10 → 0.1.11
# 2. Merge to maingit checkout main && git merge dev && git push
# 3. CI runs tests → publish.yml publishes to npm + creates git tag

Cloudflare Worker (Manual)

Worker deployment is separate from npm, and nothing triggers it automatically. Publishing to npm does NOT update mcp.slima.ai. Remote clients (claude.ai / ChatGPT connectors) talk to the Worker, so they keep running the old tool set until someone runs this by hand:

bash
npm run deploy:worker:test   # Test  (test-mcp.slima.ai -> test-api.slima.ai)npm run deploy:worker        # Prod  (mcp.slima.ai      -> api.slima.ai)

Deploy test first and check curl https://test-mcp.slima.ai/ | jq .version before doing prod; the same one-liner against mcp.slima.ai is how you tell whether the Worker is behind npm at all.

2026-09-09: the Worker sat on 0.2.0 for four and a half months — it was last deployed the same day npm 0.2.0 shipped, so every change after that reached npm users and no connector users. There is no alarm for this; the version endpoint is the only signal.

There used to be a deploy:worker:preview script pointing at an [env.preview] block. It was removed on 2026-09-09: its KV id was the literal placeholder string, staging-api.slima.ai does not resolve, and — worst — it defined no routes. routes is an inheritable key in wrangler, so that command would have inherited the top-level mcp.slima.ai custom domain and pointed production's hostname at the preview Worker. The real staging environment is [env.test].

MCP Registry (Manual)

To publish/update the server listing on the MCP Registry:

bash
mcp-publisher login githubmcp-publisher publish

Requires mcpName in package.json and server.json in repo root.

Operational Notes

Debugging Worker OAuth

When troubleshooting claude.ai or ChatGPT connector issues:

bash
# Live logs from production Workerwrangler tail slima-mcp

All OAuth endpoints log key parameters (client_id, redirect_uri, token prefix, etc.) to help trace the flow.

Worker OAuth Flow (claude.ai / ChatGPT)

Client POST /mcp → 401 + WWW-Authenticate header  → Client GET /.well-known/oauth-protected-resource  → Client GET /.well-known/oauth-authorization-server  → Client POST /register (DCR)  → Client redirects user to GET /authorize    → Worker redirects to Rails OAuth    → User authorizes → Rails redirects to Worker /callback    → Worker issues auth code → redirects to client callback  → Client POST /token (exchange code for access_token)  → Client POST /mcp (Authorization: Bearer {access_token})

Known Constraints

  • Worker Bearer token validation accepts all non-empty tokens (not just slima_ prefix) to support OAuth-issued tokens. Rails API performs actual validation.
  • getTokenFromSession() checks Authorization header first, then falls back to cookie session.
  • MCP Inspector (npx @modelcontextprotocol/inspector) is useful for testing the full OAuth flow independently.

License

MIT

Links

來源:README.md,提交 f8e71b9

工具

0
SourceWeft 尚未讀取此伺服器的工具。

版本歷史

1
  1. v0.1.13最新Sep 16, 2026

評分

已滿足適用檢查項的 85%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分