navicore/gamecode-mcp
If you are the rightful owner of gamecode-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The GameCode MCP Server is a Rust-based Model Context Protocol server designed to integrate dynamic CLI tools for enhanced functionality.
a naive but fun exploration into the MCP ideas ... but replaced with my next effort - see https://github.com/navicore/gamecode-mcp2
GameCode MCP Server
A Rust-based MCP (Model Context Protocol) server that provides dynamic CLI tool integration for Claude through a simple YAML configuration.
Caution: This is early-days for MCP and this is likely an irresponsibly naive implementation - use accordingly!!
Philosophy: Thoughtful Tool Design
LLMs famously don't do well with huge context windows even when they technically support them - so massive tool counts can erode performance.
Also, analogous to how you should design GraphQL schemas around personas and use cases rather than mirroring all your database schemas, you should thoughtfully select and configure your MCP tools. This is why we use YAML configuration instead of automatically consuming OpenAPI specs or DB connection strings for code generation.
Features
Dynamic CLI Tool Integration
The server loads all tools from a tools.yaml
configuration file. This means:
- No hardcoded tools - Everything is configurable
- Add any CLI tool that returns JSON
- Built-in tools included - Basic arithmetic and file operations come pre-configured
- Hot reload - Just restart Claude Desktop after editing tools.yaml
Example Built-in Tools (from tools.yaml)
- add - Add two numbers together
- multiply - Multiply two numbers
- list_files - List files in a directory
All tools are defined in your tools.yaml
file - remove what you don't need, add your own!
Installation
-
Build and install the server:
cargo install --path .
This will install the
gamecode-mcp
binary to your Cargo bin directory (usually~/.cargo/bin/
). -
Make sure your Cargo bin directory is in your PATH:
echo $PATH | grep -q "$HOME/.cargo/bin" || echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.zshrc
Integration with Claude Desktop
-
Configure Claude Desktop using the provided script:
./scripts/configure_claude_code.sh
Or manually add to your MCP configuration:
{ "mcpServers": { "gamecode": { "command": "gamecode-mcp", "args": [], "env": {} } } }
-
Restart Claude Desktop to load the MCP server.
Configuration
The server looks for tools.yaml
in these locations (in order):
- Path specified in
$GAMECODE_TOOLS_FILE
environment variable ./tools.yaml
(current directory - for project-specific tools)~/.config/gamecode-mcp/tools.yaml
(user defaults)
To get started:
# Create config directory
mkdir -p ~/.config/gamecode-mcp
# Copy the example configuration with all built-in tools and documentation
cp tools.yaml.example ~/.config/gamecode-mcp/tools.yaml
# Edit to customize and add your own tools
edit ~/.config/gamecode-mcp/tools.yaml
Adding Your Own CLI Tools
Edit your tools.yaml
file to add new tools:
tools:
- name: my_tool
description: Description of what the tool does
command: /path/to/your/tool
args:
- name: input
description: Input parameter
required: true
type: string
cli_flag: "--input"
example_output:
status: "success"
data: "example output"
Then restart Claude Desktop to load the new tools.
See the examples/
directory for:
- Complete tool configuration examples
- Input/output mapping documentation
- Real-world tool definitions
Testing
Once integrated, you can test the tools in Claude by asking:
- "Use the gamecode run tool to execute add with a=5 and b=3"
- "Use the gamecode run tool to execute multiply with a=4 and b=7"
- "Use the gamecode run tool to execute list_files with path='.'"
- "Use the gamecode list_tools to see all available tools"
Or more naturally:
- "List all available gamecode tools"
- "Add 5 and 3 using gamecode"
- "Show files in the current directory using gamecode"
Development
For development, you can run the server directly:
cargo run
Audit Logging
The server supports optional audit logging of all tool invocations:
# Enable audit logging when configuring the MCP server
claude mcp add gamecode -s local ~/.cargo/bin/gamecode-mcp -- --audit-log ~/.config/gamecode-mcp/audit/
Audit logs are written to daily rotating files in the specified directory:
audit-2024-01-25.jsonl
- One file per dayaudit-2024-01-26.jsonl
- Automatic rotation at midnight
The audit log records:
- Timestamp - When the tool was invoked (UTC)
- Tool name - Which tool was called
- User - System username (from $USER environment variable)
- Hostname - Device identifier for correlation with other logs
Example audit entries:
{"timestamp":"2024-01-25T10:30:00Z","tool_name":"add","user":"jsmith","hostname":"jsmith-macbook.local"}
{"timestamp":"2024-01-25T10:30:01Z","tool_name":"list_files","user":"jsmith","hostname":"lab-desktop-03"}
Security Considerations
Important: For security and privacy reasons, the audit log intentionally does NOT record:
- Tool input parameters
- Tool output/results
- Any sensitive data
This design ensures that sensitive information (passwords, API keys, personal data, etc.) passed to tools is never persisted in audit logs. Organizations should correlate these audit records with other access control and monitoring systems to maintain full visibility while preserving security.
Troubleshooting
-
Server not appearing in Claude: Make sure the binary is in your PATH and Claude Desktop has been restarted.
-
No tools available: The server will show an error message with instructions if no
tools.yaml
is found. Check that your file is in one of the expected locations. -
Tools not working: Check Claude Desktop logs (run with
--mcp-debug
flag) for error messages. Verify your CLI tools return valid JSON. -
Configuration not loading: Ensure
tools.yaml
is valid YAML. You can test with:cat tools.yaml | yq '.'
License
MIT License - see LICENSE file for details