Skip to main content
Gemini CLI is Google’s terminal-based AI coding assistant. it supports MCP servers, so you can connect screenpipe to give Gemini context about what you’ve been working on.

setup

Gemini CLI uses MCP for external tools. add screenpipe to your settings file (~/.gemini/settings.json):
{
  "mcpServers": {
    "screenpipe": {
      "command": "npx",
      "args": ["-y", "screenpipe-mcp"]
    }
  }
}
restart Gemini CLI after configuration.

usage

once configured, Gemini can search your screen history:
gemini

> what was I working on this morning?

> find the error message I saw in my terminal earlier

> summarize the documentation I was reading about kubernetes

available tools

screenpipe provides these MCP tools to Gemini:
tooldescription
search-contentsearch screen text (accessibility-first, OCR fallback), audio transcriptions, and input
activity-summarylightweight overview of app usage, speakers, and recent texts for a time range
search-elementssearch structured UI elements from the accessibility tree
frame-contextfull accessibility tree, URLs, and text for a specific frame
list-meetingslist detected meetings with duration, app, and attendees
export-videoexport screen recordings as MP4 for a time range

example workflows

context-aware coding:
> I was looking at a react component earlier that handled
> form validation, find it and help me implement something similar
debug from memory:
> there was an error in my build output, find it and help me fix it
recall documentation:
> what did that API documentation say about rate limits?

requirements

  • screenpipe running on localhost:3030
  • Gemini CLI installed
  • Node.js >= 18.0.0

troubleshooting

MCP server not connecting?
  1. verify screenpipe is running:
    curl http://localhost:3030/health
    
    you should see {"status":"healthy"}. if this fails, start screenpipe first.
  2. check the settings file path: the config should be in ~/.gemini/settings.json. verify the file exists and contains valid JSON:
    cat ~/.gemini/settings.json | jq .
    
  3. restart Gemini CLI: after adding or modifying the config, fully restart Gemini CLI. if it was running in a terminal, exit and reopen it.
queries returning empty?
  • make sure screenpipe has recorded data: curl "http://localhost:3030/search?limit=1"
  • if empty, let screenpipe run for a minute and try again
  • check screen recording is enabled (macOS: System Settings > Privacy & Security > Screen Recording)
need help? join our discord.