Prototype Model Context Protocol (MCP) note-taking system with intelligent auto-tagging powered by local LLMs. Full MCP specification compliance, JSON-RPC 2.0 transport, and robust error handling with graceful fallbacks.
A sophisticated Model Context Protocol (MCP) compliant note-taking system with intelligent automatic tagging capabilities powered by local Large Language Models via Ollama.
- π·οΈ Intelligent Auto-Tagging: Uses LLM analysis to automatically categorize notes
- π Full MCP Compliance: Implements complete MCP specification for seamless AI integration
- π Advanced Search: Full-text search across titles, content, and tags
- ποΈ Robust Data Management: JSON-based persistence with atomic operations
- π‘οΈ Error Resilience: Multiple fallback mechanisms ensure reliability
- π― Tag Categories: Predefined taxonomy: Greeting, Coding, Education, Finance
- π€ Local AI: Privacy-focused with local Ollama integration
graph TD
A[Smart Tagging Bridge] --> B[Ollama LLM]
A --> C[Note Storage]
A --> D[MCP Protocol]
D --> E[MCP Server]
D --> F[MCP Client]
G[CLI] --> A
H[Auto-Tagging Engine] --> B
H --> I[Keyword Fallback]
- Python 3.8+
- Ollama installed and running
- Compatible LLM model (recommended:
qwen2.5:7b
)
-
Clone the repository
git clone https://github.com/yourusername/mcp-smart-notes.git cd mcp-smart-notes
-
Install dependencies
pip install -r requirements.txt
-
Start Ollama (in another terminal)
ollama serve
-
Pull a compatible model
ollama pull qwen2.5:7b
python smart_tagging_bridge.py
You: Create a note about my Python web development project
π§ Using tool: create_note
π·οΈ Auto-assigned tags: ['Coding']
β
Created note 'Python Web Development Project' with ID: 20250629_223459_661 with tags: ['Coding']
MCP-Testing/
βββ π smart_tagging_bridge.py # Main system with intelligent auto-tagging
βββ π note_server.py # Full MCP server implementation
βββ π ollama_mcp_client.py # MCP client for Ollama integration
βββ π simple_note_server.py # Minimal MCP server for testing
βββ π simple_bridge.py # Direct integration layer
βββ π test_auto_tagging.py # Comprehensive test suite
βββ π requirements.txt # Python dependencies
βββ π README.md # This file
βββ π .gitignore # Git ignore patterns
βββ π Documentation/ # MCP protocol documentation
Tool | Description | Usage |
---|---|---|
create_note |
Create notes with auto-tagging | Title, content, optional manual tags |
search_notes |
Full-text search | Query string matches title/content/tags |
search_by_tag |
Tag-specific search | Find all notes with specific tag |
list_notes |
List all notes | Shows titles, IDs, and auto-tag indicators |
update_note |
Modify existing notes | Update title, content, or tags |
delete_note |
Remove notes | Permanent deletion by note ID |
- π€ Greeting: Welcomes, introductions, social interactions
- π» Coding: Programming, development, technical content
- π Education: Learning, courses, tutorials, studies
- π° Finance: Budget, money, investments, financial planning
- β JSON-RPC 2.0 over stdio transport
- β Tool registration with parameter schemas
- β Resource discovery and URI handling
- β Error handling and status codes
- β Session management and lifecycle
- Ollama Offline: Graceful degradation with helpful messages
- LLM Failures: Automatic keyword-based fallback tagging
- File Corruption: Silent skip of corrupted JSON files
- Network Issues: Retry mechanisms with exponential backoff
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
For detailed MCP protocol information, see:
- Model Context Protocol Specification
- Documentation for Agent/ - Complete MCP documentation
This project is licensed under the MIT License - see the LICENSE file for details.
- Model Context Protocol team for the excellent specification
- Ollama for local LLM capabilities
- Anthropic for Claude's assistance in development
- Large note collections may experience slower search performance
β Star this repository if you find it useful! β