An MCP (Model Context Protocol) server that enables AI assistants to interact with TheBrain's knowledge management system. This server provides comprehensive access to TheBrain's API, focusing on natural language interaction with TheBrain's powerful knowledge management capabilities. MCP (Model Context Protocol) is a standard that lets AI assistants like Claude connect to external tools and servic
Add this skill
npx mdskills install redmorestudio/thebrain-mcpComprehensive TheBrain integration with 25+ tools and excellent documentation, but visual styling features are broken
1# TheBrain MCP Server23An MCP (Model Context Protocol) server that enables AI assistants to interact with TheBrain's knowledge management system. This server provides comprehensive access to TheBrain's API, focusing on natural language interaction with TheBrain's powerful knowledge management capabilities.45## 🔧 What's an MCP Server?67**MCP (Model Context Protocol)** is a standard that lets AI assistants like Claude connect to external tools and services. Think of it as a translator between natural language and software APIs.89### How It Works:10```11You → Claude → MCP Server → TheBrain API → Your Brain12```13141. **You say**: "Create a project with three phases"152. **Claude understands** what you want to accomplish163. **MCP Server translates** this into specific TheBrain API calls174. **TheBrain API** creates the thoughts and connections185. **Your Brain** updates with the new structure1920The magic is that **you don't need to know any technical details** - just describe what you want in plain English!2122## 🚀 What Actually Works2324### ✅ **Core Functionality (Working)**25- **Content Management**: Create, update, delete thoughts and notes26- **File Attachments**: Upload images, PDFs, documents to thoughts27- **Web References**: URL attachments with auto-title extraction28- **Rich Notes**: Full Markdown support with embedded content29- **Relationship Mapping**: Connect thoughts with meaningful relationships30- **Search**: Full-text search across thoughts, notes, and attachments31- **Brain Management**: Switch between multiple brains seamlessly32- **Natural Language Interface**: Describe what you want, Claude handles the details3334## ❌ Current Issues & Limitations3536### 🚨 **Major Visual Styling Problems**37**The biggest limitation**: Visual properties don't actually apply despite API success responses.3839- **❌ Thought colors**: API accepts colors but they don't appear in TheBrain40- **❌ Link colors**: Similar issue - accepted but not applied41- **❌ Link thickness**: API reports success but thickness doesn't change42- **❌ Visual formatting**: All visual styling features are currently non-functional4344### 🐛 **Other Known Issues**45- **Intermittent connection problems**: "Field required" errors after successful operations46- **Long notes limitations**: Issues with very long markdown content (keep under 10k characters)47- **File path sensitivity**: Requires absolute file paths; relative paths can fail48- **Connection timing**: MCP initialization race condition causing sporadic failures49- **Memory constraints**: Large file attachments can cause timeouts50- **Search limitations**: Complex queries sometimes return incomplete results5152### 📋 **API Dependencies & Constraints**53- **Single-user operations**: No real-time collaboration features54- **No bulk operations**: Can't import/export large datasets efficiently55- **API connectivity required**: No offline mode available56- **TheBrain API limitations**: Bound by existing API capabilities57- **Authentication required**: Must have valid TheBrain API key5859## 🛠 **Current Workarounds**6061Until visual styling is fixed, use these alternatives:62- **Emojis for distinction**: 🟢🟡🔴⚪🔵 instead of colors63- **Descriptive names**: "🔴 Urgent Task" instead of colored thoughts64- **Rich markdown notes**: Use formatting within notes for visual organization65- **Hierarchical structure**: Rely on parent/child relationships for organization6667## Installation68691. Clone this repository:70```bash71git clone https://github.com/redmorestudio/thebrain-mcp.git72cd thebrain-mcp73```74752. Install dependencies:76```bash77npm install78```79803. Create a `.env` file with your API key:81```bash82THEBRAIN_API_KEY=your_api_key_here83THEBRAIN_DEFAULT_BRAIN_ID=optional_default_brain_id84```8586## Configuration8788### For Claude Desktop8990Add to your Claude Desktop configuration:9192```json93{94 "mcpServers": {95 "thebrain": {96 "command": "node",97 "args": ["/absolute/path/to/thebrain-mcp/index.js"],98 "env": {99 "THEBRAIN_API_KEY": "your_api_key_here"100 }101 }102 }103}104```105106**⚠️ Important**: Use absolute file paths in the configuration and for file attachments.107108## Debugging & Troubleshooting109110### Common Issues & Solutions111112**"Field required" errors**:113- Restart Claude Desktop114- Verify `.env` file has correct API key115- Always set active brain first: "Set my active brain to [name]"116117**File upload failures**:118- Use absolute file paths: `/Users/username/Documents/file.pdf`119- Check file permissions and existence120- Keep file sizes reasonable (< 50MB)121122**Long note problems**:123- Keep notes under 10,000 characters124- Break large content into multiple thoughts125- Use attachments for lengthy documents126127**Debug mode**:128```bash129VERBOSE=true node index.js130```131132## Available Tools (25+ Functions)133134### Brain Management135- `list_brains` - List all available brains136- `get_brain` - Get brain details137- `set_active_brain` - Set the active brain for operations138- `get_brain_stats` - Get comprehensive brain statistics139140### Thought Operations141- `create_thought` - Create thoughts (visual properties don't work)142- `get_thought` - Retrieve thought details143- `update_thought` - Update thought properties144- `delete_thought` - Delete a thought145- `search_thoughts` - Search across the brain146- `get_thought_graph` - Get thought with all connections147- `get_types` - List all thought types148- `get_tags` - List all tags149150### Link Operations151- `create_link` - Create links between thoughts (styling doesn't work)152- `update_link` - Modify link properties153- `get_link` - Get link details154- `delete_link` - Remove a link155156### Attachment Operations157- `add_file_attachment` - Attach files/images to thoughts ✅158- `add_url_attachment` - Attach web URLs ✅159- `get_attachment` - Get attachment metadata160- `get_attachment_content` - Download attachment content161- `delete_attachment` - Remove attachments162- `list_attachments` - List thought attachments163164### Note Operations165- `get_note` - Retrieve notes in markdown/html/text ✅166- `create_or_update_note` - Create or update notes ✅167- `append_to_note` - Append content to existing notes ✅168169### Advanced Features170- `get_modifications` - View brain modification history171172## Usage Examples (What Actually Works)173174### Project Organization175```176You: "Create a project called 'Kitchen Renovation'"177Claude: Creates central project thought178179You: "Add phases for planning, demolition, and installation"180Claude: Creates connected sub-thoughts for each phase181182You: "Attach my contractor quotes to the planning phase"183Claude: Uploads files to the planning thought184185You: "Add a detailed note about the timeline to the project"186Claude: Creates rich markdown note with your timeline187```188189### Research & Knowledge Management190```191You: "Create a research topic about sustainable energy"192Claude: Sets up main research thought193194You: "Add sub-topics for solar, wind, and hydro power"195Claude: Creates organized thought hierarchy196197You: "Attach relevant papers and web articles"198Claude: Adds file and URL attachments199200You: "Search for everything related to efficiency"201Claude: Finds all relevant thoughts and content202```203204## 🔮 Roadmap & Future Development205206### **Immediate Priorities (v1.2.0)**207- **🚨 Fix visual styling**: Investigate why colors/thickness don't apply208- **🔧 Connection stability**: Resolve MCP timing/race condition issues209- **📝 Long notes support**: Better handling of extensive markdown content210- **🛡️ Error handling**: More graceful failures and recovery211212### **Future Enhancements**213- **Bulk operations** for large-scale organization214- **Enhanced templates** for common workflows215- **Performance optimizations** for complex brains216- **Offline capabilities** and caching217218## Technical Architecture219220### What Makes This Server Special221- **Natural language interface**: No technical knowledge required222- **Complete API coverage**: 25+ tools spanning all TheBrain operations223- **Robust error handling**: Graceful failures and clear error messages224- **Modular design**: Clean, maintainable code architecture225- **Production ready**: Proper logging, testing, and documentation226227### Current Status228- **Version**: 1.1.0 (June 2025)229- **Core functionality**: ✅ Complete and working230- **Visual properties**: ❌ Major issues need investigation231- **Stability**: 🟡 Generally stable with intermittent connection issues232233## Contributing234235Contributions are welcome! Areas where help is especially needed:236237- **Visual styling investigation**: Why don't colors/thickness apply?238- **Connection stability**: Debugging MCP race conditions239- **Performance optimization**: Large brain handling240- **Documentation**: More usage examples and tutorials241242Please feel free to submit issues or pull requests.243244## License245246MIT License - see [LICENSE](LICENSE) file for details.247248## Support249250- **TheBrain API Documentation**: https://api.bra.in251- **Issues & Bug Reports**: https://github.com/redmorestudio/thebrain-mcp/issues252- **Questions**: Open a GitHub discussion253254---255256**⚠️ Current Recommendation**: Use this server for **content management and organization** with natural language interaction. Don't rely on visual styling features until they're fixed. The core functionality is solid and very useful for managing TheBrain content through conversation!257
Full transparency — inspect the skill content before installing.