Go to file
StillHammer cb938500cd feat: Phase 8 - MCP Server integration with Claude Code
Expose AISSIA as MCP Server to integrate with Claude Code and other MCP clients.

**New Infrastructure**:
- MCPServerTools: Bridge between MCP Server and AISSIA services
- Synchronous service methods for blocking MCP calls
- 13 total tools exposed (5 AISSIA core + 8 filesystem)

**Priority Tool**:
- chat_with_aissia: Dialogue with AISSIA's AI assistant (Claude Sonnet 4)

**AISSIA Core Tools** (5):
1. chat_with_aissia - AI conversation with Claude Sonnet 4
2. transcribe_audio - STT file transcription (stub)
3. text_to_speech - TTS file output (stub)
4. save_memory - Persistent storage (stub)
5. search_memories - Memory search (stub)

**Changes**:
- src/shared/tools/MCPServerTools.{hpp,cpp}: New tool handlers for AISSIA services
- src/services/LLMService: Added sendMessageSync() for blocking calls
- src/services/VoiceService: Added loadConfig(), transcribeFileSync(), textToSpeechSync()
- src/main.cpp: Refactored runMCPServer() to instantiate services and register AISSIA tools
- CMakeLists.txt: Added MCPServerTools to AissiaTools library

**Documentation**:
- docs/CLAUDE_CODE_INTEGRATION.md: Complete integration guide
- config/README_MCP.md: Quick setup instructions
- config/claude_code_mcp_config.json: Example MCP configuration

**Usage**:
```bash
./aissia --mcp-server
```

**Limitations (MVP)**:
- STT/TTS file operations not fully implemented (engines need file support)
- Storage sync methods return "not implemented" (async pub/sub only)
- No hot-reload modules in MCP mode

**Next Steps** (Phase 8.1-8.4):
- Complete STT/TTS sync methods
- Implement StorageService sync API
- Add advanced tools (schedule_task, get_focus_stats)
- Multi-modal support (vision, PDF parsing)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-30 17:42:15 +08:00
.claude Refactor documentation structure and add language learning 2025-10-29 07:28:34 +08:00
audits refactor: Services architecture for GroveEngine compliance 2025-11-26 11:57:53 +08:00
config feat: Phase 8 - MCP Server integration with Claude Code 2025-11-30 17:42:15 +08:00
deps/sqlite refactor: Services architecture for GroveEngine compliance 2025-11-26 11:57:53 +08:00
docs feat: Phase 8 - MCP Server integration with Claude Code 2025-11-30 17:42:15 +08:00
external fix: Windows build compatibility - disable OpenSSL and fix Winsock linking 2025-11-30 16:26:35 +08:00
plans feat(wip): Phase 7.1 STT Service Layer - Architecture complète (ne compile pas) 2025-11-29 09:01:26 +08:00
src feat: Phase 8 - MCP Server integration with Claude Code 2025-11-30 17:42:15 +08:00
tests fix: Windows test suite fixes - all 120 tests passing 2025-11-30 17:00:37 +08:00
.gitignore fix: Windows build compatibility - disable OpenSSL and fix Winsock linking 2025-11-30 16:26:35 +08:00
.gitmodules feat: Phase 7.2 - Integrate Whisper.cpp STT engine 2025-11-29 22:27:44 +08:00
AlternativesAnalysis.md Update CDC with hybrid architecture (WarFactory + multi-target) 2025-10-27 11:49:09 +08:00
CDCDraft.md Update CDC with hybrid architecture (WarFactory + multi-target) 2025-10-27 11:49:09 +08:00
CLAUDE.md feat: Add WebModule for HTTP requests via IIO 2025-11-28 17:15:46 +08:00
CMakeLists.txt feat: Phase 8 - MCP Server integration with Claude Code 2025-11-30 17:42:15 +08:00
create_test_audio_simple.py feat: Phase 7 STT - Complete Windows setup with Whisper.cpp 2025-11-30 17:12:37 +08:00
create_test_audio.py feat: Phase 7 STT - Complete Windows setup with Whisper.cpp 2025-11-30 17:12:37 +08:00
PLAN_FILESYSTEM_TOOLS.md docs: Add plan for FileSystem tools (read/write/edit) 2025-11-26 22:27:06 +08:00
PLAN_TESTS_INTEGRATION.md test: Implement 20 integration tests for Scheduler and Notification modules 2025-11-27 09:49:08 +08:00
PROMPT_SUCCESSEUR.md docs: Add run.sh wrapper and update documentation 2025-11-28 14:22:04 +08:00
README.md feat: Phase 6 - Interactive mode validated with TTS 2025-11-29 07:45:21 +08:00
run_tests.ps1 fix: Windows test suite fixes - all 120 tests passing 2025-11-30 17:00:37 +08:00
run.sh docs: Add run.sh wrapper and update documentation 2025-11-28 14:22:04 +08:00
test_interactive.sh feat: Phase 7 STT - Complete implementation with 4 engines 2025-11-29 17:27:47 +08:00
test_stt_live.cpp feat: Phase 7 STT - Complete Windows setup with Whisper.cpp 2025-11-30 17:12:37 +08:00
test-results.json feat: Phase 7 STT - Complete implementation with 4 engines 2025-11-29 17:27:47 +08:00

