slima-mcp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Slima Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,243 @@
1
+ # Slima MCP
2
+
3
+ [![npm version](https://badge.fury.io/js/slima-mcp.svg)](https://www.npmjs.com/package/slima-mcp)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ MCP (Model Context Protocol) Server for [Slima](https://slima.ai) - AI Writing IDE for Novel Authors.
7
+
8
+ Connect your Slima books to **any MCP-compatible AI tool** - one server, all platforms.
9
+
10
+ ## Supported Platforms
11
+
12
+ | Platform | Status | Notes |
13
+ |----------|--------|-------|
14
+ | Claude Desktop | ✅ | Native MCP support |
15
+ | ChatGPT Desktop | ✅ | Developer Mode (2025.10+) |
16
+ | Gemini CLI | ✅ | Native MCP support |
17
+ | Cursor | ✅ | Native MCP support |
18
+ | VS Code | ✅ | Via MCP extensions |
19
+
20
+ > MCP became the industry standard in December 2025 when Anthropic, OpenAI, and Block co-founded the Agentic AI Foundation under the Linux Foundation.
21
+
22
+ ## Features
23
+
24
+ ### Book Management
25
+ - List and view your books
26
+ - Get file/folder structure
27
+ - Track writing statistics
28
+
29
+ ### File Operations
30
+ - **Read** any file by path
31
+ - **Write** (replace) file content
32
+ - **Create** new files
33
+ - **Delete** files
34
+ - **Append** content to files
35
+ - **Search** across all files
36
+
37
+ ### AI Beta Reader
38
+ - Get feedback from virtual reader personas
39
+ - Analyze chapters with different reader perspectives
40
+
41
+ ## Quick Start
42
+
43
+ ### 1. Install
44
+
45
+ ```bash
46
+ npm install -g slima-mcp
47
+ ```
48
+
49
+ Or run directly with npx:
50
+
51
+ ```bash
52
+ npx slima-mcp
53
+ ```
54
+
55
+ ### 2. Get Your API Token
56
+
57
+ ```bash
58
+ slima-mcp auth
59
+ ```
60
+
61
+ This will open your browser to authenticate with Slima. Your token will be saved automatically.
62
+
63
+ **Or manually:**
64
+ 1. Go to [Slima Settings](https://app.slima.ai/settings/api-tokens)
65
+ 2. Click "Generate API Token"
66
+ 3. Copy the token
67
+
68
+ ### 3. Configure Your AI Tool
69
+
70
+ If you used `slima-mcp auth`, the token is saved automatically. Just add:
71
+
72
+ #### Claude Desktop
73
+
74
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
75
+
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "slima": {
80
+ "command": "npx",
81
+ "args": ["-y", "slima-mcp"]
82
+ }
83
+ }
84
+ }
85
+ ```
86
+
87
+ That's it! No environment variables needed.
88
+
89
+ #### Cursor
90
+
91
+ Add to Cursor's MCP configuration:
92
+
93
+ ```json
94
+ {
95
+ "mcpServers": {
96
+ "slima": {
97
+ "command": "npx",
98
+ "args": ["-y", "slima-mcp"]
99
+ }
100
+ }
101
+ }
102
+ ```
103
+
104
+ #### Gemini CLI
105
+
106
+ ```bash
107
+ gemini mcp add slima --command "npx -y slima-mcp"
108
+ ```
109
+
110
+ <details>
111
+ <summary>Alternative: Using environment variables</summary>
112
+
113
+ If you prefer to use environment variables instead of `slima-mcp auth`:
114
+
115
+ ```json
116
+ {
117
+ "mcpServers": {
118
+ "slima": {
119
+ "command": "npx",
120
+ "args": ["-y", "slima-mcp"],
121
+ "env": {
122
+ "SLIMA_API_TOKEN": "slima_your_token_here"
123
+ }
124
+ }
125
+ }
126
+ }
127
+ ```
128
+
129
+ Get your token from [Slima Settings](https://app.slima.ai/settings/api-tokens).
130
+
131
+ </details>
132
+
133
+ ### 4. Restart Your AI Tool
134
+
135
+ After saving the configuration, restart the application to load Slima MCP.
136
+
137
+ ## Available Tools
138
+
139
+ ### Book Management
140
+
141
+ | Tool | Description |
142
+ |------|-------------|
143
+ | `list_books` | List all books in your Slima library |
144
+ | `get_book` | Get details of a specific book |
145
+ | `get_book_structure` | Get the file/folder structure of a book |
146
+ | `get_writing_stats` | Get writing statistics for a book |
147
+
148
+ ### File Operations
149
+
150
+ | Tool | Description |
151
+ |------|-------------|
152
+ | `read_file` | Read content of any file by path |
153
+ | `write_file` | Replace entire content of a file |
154
+ | `create_file` | Create a new file in a book |
155
+ | `delete_file` | Delete a file from a book |
156
+ | `append_to_file` | Append content to end of a file |
157
+ | `search_content` | Search for text across all files |
158
+
159
+ ### AI Beta Reader
160
+
161
+ | Tool | Description |
162
+ |------|-------------|
163
+ | `list_personas` | List available beta reader personas |
164
+ | `analyze_chapter` | Get AI beta reader feedback on a chapter |
165
+
166
+ ## Usage Examples
167
+
168
+ Once configured, you can ask your AI:
169
+
170
+ **Book & Content:**
171
+ - "List my books in Slima"
172
+ - "Show me the structure of my novel"
173
+ - "Read chapter 3 of my book"
174
+ - "What are my writing stats?"
175
+
176
+ **File Operations:**
177
+ - "Read the character profile for my protagonist"
178
+ - "Create a new file called worldbuilding.md with notes about the magic system"
179
+ - "Search for all mentions of 'blue eyes' in my book"
180
+ - "Append this new paragraph to chapter 5"
181
+
182
+ **AI Feedback:**
183
+ - "Get feedback on chapter 5 from a young reader perspective"
184
+ - "Analyze my opening scene from a critic's perspective"
185
+
186
+ ## CLI Commands
187
+
188
+ ```bash
189
+ slima-mcp auth # Authenticate with browser (recommended)
190
+ slima-mcp status # Check authentication status
191
+ slima-mcp logout # Remove saved credentials
192
+ slima-mcp --help # Show help
193
+ slima-mcp --version # Show version
194
+ ```
195
+
196
+ Token is stored in `~/.slima/credentials.json` with secure permissions.
197
+
198
+ ## Environment Variables
199
+
200
+ | Variable | Required | Default | Description |
201
+ |----------|----------|---------|-------------|
202
+ | `SLIMA_API_TOKEN` | No* | - | Your Slima API token |
203
+ | `SLIMA_API_URL` | No | `https://api.slima.ai` | API endpoint (for development) |
204
+ | `DEBUG` | No | `false` | Enable debug logging |
205
+
206
+ *Not required if you used `slima-mcp auth`
207
+
208
+ ## Development
209
+
210
+ ```bash
211
+ # Clone the repository
212
+ git clone https://github.com/slima-ai/slima-mcp.git
213
+ cd slima-mcp
214
+
215
+ # Install dependencies
216
+ npm install
217
+
218
+ # Build
219
+ npm run build
220
+
221
+ # Run tests
222
+ npm test
223
+
224
+ # Run in development mode
225
+ npm run dev
226
+ ```
227
+
228
+ ## Security
229
+
230
+ - API tokens are stored locally and never shared
231
+ - All communication with Slima API uses HTTPS
232
+ - Tokens can be revoked anytime from Slima settings
233
+
234
+ ## License
235
+
236
+ MIT
237
+
238
+ ## Links
239
+
240
+ - [Slima Website](https://slima.ai)
241
+ - [Slima App](https://app.slima.ai)
242
+ - [MCP Documentation](https://modelcontextprotocol.io)
243
+ - [Report Issues](https://github.com/slima-ai/slima-mcp/issues)
@@ -0,0 +1,2 @@
1
+
2
+ export { }