A comprehensive personal assistant web service that provides both REST API and Model Context Protocol (MCP) interfaces for managing todos, notes, recipes, user preferences, and household data.
- Todo Management: Create, list, update, and complete tasks with priority levels and due dates
- Notes System: Save and retrieve structured notes with key-based lookup
- Recipe Management: Store and search recipes with detailed metadata (prep time, difficulty, ratings)
- User Preferences: Flexible key-value preference storage system
- Household Management: Support for multi-user households with shared data
- User Authentication: OAuth integration with Google for secure authentication
- REST API: Traditional HTTP endpoints for all features
- MCP Server: Model Context Protocol implementation for AI assistant integration
assistant-server/
├── cmd/ # Application configuration and server setup
├── dao/postgres/ # PostgreSQL data access layer
├── service/ # HTTP handlers and business logic
├── integration_test/ # Comprehensive integration tests
├── migrations/ # Database schema migrations
└── mocks/ # Mock implementations for testing
- Go 1.24.3+
- PostgreSQL 16+
- Docker and Docker Compose (for testing)
- Clone the repository:
git clone https://github.com/pbdeuchler/assistant-server.git
cd assistant-server- Install dependencies:
go mod download- Set up environment variables:
export DATABASE_URL="postgres://username:password@localhost:5432/assistant?sslmode=disable"
export PORT="8080"
export BASE_URL="http://localhost:8080"
# Optional: For Google OAuth
export GCLOUD_CLIENT_ID="your-client-id"
export GCLOUD_CLIENT_SECRET="your-client-secret"
export GCLOUD_PROJECT_ID="your-project-id"- Run database migrations:
# Migrations will be automatically applied on server startup- Start the server:
go run main.goGET /todos- List todos with optional filtersPOST /todos- Create a new todoGET /todos/{id}- Get a specific todoPUT /todos/{id}- Update a todoDELETE /todos/{id}- Delete a todo
GET /notes- List notes with optional filtersPOST /notes- Create a new noteGET /notes/{id}- Get a specific notePUT /notes/{id}- Update a noteDELETE /notes/{id}- Delete a note
GET /recipes- Search recipes with filtersPOST /recipes- Create a new recipeGET /recipes/{id}- Get a specific recipePUT /recipes/{id}- Update a recipeDELETE /recipes/{id}- Delete a recipe
GET /preferences- List preferencesPOST /preferences- Set a preferenceGET /preferences/{key}/{specifier}- Get a specific preferenceDELETE /preferences/{key}/{specifier}- Delete a preference
GET /bootstrap- Get initial data for all entities
GET /oauth/login- Initiate OAuth flowGET /oauth/callback- OAuth callback handler
The server implements 13 MCP tools for AI assistant integration:
create_todo- Create a new todo tasklist_todos- List todos with optional filteringcomplete_todo- Mark a todo as completed
save_note- Save a note with a key for later retrievalrecall_note- Retrieve a saved note by keylist_notes- List notes with optional filtering
save_recipe- Save a recipe with metadatafind_recipes- Search recipes by criteriaget_recipe- Get a specific recipe by ID
set_preference- Set a user preferenceget_preference- Get a user preference
update_user_description- Update a user's descriptionupdate_household_description- Update a household's description
Environment variables:
PORT- Server port (default: 8080)DATABASE_URL- PostgreSQL connection string (required)BASE_URL- Base URL for OAuth callbacks (default: http://localhost:8080)GCLOUD_CLIENT_ID- Google OAuth client ID (optional)GCLOUD_CLIENT_SECRET- Google OAuth client secret (optional)GCLOUD_PROJECT_ID- Google Cloud project ID (optional)
make test-integration# Unit tests
go test ./...
# Integration tests
cd integration_test
go test -v .
# MCP tests only
go test -v . -run TestMCP_
# HTTP API tests only
go test -v . -run TestAPI_Tests use a Docker PostgreSQL instance on port 5433 with:
- Database:
assistant_test - User:
test_user - Password:
test_password
The application uses PostgreSQL with the following main tables:
users- User accounts with OAuth integrationhouseholds- Household groups for shared datatodos- Task managementnotes- Structured note storagerecipes- Recipe storage with metadatapreferences- Key-value preference storagecredentials- OAuth credential storage
All tables use UUIDs for primary keys and include proper foreign key relationships for data integrity.
go build -o assistant-server# Start test database
make docker-up
# Run server
go run main.go
# Stop test database
make docker-down# Generate mocks for testing
go generate ./...To use this server with an AI assistant that supports MCP:
- Start the server
- Configure your AI assistant to connect to the MCP endpoint at
/mcp - The server will handle protocol negotiation and tool registration automatically
This project is licensed under the GNU GPLv3 License with the Commons Clause License Condition v1.0.
[Add contribution guidelines here]