A Model Context Protocol (MCP) server for Vikunja task management integration with support for both stdio and HTTP transports.
This project provides an MCP server that allows LLMs and AI assistants to interact with Vikunja task management through standardized tool calls. It supports both local CLI usage (stdio) and remote web deployment (HTTP).
- 📋 List tasks from Vikunja projects and views
- 🔍 Get detailed task information including bucket placement
- 📦 List project buckets and organize tasks
- 🏗️ List all available projects
- 🚀 Multiple transport modes: stdio (CLI) and HTTP (web)
- 🔧 Configurable HTTP server with session management
- ✅ Built with the official MCP Go SDK
go get github.com/meschbach/mcp-vikunjago build -o bin/mcp-vikunja ./cmd/mcp-vikunjaexport VIKUNJA_HOST="https://your-vikunja-instance.com"
export VIKUNJA_TOKEN="your-api-token"The MCP server now uses explicit subcommands for different transport modes:
Option A: Stdio Transport (for local CLI tools)
# Default Markdown output (recommended for AI/LLMs)
./bin/mcp-vikunja stdio
# JSON output (for legacy compatibility)
./bin/mcp-vikunja stdio --output-format json
# Both formats together
./bin/mcp-vikunja stdio -o both
# Environment variable setting
VIKUNJA_OUTPUT_FORMAT=json ./bin/mcp-vikunja stdioOption B: HTTP Transport (for web applications and remote access)
# Default Markdown output (recommended for AI/LLMs)
./bin/mcp-vikunja server
# JSON output (for legacy compatibility)
./bin/mcp-vikunja server --output-format jsonOption C: Show Help
./bin/mcp-vikunja
# Shows available commands and usage examples- Best for: Local CLI tools, development environments
- Usage:
./bin/mcp-vikunja stdio - Features: Communicates over standard I/O
- Example:
VIKUNJA_HOST=https://example.com VIKUNJA_TOKEN=token ./bin/mcp-vikunja stdio
- Best for: Web applications, remote access, multiple clients
- Usage:
./bin/mcp-vikunja server - Features: Session management, concurrent connections, streamable HTTP
- Example:
VIKUNJA_HOST=https://example.com VIKUNJA_TOKEN=token ./bin/mcp-vikunja server --http-port 9000
The MCP server provides a rich command-line interface:
mcp-vikunja server- Start HTTP + Streamable transport servermcp-vikunja stdio- Start stdio transport server
mcp-vikunja config show- Display current configurationmcp-vikunja config validate- Validate configuration and test connectivity
mcp-vikunja health- Test Vikunja connectionmcp-vikunja version- Show version and build informationmcp-vikunja help- Show comprehensive help
# Start HTTP server with custom settings
./bin/mcp-vikunja server --http-host 0.0.0.0 --http-port 9000 --stateless
# Start stdio server with verbose logging
./bin/mcp-vikunja stdio --verbose --vikunja-host https://example.com
# Show current configuration
./bin/mcp-vikunja config show --format json
# Validate configuration
./bin/mcp-vikunja config validate
# Test Vikunja connectivity
./bin/mcp-vikunja health --vikunja-host https://example.com --vikunja-token tokenVIKUNJA_HOST- Your Vikunja instance URLVIKUNJA_TOKEN- Your Vikunja API token
| Variable/Flag | Default | Description |
|---|---|---|
VIKUNJA_OUTPUT_FORMAT |
markdown |
Output format: json, markdown, both |
--output-format / -o |
markdown |
CLI flag that overrides VIKUNJA_OUTPUT_FORMAT |
Output Format Precedence: CLI flag > Environment variable > Default (markdown)
Output Format Options:
json- Original JSON output (for legacy compatibility)markdown- Human-readable Markdown output with tables and formatting (recommended for AI/LLMs)both- Combined JSON and Markdown output
| Variable | Default | Description |
|---|---|---|
MCP_TRANSPORT |
stdio |
Transport type: stdio or http |
MCP_HTTP_HOST |
localhost |
Server bind address |
MCP_HTTP_PORT |
8080 |
Server port |
MCP_HTTP_SESSION_TIMEOUT |
30m |
Session timeout |
MCP_HTTP_STATELESS |
false |
Disable session tracking |
The server provides the following MCP tools:
list_tasks- List tasks from projects with filtering optionsget_task- Get detailed task information including bucket placementlist_buckets- List all buckets in a project view (defaults to Inbox project and Kanban view)list_projects- List all available projectscreate_task- Create new tasks with title, description, project, bucket, and due date
In addition to the MCP server, this repository includes a standalone CLI tool for direct Vikunja interaction:
# Build the CLI tool
go build -o bin/vikunja-cli ./cmd/vikunja-cli
# Or install directly
go install ./cmd/vikunja-cliThe CLI tool uses the same environment variables as the MCP server:
VIKUNJA_HOST- Your Vikunja instance URL (required)VIKUNJA_TOKEN- Your Vikunja API token (required)VIKUNJA_INSECURE- Skip TLS verification (optional, default: false)
Or use command-line flags to override environment variables.
# Show help
vikunja-cli --help
# List all tasks (optionally filtered by project)
vikunja-cli tasks list [--project <id>]
# Get detailed task information
vikunja-cli tasks get <task-id>
# Create a new task
vikunja-cli tasks create <title> [description] [flags]The tasks create command creates new tasks with flexible project and bucket assignment:
# Create task with title only (uses default "Inbox" project)
vikunja-cli tasks create "My new task"
# Create task with title and description
vikunja-cli tasks create "My task" "Detailed description"
# Create task in specific project by ID
vikunja-cli tasks create "Task" --project 123
# Create task in project by title
vikunja-cli tasks create "Task" --project "Work Projects"
# Create task in specific bucket by ID
vikunja-cli tasks create "Task" --project 123 --bucket 456
# Create task in bucket by title (requires project to have Kanban view)
vikunja-cli tasks create "Task" --project 123 --bucket "In Progress"
# Use default Inbox with bucket by title
vikunja-cli tasks create "Task" --bucket "In Progress"The CLI tool supports multiple output formats:
# Table output (default)
vikunja-cli tasks create "Task" --project 123
# JSON output
vikunja-cli tasks create "Task" --project 123 --json
# Markdown output
vikunja-cli tasks create "Task" --project 123 --markdown
# Write output to file
vikunja-cli tasks create "Task" --project 123 --output task.json
# Disable colors
vikunja-cli tasks create "Task" --no-color
# Verbose logging
vikunja-cli tasks create "Task" --verbose--host/-h- Vikunja instance hostname (overrides VIKUNJA_HOST)--token/-t- API token (overrides VIKUNJA_TOKEN)--insecure/-k- Skip TLS certificate verification--json/-j- Output as JSON--markdown/-m- Output as Markdown--output/-o- Write output to file--verbose/-v- Enable debug logging--no-color- Disable colored output
# Start server with HTTP transport
VIKUNJA_HOST=https://example.com VIKUNJA_TOKEN=your-token ./bin/mcp-vikunja server &
# Test the server
curl -X POST http://localhost:8080 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}'FROM golang:1.23-alpine AS builder
WORKDIR /app
COPY . .
RUN go build -o mcp-vikunja ./cmd/mcp-vikunja
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
COPY --from=builder /app/mcp-vikunja .
CMD ["./mcp-vikunja"]# Build and run with Docker
docker build -t mcp-vikunja .
docker run -p 8080:8080 \
-e VIKUNJA_HOST=https://your-vikunja.com \
-e VIKUNJA_TOKEN=your-token \
mcp-vikunja server --http-host 0.0.0.0See AGENTS.md for coding guidelines and commands.
# Full setup: build, start services, run tests
make dev
# Individual commands
make build # Build release binaries
make dev-up # Start docker-compose services
make dev-down # Stop services
make setup-user # Create Vikunja user and API token
# Quality checks
make check # Run all checks: fmt, vet, lint, tidy, test, coverage, build
make fmt # Format code
make vet # Run go vet
make lint # Run golangci-lint
make tidy-check # Verify go mod tidy produces no changes
make test # Run tests with verbose output
make test-cover # Run tests with coverage report# Run tests (requires docker-compose: make dev-up && make setup-user)
make test
# Run with coverage
make test-cover- Docker Compose Guide - Local development setup with Docker
- Transport Configuration Guide - Detailed transport setup and deployment options
- AGENTS.md - Development guidelines and project standards
MIT