AISSIA - AI Smart Schedule & Interactive Assistant

AISSIA is an intelligent personal assistant for time management, hyperfocus detection, and language learning, powered by GroveEngine.

What is AISSIA?

AISSIA helps manage:

  • Hyperfocus: Detects when you've been working too long and need a break
  • Time Management: Intelligent scheduling and task planning
  • Language Learning: Interactive practice in target languages
  • Notifications: Context-aware alerts with TTS support

Built on GroveEngine

AISSIA leverages GroveEngine, a C++17 hot-reload module system that enables:

  • Hot-Reload: Modify code at runtime without losing state (<1ms reload latency)
  • Modular Architecture: Self-contained modules (200-300 lines each)
  • Pub/Sub Communication: Decoupled inter-module messaging
  • State Preservation: Automatic state serialization across reloads
  • Configuration Hot-Reload: Update settings without code changes

Why GroveEngine?

Ultra-fast Development: Hot-reload validated at 0.4ms Type Safety: Strong C++ typing, no "wildcode" Proven Architecture: Production-ready module system Privacy-First: Local mode, data never uploaded Progressive Evolution: MVP → Production → Cloud without rewrite

Project Structure

Aissia/
├── external/
│   └── GroveEngine/          # GroveEngine (symlink)
├── src/
│   ├── main.cpp              # Main application loop
│   └── modules/
│       ├── SchedulerModule.*       # Time management & hyperfocus
│       ├── NotificationModule.*    # Alerts & TTS
│       ├── AIAssistantModule.*     # (TODO) LLM integration
│       ├── LanguageLearningModule.* # (TODO) Language practice
│       └── DataModule.*            # (TODO) SQLite persistence
├── config/
│   ├── scheduler.json
│   └── notification.json
├── docs/
│   ├── README.md                   # Project documentation
│   └── GROVEENGINE_GUIDE.md        # GroveEngine user guide
└── CMakeLists.txt

Modules

Implemented

SchedulerModule: Time management and hyperfocus detection

  • Tracks work sessions and break intervals
  • Detects hyperfocus based on configurable threshold (default: 120 minutes)
  • Reminds for breaks (default: every 45 minutes)
  • Task estimation and tracking

NotificationModule: System alerts with priority levels

  • Priority-based notifications (LOW, NORMAL, HIGH, URGENT)
  • Silent mode (respects URGENT priority)
  • TTS support (configurable)
  • Multilingual support (fr/en/jp)
  • Queue management with rate limiting

Planned

AIAssistantModule: LLM-powered contextual interventions

  • Claude API integration
  • Context-aware suggestions
  • Intelligent document retrieval

LanguageLearningModule: Language practice and learning

  • Conversation in target language
  • Vocabulary tracking
  • Progress monitoring

DataModule: SQLite persistence

  • Task history
  • Session analytics
  • Configuration backup

