ElfDeckAI
Virtual keyboard, gamepad and mouse plus screenshots so an AI can play on Linux
ElfDeckAI is an open-source MCP server for games and play. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- Linux, CLI
- Runs
- Locally
- What it can do
- Can change data (2 tools)
- Version
- 1.1.3
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add elfdeckai -- uvx elfdeckaiAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"elfdeckai": {
"command": "uvx",
"args": [
"elfdeckai"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"elfdeckai": {
"command": "uvx",
"args": [
"elfdeckai"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"elfdeckai": {
"command": "uvx",
"args": [
"elfdeckai"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"elfdeckai": {
"type": "stdio",
"command": "uvx",
"args": [
"elfdeckai"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add elfdeckai -- uvx elfdeckaiOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.elfdeckai]
command = "uvx"
args = ["elfdeckai"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"elfdeckai": {
"command": "uvx",
"args": [
"elfdeckai"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "elfdeckai": { "command": "uvx", "args": [ "elfdeckai" ] } } }Or run: gemini mcp add -s user elfdeckai uvx -- elfdeckai
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "elfdeckai": { "command": "uvx", "args": [ "elfdeckai" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "elfdeckai": { "command": "uvx", "args": [ "elfdeckai" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "elfdeckai": { "command": "uvx", "args": [ "elfdeckai" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "elfdeckai": { "command": "uvx", "args": [ "elfdeckai" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "elfdeckai": { "command": "uvx", "args": [ "elfdeckai" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "elfdeckai": { "command": "uvx", "args": [ "elfdeckai" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "elfdeckai": { "command": "uvx", "args": [ "elfdeckai" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About ElfDeckAI
ElfDeckAI lets an assistant such as Claude see the screen and press the buttons itself, with Steam Deck as its main target. Three small single-file Python programs create virtual input devices through the Linux kernel's /dev/uinput: a keyboard, an Xbox 360-class gamepad with analog triggers, two sticks and a D-pad, and a mouse that can click an exact point. Games and Steam see them as real hardware, so nothing depends on a particular game or emulator.
The MCP server exposes 22 tools over stdio, including a screenshot tool that returns a PNG so the agent can look, act and look again. Mouse coordinates are in pixels of the most recent screenshot, and large screens are scaled down to 1280 pixels by default. On a Steam Deck the PC's AI app launches the server over SSH, and the setup scripts configure Claude Desktop. It also works in Gaming and Desktop Mode, on wlroots compositors and X11.
The README says it played Pokemon FireRed in RetroArch through the first rival battle using screenshots alone, and that turn-based games, RPGs, puzzles and menus work best because each move takes a second or more.
Tools this server provides (22)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 2 of 22 tools change data; 20 names don't say.
From the server's own tool labels and tool names; not verified by us.
- key_tap
- Taps a keyboard key.
- key_down
- Holds a keyboard key.
- key_up
- Releases a held key.
- key_release
- Releases every held key.
- pad_press
- Taps a gamepad button or D-pad direction.
- pad_down
- Holds a gamepad button.
- pad_up
- Releases a gamepad button.
- pad_stick
- Sets an analog stick position.
- pad_trigger
- Sets an analog trigger.
- pad_center
- Returns sticks, triggers and D-pad to neutral.
- pad_reset
- Releases everything on the gamepad.
- mouse_click_at
- Clicks at pixel coordinates from the latest screenshot.
- mouse_move_toName suggests: changes
- Moves the pointer to screenshot pixel coordinates.
- mouse_moveName suggests: changes
- Moves the pointer relatively.
- mouse_click
- Clicks a mouse button.
- mouse_down
- Holds a mouse button.
- mouse_up
- Releases a mouse button.
- mouse_scroll
- Scrolls vertically.
- mouse_hscroll
- Scrolls horizontally.
- mouse_release
- Releases all mouse buttons.
- screenshot
- Captures the screen as a PNG.
- wait
- Pauses between actions.
What it does
- Virtual gamepad
- Emulates an Xbox 360-class controller that SDL, Steam Input and RetroArch recognise.
- Virtual keyboard and mouse
- Taps keys and clicks exact screen points.
- Screenshot loop
- Returns a PNG so the agent can look, act and look again.
- Steam Deck setup
- Install and PC setup scripts configure Claude Desktop over SSH.
- Validated calls
- Each tool call is checked before anything is written.
- No dependencies
- Single-file Python using only the standard library.
Good for
- Let an AI play a turn-based game on a Steam Deck
- Automate menu navigation on a Linux desktop
- Drive an emulator through its gamepad input
- Test a Linux UI with simulated mouse and keyboard
Pricing
Open source
ElfDeckAI FAQ
Which games work best?
Turn-based games, RPGs, puzzles and menus; fast action games are out of reach.
Does ElfDeckAI work outside Steam Deck?
Yes, on other Linux machines, with a udev rule for /dev/uinput on most distributions.
How does the PC connect to the Deck?
Over SSH using a key, started by the AI app on the Deck.
How many tools are there?
22 across keyboard, gamepad, mouse, vision and timing.
Is ElfDeckAI free?
Yes. ElfDeckAI is open source, so you can use and self-host it for free.
How do I add ElfDeckAI to Claude Code?
Run this command in your terminal: claude mcp add elfdeckai -- uvx elfdeckai
What are the best alternatives to ElfDeckAI?
The closest alternatives to ElfDeckAI are REA, Context7, Chrome DevTools MCP, Codebase Memory and GitHub.
Where this comes from
- Description: written from the project's README.
- Install steps: from the official MCP Registry entry.


