npm slima-mcpstreamable-httpMITupdated 4mo ago
MCP (Model Context Protocol) Server for Slima - AI Writing IDE for Novel Authors.
What can you do with slima?
Slima MCP
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)
| Platform | Status | Notes |
|---|---|---|
| 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)
| Platform | Status | Notes |
|---|---|---|
| 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:
- ā Use claude.ai / ChatGPT in a web browser ā Recommended: web connector (one-time setup, auto-updates forever)
- Use Claude Desktop / Cursor / Gemini CLI locally ā Local install with
npx - Running in air-gapped / enterprise environments ā Self-host
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)
- Sign in at claude.ai.
- Open Settings ā Connectors (or Integrations depending on your plan).
- Click Add custom connector.
- Fill in:
- Name:
Slima - URL:
https://mcp.slima.ai/mcp
- Name:
- Click Connect ā you will be redirected to slima.ai to approve ā return to claude.ai.
- The Slima tools icon appears in your chat input. You're done.
ChatGPT (Plus / Pro, Developer Mode)
- Sign in at chatgpt.com.
- Open Settings ā Connectors ā Advanced and toggle Developer Mode on (2025.10+).
- Back in Connectors, click Create ā Custom MCP Server.
- Fill in:
- Name:
Slima - Server URL:
https://mcp.slima.ai/mcp - Authentication: OAuth
- Name:
- 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):
{
"mcpServers": {
"slima": {
"command": "npx",
"args": ["-y", "slima-mcp@0"],
"env": {
"SLIMA_API_TOKEN": "slima_your_token_here"
}
}
}
}
Get your token from Slima Settings or run npx slima-mcp@0 auth once to save it to disk.
Cursor
{
"mcpServers": {
"slima": {
"command": "npx",
"args": ["-y", "slima-mcp@0"],
"env": {
"SLIMA_API_TOKEN": "slima_your_token_here"
}
}
}
}
Gemini CLI
gemini mcp add slima --command "npx -y slima-mcp@0"
Why
slima-mcp@0instead ofslima-mcp/slima-mcp@latest? Using@0pins to the current major version ā npx still fetches new0.x.yreleases automatically (so you get features + bug fixes), but when we ship1.0.0with breaking changes you won't silently pick it up without updating your config. We'll announce the@1switch in the release notes.
Migrating from a global install
If you already installed globally with npm install -g slima-mcp:
# Remove the old global install (optional but cleaner)
npm uninstall -g slima-mcp
# Change your config `command` from "slima-mcp" to the npx form above, and restart the client.
Or, if you want to stay on a global install, remember to periodically run:
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 Slima Settings.
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_content |
all files | structured 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
Book Management
| Tool | Description |
|---|---|
create_book |
Create a new book in your library |
list_books |
List all books in your Slima library |
get_book |
Get details of a specific book |
get_book_structure |
Get the file/folder structure of a book |
get_writing_stats |
Get writing statistics for a book |
File Operations
| Tool | Description |
|---|---|
read_file |
Read content of any file by path |
edit_file |
Edit specific text using search & replace |
write_file |
Replace entire content of a file |
create_file |
Create a new file in a book |
delete_file |
Delete a file from a book |
append_to_file |
Append content to end of a file |
search_content |
Search for text across all files |
AI Beta Reader
| Tool | Description |
|---|---|
list_personas |
List available beta reader personas |
analyze_chapter |
Get AI beta reader feedback on a chapter |
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
slima-mcp auth # Authenticate with browser (recommended)
slima-mcp status # Check authentication status
slima-mcp logout # Remove saved credentials
slima-mcp --help # Show help
slima-mcp --version # Show version
Token is stored in ~/.slima/credentials.json with secure permissions.
Environment Variables
| Variable | Required | Default | Description |
|---|---|---|---|
SLIMA_API_TOKEN |
No* | - | Your Slima API token |
SLIMA_API_URL |
No | https://api.slima.ai |
API endpoint (for development) |
DEBUG |
No | false |
Enable debug logging |
*Not required if you used slima-mcp auth
Development
Local CLI Development
# Clone the repository
git clone https://github.com/slima-ai/slima-mcp.git
cd slima-mcp
# Install dependencies
npm install
# Build CLI
npm run build
# Run tests
npm test
# Run in development mode
npm run dev
Cloudflare Worker Development
# Build the Worker
npm run build:worker
# Run Worker locally
npm run dev:worker
# Deploy to Cloudflare
npm run deploy:worker
# Deploy to preview environment
npm run deploy:worker:preview
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.
# 1. Bump version on dev branch
npm version patch # 0.1.10 ā 0.1.11
# 2. Merge to main
git 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. Deploy after code changes:
npm run deploy:worker # Production (mcp.slima.ai)
npm run deploy:worker:preview # Staging
MCP Registry (Manual)
To publish/update the server listing on the MCP Registry:
mcp-publisher login github
mcp-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:
# Live logs from production Worker
wrangler 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
Install
Add slima to your client. Pick the one you use.
{
"servers": {
"slima-mcp": {
"type": "http",
"url": "https://mcp.slima.ai/mcp"
}
}
}Add to `.vscode/mcp.json` in your workspace.
claude mcp add slima-mcp -- npx -y slima-mcpcodex mcp add slima-mcp -- npx -y slima-mcpamp mcp add slima-mcp -- npx -y slima-mcp{
"mcpServers": {
"slima-mcp": {
"command": "npx",
"args": [
"-y",
"slima-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"slima-mcp": {
"command": "npx",
"args": [
"-y",
"slima-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
{
"mcpServers": {
"slima-mcp": {
"command": "npx",
"args": [
"-y",
"slima-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"slima-mcp": {
"command": "npx",
"args": [
"-y",
"slima-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"slima-mcp": {
"command": "npx",
"args": [
"-y",
"slima-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"slima-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"slima-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"slima-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"slima-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y slima-mcpRun `goose configure`, choose **Add Extension ā Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance13/25
- Trust16/20
- Capability0/15
- Install experience15/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 129 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 18 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint ā no local install
Version history
| Versions | Published |
|---|---|
| 0.1.13Latest | Feb 26, 2026 |