Skip to content
Back to search

Plugin_MCPServer

MCP server plugin for Genie4

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/digitalnyc1--plugin-mcpserver/badge.svg)](/listings/digitalnyc1--plugin-mcpserver)

HTML

<a href="/listings/digitalnyc1--plugin-mcpserver"><img src="/api/listings/digitalnyc1--plugin-mcpserver/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 74 lines
  1. # Plugin_MCPServer
  2. A [Genie4](https://github.com/GenieClient/Genie4) plugin that hosts a minimal [Model Context Protocol](https://modelcontextprotocol.io/) (MCP) server inside the Genie client. AI clients (Copilot, Claude, etc.) can read DragonRealms game output, send commands, and query Genie variables.
  3. The server speaks JSON-RPC 2.0 over HTTP POST (protocol version `2025-03-26`) and uses `System.Net.HttpListener`. There is no SSE/streaming support.
  4. ## Requirements
  5. - .NET 10 (`net10.0-windows`)
  6. - Genie4 with `Interfaces.dll` (referenced from the project directory)
  7. ## Build and install
  8. 1. Build the project: `dotnet build -c Release`
  9. 2. Copy the output `MCPServer.dll` to Genie's `Plugins` folder.
  10. 3. Start Genie and load the plugin. It starts the server on load and echoes the listening address.
  11. Use the plugin's `Show` action to echo the current endpoint again.
  12. ## Configuration
  13. On first load the plugin sets these Genie variables if they are empty:
  14. | Variable | Default | Description |
  15. |---|---|---|
  16. | `MCPServer.Host` | `localhost` | Host to bind. `0.0.0.0`, `*` or `+` bind all interfaces (may require admin rights/URL ACL on Windows). |
  17. | `MCPServer.Port` | `8765` | TCP port. |
  18. | `MCPServer.Endpoint` | `mcp` | URL path. |
  19. Endpoint: `http://{Host}:{Port}/{Endpoint}/`, e.g. `http://localhost:8765/mcp/`.
  20. Change a variable with `#var MCPServer.Port 9000`, then reload the plugin; the listener is only bound at startup.
  21. ## Tools
  22. | Tool | Arguments | Description |
  23. |---|---|---|
  24. | `read_game_text` | `sinceId` (int, default 0), `maxLines` (int, default 100), `source` (`text`, `xml`, `all`; default `text`) | Returns buffered lines as `[id] text`, ending with `lastId=N`. Pass `lastId` as `sinceId` to poll for new output. |
  25. | `send_command` | `command` (string, required) | Sends a command to the game as if typed. |
  26. | `clear_game_text` | none | Clears the buffer. |
  27. | `get_variable` | `name` (string, required) | Returns a Genie variable's value. |
  28. Supported MCP methods: `initialize`, `ping`, `tools/list`, `tools/call`. Notifications are accepted (HTTP 202) and batches are supported.
  29. ## Behavior notes
  30. - Game text (`ParseText`) and XML (`ParseXML`) are buffered in memory, up to the latest 2000 lines.
  31. - Buffering stops when the plugin is disabled.
  32. - There is no authentication. Keep the host on `localhost` unless you trust the network, since `send_command` can control your character.
  33. ## Client configuration
  34. Visual Studio (`.mcp.json`) or VS Code (`.vscode/mcp.json`):
  35. ```json
  36. {
  37. "servers": {
  38. "genie": {
  39. "type": "http",
  40. "url": "http://localhost:8765/mcp/"
  41. }
  42. }
  43. }
  44. ```
  45. ## Testing
  46. With Genie running and connected, ask your AI client to "read the latest game text" or "send the command `look`".
  47. Or call the server directly:
  48. ```powershell
  49. Invoke-RestMethod -Uri http://localhost:8765/mcp/ -Method Post -ContentType application/json -Body '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
  50. ```

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.