Skip to main content
Glama
START_HERE.mdβ€’7.54 kB
# πŸŽ‰ Your BookStack MCP Server is Ready! ## What You Have Now A complete **Python MCP Server** that connects Cursor AI to your BookStack instance at **http://192.168.1.193:6875**. ``` β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚ Cursor β”‚ ◄─MCP──►│ Python Serverβ”‚ ◄─API──►│ BookStack β”‚ β”‚ AI β”‚ β”‚ (FastMCP) β”‚ β”‚ 192.168.1.193β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ ``` ## πŸ“ What Was Installed ``` /home/borjigin/dev/bookstack-mcp/ β”‚ β”œβ”€β”€ πŸ”§ Core Server β”‚ β”œβ”€β”€ server.py Main MCP server (10 tools) β”‚ β”œβ”€β”€ requirements.txt Python dependencies β”‚ └── venv/ Virtual environment (ready) β”‚ β”œβ”€β”€ πŸš€ Launch Scripts β”‚ β”œβ”€β”€ run_server.sh Start the server β”‚ β”œβ”€β”€ test_connection.py Test BookStack connection β”‚ β”œβ”€β”€ setup_env.sh Create .env file β”‚ └── setup.sh Full automated setup β”‚ β”œβ”€β”€ πŸ“ Configuration β”‚ β”œβ”€β”€ env.template Template for .env β”‚ β”œβ”€β”€ .env YOUR CREDENTIALS (create this!) β”‚ └── cursor-mcp-config.json Example Cursor config β”‚ └── πŸ“š Documentation β”œβ”€β”€ START_HERE.md ⭐ This file β”œβ”€β”€ NEXT_STEPS.txt Quick reference guide β”œβ”€β”€ QUICKSTART.md Fast 2-minute setup β”œβ”€β”€ README.md Complete manual β”œβ”€β”€ PROJECT_OVERVIEW.md Architecture details └── INSTALLATION_SUMMARY.md What was installed ``` ## 🎯 What to Do Next (2 Minutes) ### 1️⃣ Get API Token from BookStack Open http://192.168.1.193:6875 β†’ Login β†’ Profile β†’ API Tokens β†’ Create Token You'll get: - **Token ID**: `abc123xyz...` - **Token Secret**: `def456uvw...` ### 2️⃣ Configure Environment ```bash cd /home/borjigin/dev/bookstack-mcp ./setup_env.sh ``` Or manually: ```bash cp env.template .env nano .env # Add your token ID and secret ``` ### 3️⃣ Test Connection ```bash ./test_connection.py ``` Expected output: ``` βœ… BookStack is reachable βœ… API authentication successful! βœ… Found X books in your BookStack βœ… All tests passed! ``` ### 4️⃣ Add to Cursor **Method 1: Using Settings File** Edit `~/.config/cursor/mcp_settings.json`: ```json { "mcpServers": { "bookstack": { "command": "/home/borjigin/dev/bookstack-mcp/run_server.sh" } } } ``` **Method 2: Using Cursor UI** 1. Open Cursor β†’ Settings (Ctrl+,) 2. Search "MCP" 3. Add Server: - Name: `bookstack` - Command: `/home/borjigin/dev/bookstack-mcp/run_server.sh` **Restart Cursor** after configuration! ### 5️⃣ Test in Cursor Open a new chat and type: ``` "List all books in my BookStack" ``` If you see BookStack data, **you're done!** πŸŽ‰ ## πŸ›  Available Tools (10 Total) Once configured, you can use these through natural language in Cursor: ### πŸ“– Discovery & Reading - `bookstack_list_content` - List books, chapters, pages - `bookstack_search` - Search all content - `bookstack_get_page` - Read page content ### ✍️ Creating Content - `bookstack_create_book` - Create new books - `bookstack_create_chapter` - Create chapters - `bookstack_create_page` - Create pages ### πŸ”§ Editing & Management - `bookstack_update_page` - Update page content - `bookstack_delete_page` - Delete pages ## πŸ’¬ Example Conversations with Cursor Once set up, talk naturally: **Browsing:** - "Show me all books" - "List pages in book 3" - "Search for 'Docker' documentation" - "Find pages about authentication" **Creating:** - "Create a book called 'DevOps Guide'" - "Add a chapter 'Getting Started' to book 5" - "Create a page about Kubernetes in chapter 2 with markdown content..." **Reading:** - "Show me page 42" - "What's in the API documentation page?" - "Read the content of book 3" **Updating:** - "Update page 15's title to 'New Title'" - "Modify page 20 with this new content..." ## πŸ“Š System Requirements βœ… **Python**: 3.12 (installed in venv) βœ… **FastMCP**: 2.13.1 (installed) βœ… **httpx**: 0.28.1 (installed) βœ… **python-dotenv**: 1.2.1 (installed) βœ… **BookStack**: Running at http://192.168.1.193:6875 ⚠️ **API Token**: Need to create (Step 1 above) ⚠️ **.env file**: Need to configure (Step 2 above) ## πŸ”§ Quick Commands Reference ```bash # Navigate to project cd /home/borjigin/dev/bookstack-mcp # Setup environment ./setup_env.sh # Test connection ./test_connection.py # Run server manually (for debugging) ./run_server.sh # Or with venv source venv/bin/activate python server.py # Check dependencies pip list | grep -E "fastmcp|httpx|dotenv" # Verify BookStack is reachable curl http://192.168.1.193:6875 ``` ## πŸ› Troubleshooting ### "Cannot connect to BookStack" ```bash # Test connectivity curl http://192.168.1.193:6875 # If this fails, check: # - Is BookStack container running? # - Is it accessible on port 6875? docker ps | grep bookstack ``` ### "API authentication failed" ```bash # Test API manually curl -H "Authorization: Token YOUR_ID:YOUR_SECRET" \ http://192.168.1.193:6875/api/books # If this fails: # - Check token ID and secret are correct # - Verify token has permissions # - Try creating a new token ``` ### "Permission denied" on scripts ```bash chmod +x *.sh *.py ``` ### "Module not found" errors ```bash source venv/bin/activate pip install -r requirements.txt ``` ### Cursor doesn't show tools 1. Run `./test_connection.py` - must pass all tests 2. Check Cursor MCP settings are correct 3. Look at Cursor logs: Help β†’ Toggle Developer Tools β†’ Console 4. Restart Cursor **completely** (close all windows) ## πŸ“š Documentation Guide | File | Purpose | When to Read | |------|---------|--------------| | `START_HERE.md` | This file | Right now! | | `NEXT_STEPS.txt` | Quick reference | For copy/paste commands | | `QUICKSTART.md` | 2-minute setup | When you want to start quickly | | `README.md` | Complete manual | For detailed information | | `PROJECT_OVERVIEW.md` | Architecture | Understanding how it works | | `INSTALLATION_SUMMARY.md` | What's installed | Technical details | ## πŸŽ“ Learning More ### About BookStack API https://www.bookstackapp.com/docs/api/ ### About MCP (Model Context Protocol) https://modelcontextprotocol.io/ ### About FastMCP https://gofastmcp.com/ ### About Cursor MCP Integration https://docs.cursor.com/context/model-context-protocol ## ✨ What Makes This Special βœ… **Minimal** - Only essential dependencies βœ… **Secure** - Credentials stay local in .env βœ… **Fast** - Direct API access, no middleware βœ… **Natural** - Talk to Cursor about your docs naturally βœ… **Isolated** - Virtual environment prevents conflicts βœ… **Complete** - Full CRUD operations on BookStack ## πŸš€ Ready to Start? Run these three commands: ```bash cd /home/borjigin/dev/bookstack-mcp ./setup_env.sh ./test_connection.py ``` Then configure Cursor and you're done! --- **Need help?** Read `NEXT_STEPS.txt` or run `./test_connection.py` for diagnostics. **Questions?** Check `README.md` for complete documentation. **Want details?** See `PROJECT_OVERVIEW.md` for architecture. πŸŽ‰ **Happy documenting with Cursor + BookStack!**

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lborjigi/bookstack-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server