kira-mcp

kira-mcp

kira-mcp is a local MCP server that gives any MCP-compatible agent host full computer-use capabilities on the host machine, including screen perception with OmniParser and desktop automation.

Category
访问服务器

README

   ██╗  ██╗██╗██████╗  █████╗
   ██║ ██╔╝██║██╔══██╗██╔══██╗
   █████╔╝ ██║██████╔╝███████║
   ██╔═██╗ ██║██╔══██╗██╔══██║
   ██║  ██╗██║██║  ██║██║  ██║
   ╚═╝  ╚═╝╚═╝╚═╝  ╚═╝╚═╝  ╚═╝
        local · MCP · computer-use

<p align="center"> <a href="https://pypi.org/project/kira-mcp/"><img alt="PyPI" src="https://img.shields.io/pypi/v/kira-mcp?color=3775A9&label=pypi"></a> <a href="https://www.python.org/downloads/"><img alt="Python 3.10+" src="https://img.shields.io/badge/python-3.10+-3776AB?logo=python&logoColor=white"></a> <a href="https://modelcontextprotocol.io"><img alt="MCP 1.2+" src="https://img.shields.io/badge/MCP-1.2+-7C3AED"></a> <a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/license-MIT-22C55E"></a> <img alt="Platforms" src="https://img.shields.io/badge/platforms-Linux%20%7C%20macOS%20%7C%20Windows-64748B"> </p>


kira-mcp is a local Model Context Protocol server that gives any MCP-compatible agent host (Claude Desktop, Claude Code, Cursor, Cline, Continue, …) full computer-use capabilities on the host machine.

https://github.com/user-attachments/assets/b9b65987-32b1-43f5-bdf0-006ea71c6d13

Kira solving a CAPTCHA end-to-end — one perceive_screen, click-ready pixels, no human in the loop.

Built and tuned for Windows. macOS and Linux are best-effort — most tools work, but some UI conventions differ.

  • Visionperceive_screen is the agent's one-shot "look at the screen" tool. It grabs the current display in memory, runs the local microsoft/OmniParser-v2 YOLO icon-detector on it, and returns an annotated image plus JSON with each element's {id, bbox, cx, cy, confidence} in absolute screen pixels — so the agent can pipe cx, cy straight into mouse_click. No API key, no network call.
  • Desktop automation — pixel-accurate mouse control, keyboard input (incl. chords and key holds), and clipboard read/write via pyautogui, mss, and pyperclip.

The server speaks stdio JSON-RPC and is launched as a child process by your agent host.

Requirements

  • Python 3.10+

  • Platform extras (pyautogui needs them to actually drive input):

    OS Setup
    Windows Nothing extra — primary platform.
    macOS Grant Accessibility permission to the terminal running the server: System Settings → Privacy & Security → Accessibility. First screenshot also prompts for Screen Recording.
    Linux sudo apt install python3-tk python3-dev scrot xdotool (or the equivalent on your distro). X11 sessions only — Wayland blocks raw screen grabs (see Wayland note).

Install

From PyPI (recommended):

pip install kira-mcp

…or, for an isolated global install that won't pollute any project's site-packages:

pipx install kira-mcp

Either form installs the kira-mcp console script and registers every tool module.

The OmniParser-v2 YOLO icon-detector weights (icon_detect/model.pt, ~39 MB) ship inside the wheel — no separate download step. They are loaded and warmed up from disk at server startup.

Working on kira-mcp itself? Clone and install editable: git clone https://github.com/Anmol202005/kira-mcp.git && cd kira-mcp && pip install -e .

If your clone is missing the weights (e.g. a shallow checkout, or you stripped them), restore them with:

hf download microsoft/OmniParser-v2.0 \
  icon_detect/model.pt \
  icon_detect/model.yaml \
  --local-dir src/kira_mcp/weights

Or point to a model.pt elsewhere on disk by setting KIRA_YOLO_WEIGHTS in your environment.

Configure your agent host

Claude Desktop / Claude Code

Add to claude_desktop_config.json (Desktop) or via claude mcp add (Code):

{
  "mcpServers": {
    "kira-mcp": {
      "command": "kira-mcp"
    }
  }
}

