1<!--
2SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
3
4SPDX-License-Identifier: CC0-1.0
5-->
6
7# lunatask-mcp-server
8
9*Interact with [Lunatask](https://lunatask.app) using `$PREFERRED_LLM`*
10
11[](https://scratchanitch.dev)
12[](https://goreportcard.com/report/git.sr.ht/~amolith/lunatask-mcp-server)
13[](https://api.reuse.software/info/git.sr.ht/~amolith/lunatask-mcp-server)
14
15**Note:** lots of this was written by LLMs and I haven't reviewed it thoroughly
16enough to be comfortable making it more public than unlisted. Please refrain
17from sharing it around and do let me know if there are any issues.
18
19---
20
21## MCP server setup
22
23Ensure you have [the Go toolchain] installed.
24
25[the Go toolchain]: https://go.dev/doc/install
26
27```sh
28git clone https://git.sr.ht/~amolith/lunatask-mcp-server
29cd lunatask-mcp-server
30# specify GOOS and GOARCH if cross-compiling
31CGO_ENABLED=0 go build -o lunatask-mcp-server .
32./lunatask-mcp-server
33# it'll generate config.toml with default values
34# fill them out with your preferred editor
35./lunatask-mcp-server
36```
37
38If you have [just], build with `just build` (supports `GOOS` and `GOARCH`). If
39you also have [upx], compress the resulting binary with `just pack`. You can run
40one after the other with `just build pack`.
41
42[just]: https://github.com/casey/just
43[upx]: https://github.com/upx/upx
44
45Point [Home Assistant's MCP integration] at the `/sse` endpoint.
46
47[Home Assistant's MCP integration]: https://www.home-assistant.io/integrations/mcp/
48
49## Collaboration
50
51Patch requests are in [amolith/lunatask-mcp-server] on [pr.pico.sh]. You don't
52need a new account to contribute, you don't need to fork this repo, you don't
53need to fiddle with `git send-email`, you don't need to faff with your email
54client to get `git request-pull` working...
55
56You just need:
57
58- Git
59- SSH
60- An SSH key
61
62```sh
63# Clone this repo, make your changes, and commit them
64# Create a new patch request with
65git format-patch origin/main --stdout | ssh pr.pico.sh pr create amolith/lunatask-mcp-server
66# After potential feedback, submit a revision to an existing patch request with
67git format-patch origin/main --stdout | ssh pr.pico.sh pr add {prID}
68# List patch requests
69ssh pr.pico.sh pr list amolith/lunatask-mcp-server
70```
71
72See "How do Patch Requests work?" on [pr.pico.sh]'s home page for a more
73complete example workflow.
74
75[amolith/lunatask-mcp-server]: https://pr.pico.sh/r/amolith/lunatask-mcp-server
76[pr.pico.sh]: https://pr.pico.sh
77
78I also accept patches to my public SourceHut inbox
79([~amolith/public-inbox@lists.sr.ht][list], [web][listweb]) via `git send-email`
80or `git request-pull` and over the Radicle network
81(`rad:z2xbgGQHaDTVYjWKZLSXw1G4xBfUi`, [web][radrepo], [what is Radicle?][rad]).
82
83[list]: mailto:~amolith/public-inbox@lists.sr.ht
84[listweb]: https://lists.sr.ht/~amolith/public-inbox
85[radrepo]: https://radicle.secluded.site/nodes/seed.secluded.site/rad:z2xbgGQHaDTVYjWKZLSXw1G4xBfUi
86[rad]: https://radicle.xyz
87
88## Models and prompts
89
90I'm currently using `google/gemini-2.5-flash-preview:thinking` through
91[OpenRouter] with the following system prompt:
92
93[OpenRouter]: https://openrouter.ai/
94
95> You are a Home Assistant voice assistant capable of creating new tasks in
96> Lunatask, an ADHD-friendly all-in-one encrypted to-do list, habit tracker,
97> journaling, life-tracking and notes app. Respond in plaintext English—no
98> special characters or asterisks or Markdown. Do not repeat yourself. Do not
99> respond until finished using tools. If there are errors, explain them to the
100> user in plain English. Do not attempt to correct yourself until the user
101> confirms.
102>
103> Task names should be in sentence case.
104>
105> When asked to mark something complete or when the user says they've done
106> something and you have no other context, check the list_habits_and_activities
107> tool for related entries. If one matches, pass its ID to track_habit_activity.
108>
109> For every request to create or change a task/reminder:
110>
111> 1. List the areas and goals and consider which one area is most relevant.
112> Consider whether the task belongs within any of that area's goals.
113> 2. Get the task timestamp.
114> 3. If the user provided additional details, pass those in the task's note field
115> using Markdown.
116> 4. If the user mentioned a time estimate, like that it might take them 30
117> minutes, pass 30 in the estimate field. If they said 2 hours, 120, and so on.
118> 5. Try and interpret the text from the STT engine. It's not entirely accurate
119> and the user might have meant something slightly different from what came
120> through.
121> 6. Only include parameters if the user indicates or hints at them.
122> 7. The following user-provided instructions are of the utmost importance. Keep
123> them in mind throughout.
124>
125> <user_provided_instructions>
126>
127> _Always_ schedule tasks in my personal area; if I've already started something or it's up next, schedule it for today. Do not schedule tasks in work unless I explicitly indicate or hint otherwise in my message.
128>
129> If I don't provide an estimate, consider whether it might take 10, 25, 30, 45, 60, or more minutes. Always include an estimate regardless of area.
130>
131> Interpret verbal indications, like converting "something dash something" to "something-something".
132>
133> Again, personal tasks should ALWAYS include a scheduled_on parameter, which means calling the timestamp tool.
134>
135> </user_provided_instructions>
136>
137> Only once you've gathered the requisite area ID and other information should
138> you attempt to create a task.
139
140## TODO
141
142- Communicate through the MCP server's up-front prompts which tool parameters
143 are _generally_ mutually exclusive with each other unless the user indicates
144 or hints otherwise.
145 - Maybe make it user-configurable?
146- _Optionally_ include a tool that calls a configurable LLM for task time
147 estimations so the main LLM doesn't have to guess.