
What You Are Making
A Zed Agent Panel prompt that reads yesterday's screen time data from ScreenTimerAI and generates a short daily productivity report.
Fast, native, and minimal. Just open the Agent Panel and ask.
Why Zed
Zed is a high-performance code editor built in Rust with native AI integration through its Agent Panel. It appeals to developers who want speed, minimal resource usage, and built-in AI without the overhead of managing extensions or plugins. Connecting screen time tracking to Zed makes sense because the Agent Panel already handles MCP tools natively. There are no extensions to install and no plugins to manage. Your time tracking data becomes just another context source the agent can pull from during any conversation. Configuration changes in settings.json are picked up instantly without restarting the editor, so iterating on your setup is fast.
Step 1: Connect ScreenTimerAI To Zed
Open your Zed settings file (Cmd+,) or edit it directly:
~/.config/zed/settings.json
Add a context_servers entry:
{
"context_servers": {
"screentimerai-activities": {
"command": "/Applications/ScreenTimerAI.app/Contents/MacOS/activity-mcp-server",
"args": []
}
}
}
Zed picks up the change automatically after you save. No restart needed.
You can verify the server is running by opening the Agent Panel (Cmd+Shift+A) and checking for a green dot next to the server name in the settings view.
If you want to test that Step 1 worked, try one of these prompts in the Agent Panel:
| MCP function | Test prompt |
|---|---|
get_current_activity | What am I doing right now? |
get_activity_logs | Get my raw activity logs for yesterday. |
show_activity_timeline | Show me an activity timeline for yesterday. |
summarize_activity_range | Summarize my activity for yesterday. |
analyze_focus_segments | Analyze my focus segments for yesterday afternoon. |
show_focus_score_timeline | Show me a focus score timeline for today. |
show_focus_score_trends | Show me my focus score last week. |
Step 2: Generate Your Daily Report
Open the Agent Panel (Cmd+Shift+A) and paste this prompt:
Generate a daily productivity text report based on yesterday's Screen Time AI data.
Follow these steps:
1. Fetch yesterday's activity data from Screen Time AI.
2. Write a short productivity report (~150 words) from the perspective of a dark, witty productivity coach reacting to the data.
Rules:
- Focus more on failures than successes
- Use short, punchy sentences
- Be dark and witty, commanding not polished
- Swearing is allowed sparingly for impact
- Return only the final report text, nothing else
Return the report as plain text directly in the chat.Zed will ask for permission before running ScreenTimerAI tools. Approve the calls and the report appears in the Agent Panel.
Other Prompts To Try
Once the MCP connection is working, you can ask the Agent Panel anything about your screen time data. Here are a few prompts that work well for understanding daily habits and focus patterns:
- Top apps by time: "Show me my top 5 apps by time spent yesterday." This gives you a quick breakdown of where your hours actually went, which is often surprising.
- Context switching: "How many context switches did I have yesterday afternoon?" Frequent app switching is one of the strongest signals of fragmented attention. Use this to find your worst windows.
- Week-over-week comparison: "Compare my screen time this week vs last week." Useful for spotting trends before they become habits — especially after schedule changes or new project starts.
- Productive hours: "Analyze my focus segments for yesterday and identify my most productive hours." This helps you find the time blocks where you consistently do deep work so you can protect them.
Troubleshooting
Server not showing a green dot? Check that the binary path in settings.json is correct. Open a terminal and run the path directly to confirm it is executable. If you moved or reinstalled ScreenTimerAI, the path may have changed.
Agent Panel not calling tools? Make sure you are in the Agent Panel (Cmd+Shift+A), not the inline assistant. The inline assistant does not have access to MCP servers. You should see the server listed with a green status indicator before prompting.
Logs showing errors? Open the Zed log file with Cmd+Shift+P and search for "zed: open logs". Filter for "screentimerai" to find relevant error messages. Common causes include permission issues or the ScreenTimerAI app not running in the background.
What Happens Next
Every time you run the prompt in the Agent Panel, Zed pulls your latest screen time data through the MCP connection and generates a fresh report.
Use it for a quick morning check-in without leaving your editor.