Prefer not to rely on the installed script? Use the module form:

{
  "mcpServers": {
    "kira-mcp": {
      "command": "python",
      "args": ["-m", "kira_mcp"]
    }
  }
}

Restart your host. All kira-mcp tools will appear under the kira-mcp namespace.

Cursor / Cline / Continue / Windsurf

Identical shape — point the host's MCP server config at kira-mcp (or python -m kira_mcp).

Tools

Vision

Tool Purpose
perceive_screen One-shot perceive step: screenshots the current display (or a {x, y, width, height} region of it), runs the local OmniParser-v2 YOLO icon-detector on it, and returns BOTH an annotated image inline AND JSON with {width, height, count, elements}. Each element is {id, bbox, cx, cy, confidence} in absolute screen pixels — feed cx, cy directly into mouse_click. Model is loaded and warmed up at server startup, so there is no per-call cold start; typical latency 50-200ms on GPU, 300-800ms on CPU. No API key, no network call.

Mouse

Tool Purpose
mouse_move Move to absolute (x, y). duration=0 for instant.
mouse_position Read the cursor's current (x, y).
mouse_click Click left / middle / right. Optional (x, y) moves first; clicks for multi-click.
mouse_double_click Double-click. Optional (x, y).
mouse_press / mouse_release Hold and later release a button (drag-and-drop primitives).
mouse_drag One-shot: move → press → drag to target → release.
mouse_scroll Scroll up / down / left / right by N clicks.

Keyboard

Tool Purpose
keyboard_type Type literal text.
keyboard_tap Press + release a key chord, e.g. ["ctrl", "c"], ["cmd", "shift", "t"].
keyboard_press / keyboard_release Hold and later release keys (modifier-state primitives).
keyboard_key_check Debug helper — resolve a key name to its pyautogui canonical form.

Key names accept any value from pyautogui.KEYBOARD_KEYS, plus common aliases (ctrl, alt, shift, cmd/command, win/windows/super, meta, esc/escape, enter/return, space/spacebar, pgup/pageup, pgdn/pagedown, del, ins).

Screen

Tool Purpose
screen_size { width, height } of the main display. Useful for bound-checking, though perceive_screen already returns the screen dimensions in its response.

Clipboard

Tool Purpose
clipboard_get Read the system clipboard as text.
clipboard_set Write text to the system clipboard.

Typical agent loop

perceive_screen()                             # → annotated JPEG inline + JSON: {width, height, elements: [{id, bbox, cx, cy, confidence}, …]}
# agent picks an element by id, reads its (cx, cy) — already in absolute screen pixels
mouse_click(x=cx, y=cy)
perceive_screen()                             # verify the action landed

One tool to look, one tool to act, repeat until done.

Layout

src/kira_mcp/
├── __main__.py        # entry — `python -m kira_mcp` or `kira-mcp`
├── _mcp.py            # shared FastMCP instance + system instructions
├── lib/
│   └── keys.py        # key-name normalization for pyautogui
└── tools/
    ├── __init__.py    # side-effect imports → registers tools
    ├── parse.py       # `perceive_screen` — screenshot + local YOLO icon-detector
    ├── screen.py      # `screen_size` + the `Region` model
    ├── mouse.py
    ├── keyboard.py
    └── clipboard.py

Add a new tool by writing a function decorated with @mcp.tool() (imported from kira_mcp._mcp) and importing the module from tools/__init__.py.

Local development

pip install -e .
python -m kira_mcp        # stdio server — drive it from your MCP host

Safety

pyautogui.FAILSAFE is enabled at startup — slamming the mouse to the top-left corner raises FailSafeException and aborts whatever the agent was doing. Leave it on. The server explicitly does not expose a way to disable it from tool calls.

Wayland note

On Linux Wayland sessions, raw X11 screen grabs return a black buffer. GNOME Wayland additionally blocks programmatic screenshots from unprivileged callers. If perceive_screen returns a black image (or no detections at all), log in to an X11 session, or switch to a Wayland compositor that ships wlr-screencopy (Hyprland, Sway, river, Niri) or a KDE Plasma session.

License

MIT — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选