A sophisticated microservices-based desktop pet application that integrates AI to enable intelligent interactions. Built with ASP.NET Core, .NET Aspire framework, and Model Context Protocol (MCP) integration, PCTama uses local LLMs to process streaming text input and provides interactive visual output via Avalonia UI.
- โ Aspire-based microservices - Cloud-native architecture with service discovery
- โ MCP integration ready - Framework for Model Context Protocol implementation
- โ Streaming text input - Real-time text processing from multiple sources
- โ Desktop pet display - Avalonia UI-based output with actions and animations
- โ Extensible design - Easy to add new input/output MCPs
- โ Cross-platform builds - CMake support for Windows, macOS, and Linux
# Clone and enter directory
git clone https://github.com/yourusername/PCTama.git
cd PCTama
# Build and run (macOS/Linux)
./build.sh run
# Or on Windows
build.bat runThen open http://localhost:15000 to access the Aspire Dashboard (copy the token from terminal output).
PCTama is built as a collection of ASP.NET microservices orchestrated through .NET Aspire with built-in observability:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ PCTama.AppHost โ
โ (Aspire Orchestrator) โ
โ Dashboard: http://localhost:15000 โ
โโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
โ Text MCP โ โ Controller โ โ Actor MCP โ
โ (Port 5001) โโโ>โ (Port 5003) โโโ>โ (Port 5000) โ
โ โ โ โ โ โ
โ โข OBS LocalVoice โ โข MCP SDK โ โ โข Avalonia UI โ
โ โข Text Stream โ โข Local LLM โ โ โข Actions โ
โ โข Buffering โ โข Orchestrationโ โ โข Display โ
โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโ
Microservices:
-
PCTama.Controller (port 5000) - Central orchestration
- MCP SDK client integration
- Local LLM communication
- Service routing and health management
-
PCTama.TextMCP (port 5001) - Streaming text input
- OBS LocalVoice integration
- Thread-safe text buffering
- Multiple input source support
-
PCTama.ActorMCP (port 5002) - Desktop pet display
- Avalonia UI-based window management
- Action queue processing
- Animation support
-
PCTama.AppHost - Aspire orchestrator
- Service discovery and registration
- OpenTelemetry metrics & dashboard
- Configuration management
- Aspire Framework - Complete microservices orchestration with service discovery
- MCP SDK Ready - Framework for Model Context Protocol with configuration support
- Streaming Text - OBS LocalVoice integration with thread-safe buffering
- Action Queue - Background processing with multiple action types
- OpenTelemetry - Built-in observability dashboard
- Health Checks - Service monitoring and status endpoints
- Extensible Config - Add new MCPs and input sources easily
- Avalonia UI Display - Cross-platform UI framework
- REST APIs - Comprehensive endpoints for all services
- Full Testing - xUnit suite with unit & integration tests
- CI/CD - GitHub Actions multi-platform builds
- CMake - Cross-platform build system (Windows, macOS, Linux)
- .NET 8.0 SDK or later (download)
- CMake 3.20 or later
- Git for version control
- Windows 10 Build 19041+ (for ActorMCP/Avalonia UI only)
- Ollama or local LLM for AI responses
- OBS Studio with LocalVoice plugin for voice input
- Visual Studio 2022 or VS Code
Windows:
winget install Microsoft.DotNet.SDK.8
winget install Kitware.CMakemacOS:
brew install dotnet-sdk cmake
brew install ollama # Optional: for AILinux (Ubuntu/Debian):
wget https://dot.net/v1/dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --version 8.0
sudo apt-get install cmake# macOS/Linux
./build.sh build # Build
./build.sh run # Run
./build.sh test # Test
./build.sh clean # Clean
# Windows
build.bat build
build.bat run
build.bat test
build.bat clean# Restore and build
dotnet restore PCTama.sln
dotnet build PCTama.sln --configuration Release
# Run tests
dotnet test tests/PCTama.Tests/PCTama.Tests.csproj
# Run specific service
cd src/PCTama.AppHost
dotnet runcmake -B build
cmake --build build
cmake --build build --target test_all- Open
PCTama.slnin Visual Studio 2022 - Set
PCTama.AppHostas startup project - Press F5 to debug (Aspire Dashboard opens automatically)
# All services with Aspire Dashboard
./build.sh run # macOS/Linux
build.bat run # Windows
# Or manually
cd src/PCTama.AppHost
dotnet runYou'll see output with a dashboard token:
Login to the dashboard at http://localhost:15000/login?t=YOUR_TOKEN
Copy and paste the full URL into your browser.
Once running, you have:
- Dashboard: http://localhost:15000 (monitoring & observability)
- Controller: http://localhost:5000 (orchestration API)
- Text MCP: http://localhost:5001 (text input service)
- Actor MCP: http://localhost:5002 (desktop output service)
# Controller
cd src/PCTama.Controller && dotnet run
# Text MCP
cd src/PCTama.TextMCP && dotnet run
# Actor MCP (Windows only)
cd src/PCTama.ActorMCP && dotnet runPress Ctrl+C in the terminal.
Edit src/PCTama.Controller/appsettings.json:
{
"McpConfiguration": {
"LocalLlmEndpoint": "http://localhost:11434",
"ModelName": "llama2",
"McpServers": [
{
"Name": "text",
"Endpoint": "http://localhost:5001",
"Type": "Input",
"Enabled": true
}
],
"AdditionalInputMcps": []
}
}Edit src/PCTama.TextMCP/appsettings.json:
{
"TextMcpConfiguration": {
"Source": "OBSLocalVoice",
"OBSLocalVoiceEndpoint": "ws://localhost:4455",
"StreamingEnabled": true,
"BufferSize": 4096,
"AdditionalSources": []
}
}Edit src/PCTama.ActorMCP/appsettings.json:
{
"ActorMcpConfiguration": {
"DisplayType": "Avalonia UI",
"WindowWidth": 400,
"WindowHeight": 300,
"WindowTitle": "PCTama Actor",
"AlwaysOnTop": true,
"EnableAnimations": true
}
}PCTama defaults to http://localhost:11434 (Ollama):
# Install Ollama
brew install ollama # macOS
# Or download from https://ollama.ai for other OS
# Start Ollama server
ollama serve
# In another terminal, pull a model
ollama pull qwen2.5:3b
# Verify it's running
curl http://localhost:11434/api/tagsTo use voice-to-text input:
- Install OBS Studio
- Install LocalVoice plugin
- Configure WebSocket at
ws://localhost:4455in OBS - Update
src/PCTama.TextMCP/appsettings.jsonendpoint if different
# Run all tests
dotnet test tests/PCTama.Tests/PCTama.Tests.csproj
# With code coverage
dotnet test --collect:"XPlat Code Coverage"
# Run specific tests
dotnet test --filter "FullyQualifiedName~ControllerTests"
# Using build script
./build.sh test # macOS/Linux
build.bat test # WindowsGET /api/controller/status- MCP connection statusGET /api/controller/health- Health checkGET /health- Aspire health endpointGET /alive- Liveness check
GET /api/text/stream- Latest text from streamGET /api/text/buffer- All buffered textGET /api/text/status- Service status
POST /api/actor/say- Display text with speechPOST /api/actor/display- Display text onlyPOST /api/actor/perform- Perform actionGET /api/actor/status- Service status
# Get controller status
curl http://localhost:5000/api/controller/status
# Get latest text
curl http://localhost:5001/api/text/stream
# Make actor speak
curl -X POST http://localhost:5002/api/actor/say \
-H "Content-Type: application/json" \
-d '{"text":"Hello, world!"}'
# Get actor status
curl http://localhost:5002/api/actor/statusTo add a new input MCP:
- Update
appsettings.json:
{
"McpConfiguration": {
"AdditionalInputMcps": [
{
"Name": "custom-source",
"Endpoint": "http://localhost:5003",
"Type": "Input",
"Enabled": true,
"Configuration": {
"customProperty": "value"
}
}
]
}
}- The controller automatically discovers and connects to the new service.
PCTama/
โโโ .github/workflows/ # GitHub Actions CI/CD
โโโ src/
โ โโโ PCTama.AppHost/ # Aspire orchestrator
โ โโโ PCTama.ServiceDefaults/ # Shared configuration
โ โโโ PCTama.Controller/ # Main controller service
โ โโโ PCTama.TextMCP/ # Text input service
โ โโโ PCTama.ActorMCP/ # Avalonia UI output service
โโโ tests/
โ โโโ PCTama.Tests/ # Unit & integration tests
โโโ build.sh # macOS/Linux build script
โโโ build.bat # Windows build script
โโโ CMakeLists.txt # Root CMake config
โโโ PCTama.sln # Visual Studio solution
โโโ ARCHITECTURE.md # Detailed architecture
โโโ QUICKSTART.md # Quick start guide
โโโ RUNNING.md # Running guide
โโโ README.md # This file
Contributions welcome! Please:
- Ensure all tests pass:
dotnet test - Follow .editorconfig guidelines
- Include tests for new features
- Update documentation as needed
See CONTRIBUTING.md for details.
- QUICKSTART.md - Get started quickly
- ARCHITECTURE.md - Deep dive into design
- RUNNING.md - Running and troubleshooting guide
- CONTRIBUTING.md - Contribution guidelines
[Your License Here]
- .NET Aspire team for the excellent cloud-native framework
- Model Context Protocol (MCP) for standardized AI integration
- OBS Studio and LocalVoice plugin for voice-to-text capabilities
- The open-source .NET community
PCTama is complete and ready for development and deployment!
All core features are implemented:
- โ Aspire microservices framework
- โ MCP SDK integration foundation
- โ Streaming text service
- โ Actor output service
- โ OpenTelemetry observability
- โ Health monitoring
- โ Comprehensive testing
- โ CI/CD pipeline
- โ Cross-platform build support
PCTama - Your AI-Powered Desktop Pet ๐ฎโจ