nexus6-haiku/GenioMCPServer
If you are the rightful owner of GenioMCPServer and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The Genio MCP Server is a Model Context Protocol server designed for the Genio IDE on Haiku, providing seamless integration with Claude Code through the BMessage scripting API.
Genio MCP Server
MCP (Model Context Protocol) server for Genio IDE on Haiku. Provides Claude Code with direct access to Genio's editor through the BMessage scripting API.
Features
Editor State & Navigation:
get_editor_state- Current file, cursor, selection, modified state, visible lines, scroll positionnavigate_to- Open file at specific line:column
Editor Content:
read_editor_buffer- Read current editor contentwrite_editor_buffer- Replace entire buffer
Text Editing:
insert_at_cursor- Insert or replace selectionappend_to_file- Append to end of fileundo/redo- Undo/redo operations
Quick Start
Prerequisites
# On Haiku
pkgman install nim # Nim >= 2.0.0
Build & Install
# Build server (auto-installs dependencies)
nimble build
# Run tests (requires Genio running)
nimble test
# Add to Claude Code
claude mcp add --transport stdio genio -- $PWD/genio_mcp_server
Or configure manually in ~/.config/claude-code/config.json:
{
"mcpServers": {
"genio": {
"command": "/path/to/genio_mcp_server",
"transport": "stdio"
}
}
}
Configuration
Build settings are in:
genio_mcp_server.nimble- Package metadata, dependencies, backend selectionnim.cfg- Compiler flags (C++ backend required, links-lbe)
Architecture
The server has two layers:
- MCP Layer (
src/genio_mcp_server.nim) - JSON-RPC over stdio usingnimcp - Genio Interface (
src/genio_interface.nim) - Self-contained Haiku API FFI bindings
Communication with Genio uses Haiku's BMessage protocol:
var msg = newBMessage(MSG_GET_PROPERTY)
msg.addSpecifier("CaretPosition")
msg.addSpecifier("SelectedEditor")
let reply = genio.sendMessage(msg)
Development
Adding Tools
Add tools in src/genio_mcp_server.nim:
mcpTool:
proc my_tool(arg: string): string =
## Tool description
{.cast(gcsafe).}:
let result = genio.someOperation(arg)
if result.isSome: return result.get()
else: raise newException(IOError, "Failed")
Testing
nimble test
18 tests covering connection, navigation, editor state, text operations, and undo/redo.
Troubleshooting
Server won't connect:
- Ensure Genio is running
- Run
./genio_mcp_server- should see "Connected to Genio IDE"
Build errors:
nimcp not found- Runnimble install nimcpBApplication undefined- Install Haiku dev headers:pkgman install haiku_devel
License
MIT