1.3 KiB
1.3 KiB
Context - gocp Project
CRITICAL INSTRUCTIONS - MUST FOLLOW
-
Simple commits: One-line commit messages ONLY. NEVER add "Generated by Claude" footers, emojis, or any multi-line messages. Just describe what changed in one line.
-
Minimal comments: Only add comments when absolutely critical for disambiguation
-
Never use
go build: Always usego runinstead ofgo buildfor testing Go programs -
Never change directories: Never change directories with
cd- always use absolute paths instead -
Error handling: Always propagate errors with proper messages, never silently handle errors
Project Overview
gocp is a Go MCP (Model Context Protocol) server that provides tools for building and executing Go code. It uses the go-mcp library to implement the MCP protocol.
Key Files
main.go: MCP server implementation with build_and_run_go toolgo.mod: Module definition with go-mcp dependency
Tool Details
- build_and_run_go: Executes Go code using
go run- Parameters:
code(required): Go source code to executetimeout(optional): Timeout in seconds (default: 30)
- Returns JSON with:
stdout: Standard outputstderr: Standard errorexit_code: Process exit codeerror: Error message if any
- Creates temporary directories with
gocp-*prefix
- Parameters: