QUICKSTART.md•2.59 kB
# Quick Start Guide
## 1. Install Dependencies
```bash
cd /home/borjigin/dev/bookstack-mcp
pip install -r requirements.txt
```
## 2. Get Your BookStack API Token
1. Open http://192.168.1.193:6875 in your browser
2. Log in to BookStack
3. Click your profile picture → **Edit Profile**
4. Go to the **API Tokens** tab
5. Click **Create Token**
6. Give it a name (e.g., "Cursor MCP")
7. Copy both the **Token ID** and **Token Secret**
## 3. Create Configuration File
```bash
cd /home/borjigin/dev/bookstack-mcp
cp env.template .env
nano .env
```
Paste your actual token values:
```
BS_URL=http://192.168.1.193:6875
BS_TOKEN_ID=abc123xyz...
BS_TOKEN_SECRET=def456uvw...
```
Save and exit (Ctrl+X, then Y, then Enter).
## 4. Test the Server
```bash
python server.py
```
If it starts without errors, press Ctrl+C to stop it.
## 5. Configure Cursor
### Option A: Using cursor settings file
Edit `~/.cursor/config.json` (or create it if it doesn't exist):
```json
{
"mcpServers": {
"bookstack": {
"command": "/home/borjigin/dev/bookstack-mcp/run_server.sh"
}
}
}
```
### Option B: Using Cursor Settings UI
1. Open Cursor
2. Press Cmd/Ctrl + , to open Settings
3. Search for "MCP" or navigate to **Features** → **Model Context Protocol**
4. Click **Add Server**
5. Enter:
- **Name**: `bookstack`
- **Command**: `python`
- **Args**: `/home/borjigin/dev/bookstack-mcp/server.py`
- **Env** (click Add for each):
- `BS_URL`: `http://192.168.1.193:6875`
- `BS_TOKEN_ID`: (your token ID)
- `BS_TOKEN_SECRET`: (your token secret)
6. Click **Save**
## 6. Restart Cursor
Close and reopen Cursor completely.
## 7. Test in Cursor
Open a new chat in Cursor and try:
- "List all books in my BookStack"
- "Search for 'docker' in BookStack"
- "Create a new book called 'Test Book'"
Cursor should now be able to interact with your BookStack instance!
## Troubleshooting
**Server won't start:**
```bash
# Check Python version (need 3.8+)
python --version
# Reinstall dependencies
pip install --upgrade -r requirements.txt
```
**Can't connect to BookStack:**
```bash
# Test connectivity
curl http://192.168.1.193:6875
# Test API access
curl -H "Authorization: Token YOUR_TOKEN_ID:YOUR_TOKEN_SECRET" \
http://192.168.1.193:6875/api/books
```
**Permission errors:**
- Make sure your API token has sufficient permissions
- Try creating a new token with admin privileges
**Cursor not showing MCP tools:**
- Check Cursor logs: Help → Toggle Developer Tools → Console
- Verify the server path is correct
- Try restarting Cursor completely