A complete Model Context Protocol (MCP) implementation with local LLM integration using .NET, MCPSharp, and Ollama. This system provides a conversational AI-powered task management application with a modern Blazor WASM UI that runs entirely locally.
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
โ Blazor WASM โ โ Ollama LLM โ โ Task Service โ
โ (Frontend) โโโโโบโ (Container) โโโโโบโ (Backend) โ
โ Port: 8080 โ โ Port: 11434 โ โ Port: 5000 โ
โ MudBlazor UI โ โ Local Models โ โ REST API โ
โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโ
- Docker Desktop installed and running
- Docker Compose (usually included with Docker Desktop)
- 8GB+ RAM (for LLM models)
- 10GB+ free disk space (for models and containers)
Windows:
start.batmacOS/Linux:
./start.shManual:
docker-compose up --build -d- ๐ Blazor UI: http://localhost:8080
- Dashboard: Task statistics and overview
- Task Management: Create, edit, delete, and filter tasks
- AI Chat: Natural language task management with Ollama LLM
- Dark Mode: Toggle between light and dark themes (dark mode default)
- ๐ง Task Service API: http://localhost:5001
- ๐ค Ollama API: http://localhost:11434
- Model Download: First run downloads the LLM model (~4GB)
- Setup Time: 5-10 minutes depending on internet speed
- Monitor Progress:
docker-compose logs -f ollama
- .NET 9.0 SDK
- Ollama (for local LLM models)
- Git
macOS:
brew install ollamaLinux:
curl -fsSL https://ollama.ai/install.sh | shWindows: Download from ollama.ai
# Start Ollama service
ollama serve
# In another terminal, pull a model
ollama pull llama2:7bgit clone <your-repo>
cd McpServer
dotnet restore
dotnet buildCreate a .env file based on env.example:
# Ollama model name (e.g., llama2:7b, mistral:7b, codellama:7b)
MCP_OLLAMA_MODEL=llama2:7b
# Path to your MCP server executable
MCP_SERVER_PATH=/path/to/McpServer.Server/bin/Debug/net9.0/McpServer.Server.exeexport MCP_OLLAMA_MODEL="llama2:7b"
export MCP_SERVER_PATH="/path/to/McpServer.Server/bin/Debug/net9.0/McpServer.Server.exe"# Start the MCP server
cd McpServer.Server
dotnet run
# In another terminal, run the client
cd McpServer.Client
dotnet run- User Input: Natural language task request via Blazor UI or API
- LLM Processing: Ollama receives the request and responds with structured JSON
- Task Operations: System performs CRUD operations on tasks
- Response: Results displayed in the modern UI
- ๐ Dashboard: Real-time task statistics and overview
- ๐ Task Management: Full CRUD operations with filtering and sorting
- ๐ฌ AI Chat: Natural language interface for task management
- ๐ Dark Mode: Beautiful dark theme (default) with light mode toggle
- ๐ฑ Responsive: Works on desktop, tablet, and mobile devices
User: "Add a task to buy groceries tomorrow"
LLM: { "operation": "create", "task": { "title": "Buy groceries", "dueDate": "tomorrow" } }
Result: Task created successfully and displayed in UI
User: "Show me all tasks"
LLM: { "operation": "read", "filter": "all" }
Result: Tasks displayed in table with filtering options
User: "Mark the grocery task as done"
LLM: { "operation": "update", "taskId": "123", "task": { "status": "completed" } }
Result: Task updated and UI refreshed
McpServer/
โโโ McpServer.LLM/ # LLM integration using Ollama HTTP API
โโโ McpServer.Client/ # Task management client and API
โโโ McpServer.Server/ # MCP server implementation
โโโ McpServer.Client.UI.Client/ # Blazor WASM UI with MudBlazor
โ โโโ Pages/ # Application pages (Dashboard, Tasks, Chat)
โ โโโ Layout/ # Main layout and navigation
โ โโโ Components/ # Reusable UI components
โ โโโ Models/ # Data models and DTOs
โ โโโ wwwroot/ # Static assets and configuration
โโโ docker-compose.yml # Container orchestration
โโโ Dockerfile # Task service container
โโโ start.sh # Linux/macOS startup script
โโโ start.bat # Windows startup script
โโโ README.md # This file
# Start services
docker-compose up -d
# View logs
docker-compose logs -f
# Stop services
docker-compose down
# Restart services
docker-compose restart
# Rebuild and start
docker-compose up --build -d# View Ollama logs
docker-compose logs -f ollama
# View task service logs
docker-compose logs -f task-service
# View UI logs
docker-compose logs -f blazor-ui- Docker not running: Start Docker Desktop
- Port conflicts: Check if ports 8080, 5000, or 11434 are in use
- Insufficient memory: Increase Docker memory limit (8GB+ recommended)
- Model not found:
docker-compose logs ollamato check download progress - Connection refused: Wait for Ollama to fully start
- Slow responses: First run loads models into memory
- UI not loading: Check if Blazor container is running
- API errors: Check task-service logs
- LLM errors: Verify Ollama is healthy
- Dark mode not working: Clear browser cache and refresh
- Chat not responding: Check if Ollama model is loaded and responding
# Pull different models
docker exec mcp-ollama ollama pull mistral:7b
docker exec mcp-ollama ollama pull codellama:7b
# Update environment variable
export MCP_OLLAMA_MODEL="mistral:7b"
docker-compose restart task-service- No cloud dependencies: Everything runs locally
- Data privacy: Your tasks never leave your machine
- Offline capable: Works without internet after setup
- Fast responses: Local LLM inference
- No API limits: Unlimited usage
- Customizable: Use any Ollama model
- Easy setup: One command with Docker
- Cross-platform: Works on Windows, Mac, Linux
- Extensible: Easy to add new features
- Beautiful interface: Material Design with MudBlazor
- Dark mode: Easy on the eyes with toggle option
- Responsive design: Works on all device sizes
- Real-time updates: Instant feedback and auto-scrolling chat
- More LLM Models: Support for different model types
- Advanced Task Features: Recurring tasks, reminders, categories
- User Authentication: Multi-user support
- Mobile App: React Native or Flutter companion
- API Extensions: Webhook support, external integrations
- Task Automation: .NET Orleans integration for automated task processing
- Enhanced UI: More themes, customizations, and accessibility features
- Data Persistence: Database integration (SQLite, PostgreSQL)
- Export/Import: Task backup and sharing capabilities
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository
- Create a feature branch
- Make your changes
- Test with Docker
- Submit a pull request
Happy task managing with AI! ๐ฏ