Getting Started

Prerequisites

  • CMake 3.20+
  • C++17 compiler (GCC/Clang)
  • GroveEngine (included via symlink)

Build

# Configure
cmake -B build

# Build everything
cmake --build build -j4

# Build modules only (for hot-reload workflow)
cmake --build build --target modules

Run

# Interactive mode (requires ANTHROPIC_API_KEY in .env)
./run.sh

# Or manually with .env loaded
source .env && ./build/aissia -i

# MCP Server mode (for Claude Code integration)
./build/aissia --mcp-server

# Normal mode (background daemon)
./build/aissia

Note: Create a .env file with your API key:

ANTHROPIC_API_KEY=sk-ant-...

Hot-Reload Workflow

  1. Start AISSIA: ./build/aissia
  2. Edit a module: src/modules/SchedulerModule.cpp
  3. Rebuild: cmake --build build --target modules
  4. Module reloads automatically with state preserved

Configuration

Configuration files in config/:

scheduler.json:

{
    "hyperfocusThresholdMinutes": 120,
    "breakReminderIntervalMinutes": 45,
    "breakDurationMinutes": 10,
    "workdayStartHour": 9,
    "workdayEndHour": 18
}

notification.json:

{
    "language": "fr",
    "silentMode": false,
    "ttsEnabled": false,
    "maxQueueSize": 50
}

Documentation

Development Philosophy

MVP-First

  • Phase 1 (Required): Local Windows mode only
  • Phase 2+ (Optional): Cloud features if needed
  • Configuration-Driven: 90% of needs via JSON
  • Simplicity First: Complexity emerges from interaction

Module Development

Each module is a self-contained unit (~200-300 lines):

  1. Implements IModule interface
  2. Pure business logic (no infrastructure code)
  3. Communicates via IIO pub/sub
  4. Serializes state for hot-reload
  5. Configurable via IDataNode

See docs/GROVEENGINE_GUIDE.md for detailed module development guide.

Architecture

AISSIA runs on a simple loop (10Hz for assistant workload):

┌─────────────────────────────────────────────┐
│           Main Loop (10Hz)                   │
│                                              │
│  ┌────────────────────────────────────┐    │
│  │  1. Check for module file changes   │    │
│  │  2. Hot-reload if modified          │    │
│  │  3. Process all modules             │    │
│  │  4. Route inter-module messages     │    │
│  │  5. Sleep to maintain 10Hz          │    │
│  └────────────────────────────────────┘    │
└─────────────────────────────────────────────┘

Modules communicate via topics:

  • scheduler:hyperfocus_detected → NotificationModule alerts user
  • notification:alert_sent → DataModule logs event
  • aiassistant:suggestion → NotificationModule displays suggestion

Technical Stack

  • Core: C++17
  • Module System: GroveEngine
  • Logging: spdlog
  • Data Format: JSON (nlohmann/json)
  • Build: CMake 3.20+
  • Future: SQLite (DataModule), Claude API (AIAssistantModule)

Roadmap

Completed

  • Project setup with GroveEngine
  • SchedulerModule (time management & hyperfocus)
  • NotificationModule (alerts & TTS)
  • MonitoringModule (app tracking & classification)
  • AIModule (LLM conversation & suggestions)
  • VoiceModule (TTS/STT interfaces)
  • StorageModule (SQLite persistence)
  • WebModule (HTTP requests via IIO pub/sub)
  • LLM Service (Claude API integration - Sonnet 4)
  • 17 Agentic Tools (filesystem, scheduler, storage, etc.)
  • MCP Server mode (JSON-RPC stdio)
  • Interactive mode (--interactive)
  • 110/110 unit tests passing
  • 13/13 integration tests implemented
  • TTS integration (espeak-ng) NEW
  • Interactive mode validated with real queries NEW

In Progress 🚧

  • Expose InternalTools via MCP Server
  • Fix integration tests (requires modules loaded + API key)

Planned 📋

  • Windows Toast notifications
  • STT integration (Whisper API)
  • Language learning features

License

To be determined