TinyBrain
Security-focused LLM memory storage with intelligence gathering, reverse engineering, and MITRE ATT&CK integration.
TinyBrain is a Model Context Protocol (MCP) server designed for security professionals, penetration testers, and AI assistants working on offensive security tasks. It provides intelligent memory management, pattern recognition, and comprehensive intelligence gathering capabilities.
๐ Quick Start
# Install from source (recommended)
go install github.com/rainmana/tinybrain/cmd/server@latest
# Start the server
tinybrain serve --dir ~/.tinybrain
# Access admin dashboard
open http://127.0.0.1:8090/_/
# Or use Docker
docker build -t tinybrain .
docker run -p 8090:8090 tinybrain
โจ Key Features
- ๐ง Intelligence Gathering: OSINT, HUMINT, SIGINT, GEOINT, MASINT, TECHINT, FININT, CYBINT
- ๐ Reverse Engineering: Malware analysis, binary analysis, vulnerability research, protocol analysis
- ๐ฏ MITRE ATT&CK: Complete framework integration with tactics, techniques, and procedures
- ๐ก๏ธ Security Patterns: CWE, OWASP, and multi-language vulnerability patterns
- ๐ Memory Management: 30+ memory categories for comprehensive security data organization
- ๐ MCP Protocol: Seamless integration with AI assistants and LLMs
- ๐ Pattern Recognition: Advanced insight mapping and correlation analysis
- ๐ฏ Threat Intelligence: Threat actor profiling, attack campaign tracking, IOC management
- ๐ PocketBase Integration: Single binary with admin dashboard, REST API, and real-time capabilities
- ๐ Comprehensive Testing: 17/17 tests passing with full functionality verification
๐ Documentation
๐ Complete Documentation - Comprehensive documentation index
Quick Access:
- Getting Started - Installation and basic usage
- Core Features - Memory management, sessions, and search
- Advanced Features - Advanced memory management and pattern recognition
- Intelligence & Reconnaissance - OSINT, HUMINT, SIGINT, and more
- Reverse Engineering - Malware analysis and vulnerability research
- Security Patterns - CWE, OWASP, and multi-language patterns
- AI Integration - AI assistant integration and development setup
- Authorization - Access control and authorization patterns
- Integration - General integration capabilities and tools
- API Reference - Complete API documentation
๐ ๏ธ Installation
From Source
go install github.com/rainmana/tinybrain/cmd/server@latest
Docker
docker pull rainmana/tinybrain:latest
Pre-built Binaries
Download from Releases
๐ก Usage
Basic Example
// Create a new intelligence session
session := &Session{
Name: "OSINT Intelligence Gathering",
TaskType: "intelligence_analysis",
IntelligenceType: "osint",
Classification: "unclassified",
ThreatLevel: "medium",
}
// Store intelligence findings
finding := &IntelligenceFinding{
Title: "Social Media Intelligence",
IntelligenceType: "osint",
ThreatLevel: "medium",
MITRETactic: "TA0001",
MITRETechnique: "T1591",
KillChainPhase: "reconnaissance",
}
MCP Integration
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "mcp_tinybrain-mcp-server_create_session",
"arguments": {
"name": "Security Assessment",
"task_type": "penetration_test",
"intelligence_type": "osint"
}
}
}
๐๏ธ Architecture
TinyBrain is built with:
- Go - High-performance backend
- PocketBase - Single binary with embedded SQLite, REST API, and real-time capabilities
- MCP Protocol - LLM integration standard with 40+ tools
- MITRE ATT&CK - Security framework integration
PocketBase Integration Benefits
- Single Binary Deployment: No external dependencies, works anywhere Go runs
- Embedded Database: SQLite database embedded in the binary
- Web Admin Interface: Built-in dashboard at http://127.0.0.1:8090/_/ for data management
- REST API: Full REST API at http://127.0.0.1:8090/api/ for external integrations
- Real-time Capabilities: Server-sent events for live updates
- Zero Configuration: Works out of the box with sensible defaults
- Data Persistence: All data automatically persisted across restarts
๐งช Testing
# Run all tests
make test
# Run with coverage
make test-coverage
# Run specific test suite
go test -v ./internal/repository
๐ Performance
- Memory Operations: ~1000 entries/second
- Search Operations: ~100 searches/second
- Intelligence Analysis: ~100 analyses/second
- Database Size: ~1MB per 10,000 memory entries
๐ค Contributing
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
๐ License
MIT License - see LICENSE file for details.
๐ Acknowledgments
- MITRE ATT&CK for the security framework
- Model Context Protocol for LLM integration
- OWASP for security patterns
- CWE for vulnerability classification
๐ Support
- ๐ Documentation
- ๐ Issue Tracker
- ๐ฌ Discussions
TinyBrain - Empowering security professionals with intelligent memory management and comprehensive intelligence gathering capabilities.