{"id":30969751,"url":"https://github.com/standardbeagle/mcp-debug","last_synced_at":"2026-01-07T09:05:38.119Z","repository":{"id":307485206,"uuid":"1029674262","full_name":"standardbeagle/mcp-debug","owner":"standardbeagle","description":"The essential debugging and development tool for MCP servers - hot-swapping, recording, and automated testing","archived":false,"fork":false,"pushed_at":"2025-07-31T12:16:26.000Z","size":24474,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-31T15:31:56.690Z","etag":null,"topics":["debugging","development","golang","hot-swap","mcp","proxy","recording","testing"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/standardbeagle.png","metadata":{"files":{"readme":"README-old.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-31T11:55:42.000Z","updated_at":"2025-07-31T12:16:30.000Z","dependencies_parsed_at":"2025-07-31T15:47:57.311Z","dependency_job_id":null,"html_url":"https://github.com/standardbeagle/mcp-debug","commit_stats":null,"previous_names":["standardbeagle/mcp-debug"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/standardbeagle/mcp-debug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standardbeagle%2Fmcp-debug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standardbeagle%2Fmcp-debug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standardbeagle%2Fmcp-debug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standardbeagle%2Fmcp-debug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/standardbeagle","download_url":"https://codeload.github.com/standardbeagle/mcp-debug/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/standardbeagle%2Fmcp-debug/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274738205,"owners_count":25340251,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["debugging","development","golang","hot-swap","mcp","proxy","recording","testing"],"created_at":"2025-09-12T01:38:00.423Z","updated_at":"2026-01-07T09:05:38.080Z","avatar_url":"https://github.com/standardbeagle.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dynamic MCP Server\n\nA Model Context Protocol (MCP) server implementation in Go with stdio transport and comprehensive CLI tooling.\n\n## Features\n\n- MCP server with stdio transport for Claude Desktop integration\n- CLI detection with helpful usage information\n- Built-in tool testing and configuration management\n- Hello World example tool implementation\n- Environment variable management\n- Dual-mode operation (MCP server and CLI tool)\n\n## Installation\n\n```bash\n# Clone or navigate to this directory\ncd dynamic-mcp\n\n# Install dependencies\ngo mod download\n\n# Build the server\ngo build -o mcp-server\n\n# Make it executable (Unix/Linux/macOS)\nchmod +x mcp-server\n```\n\n## Usage\n\n### CLI Mode\n\nWhen run directly from the command line, the server detects it's not being called by an MCP client and provides helpful CLI tools:\n\n```bash\n# Show help\n./mcp-server --help\n\n# Show version\n./mcp-server --version\n\n# Test the hello_world tool\n./mcp-server test hello_world name=\"Alice\"\n\n# List all available tools\n./mcp-server tools list\n\n# Describe a specific tool\n./mcp-server tools describe hello_world\n\n# Run tools with CLI interface\n./mcp-server tools run hello_world --name \"Bob\"\n```\n\n### Configuration Management\n\n```bash\n# Initialize configuration\n./mcp-server config init\n\n# Show configuration file path\n./mcp-server config path\n\n# Set configuration values\n./mcp-server config set api_key \"your-api-key\"\n./mcp-server config set database_url \"postgres://localhost/mydb\"\n\n# Show current configuration\n./mcp-server config show\n```\n\n### Environment Variables\n\n```bash\n# Generate .env template\n./mcp-server env template \u003e .env\n\n# List environment variables\n./mcp-server env list\n\n# Check required environment variables\n./mcp-server env check\n\n# Validate environment\n./mcp-server env validate\n```\n\n### MCP Server Mode\n\nTo use with Claude Desktop or other MCP clients:\n\n1. Build the server:\n   ```bash\n   go build -o mcp-server\n   ```\n\n2. Add to Claude Desktop configuration (`claude_desktop_config.json`):\n   ```json\n   {\n     \"mcpServers\": {\n       \"dynamic-mcp\": {\n         \"command\": \"/full/path/to/mcp-server\"\n       }\n     }\n   }\n   ```\n\n3. Restart Claude Desktop\n\n4. The server's tools will be available in your Claude conversations\n\n## Available Tools\n\n### hello_world\nSay hello to someone.\n\n**Parameters:**\n- `name` (string, required): Name of person to greet\n\n**Example:**\n```\nTool: hello_world\nArguments: {\"name\": \"World\"}\nResult: \"Hello, World!\"\n```\n\n## Environment Variables\n\n- `MCP_DEBUG`: Set to `1` to enable debug logging\n- `MCP_CONFIG_PATH`: Path to configuration file (default: `./config.json`)\n\n## Development\n\n### Adding New Tools\n\nTo add a new tool to the server:\n\n1. Define the tool schema:\n   ```go\n   tool := mcp.NewTool(\"tool_name\",\n       mcp.WithDescription(\"Tool description\"),\n       mcp.WithString(\"param_name\",\n           mcp.Required(),\n           mcp.Description(\"Parameter description\"),\n       ),\n   )\n   ```\n\n2. Create a handler function:\n   ```go\n   func toolHandler(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {\n       // Implementation\n   }\n   ```\n\n3. Register the tool:\n   ```go\n   s.AddTool(tool, toolHandler)\n   ```\n\n4. Update CLI commands to include the new tool in listings and test commands\n\n### Testing\n\nTest your tools directly using the CLI:\n\n```bash\n# Test with simple syntax\n./mcp-server test tool_name param=\"value\"\n\n# Test with CLI syntax\n./mcp-server tools run tool_name --param \"value\"\n```\n\n### Building with Version Information\n\n```bash\ngo build -ldflags \"-X main.BuildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -X main.GitCommit=$(git rev-parse HEAD)\" -o mcp-server\n```\n\n## MCP Inspector Testing\n\nYou can test the server using MCP Inspector:\n\n```bash\n# Install MCP Inspector\nnpm install -g @modelcontextprotocol/inspector\n\n# Test the server\nmcp-inspector ./mcp-server\n```\n\n## Security Notes\n\n- Store sensitive configuration in environment variables\n- Use secure file permissions (600) for config files\n- Validate all inputs to prevent injection attacks\n- Never commit secrets to version control\n\n## Troubleshooting\n\n### Server won't start in Claude Desktop\n- Check that the path in `claude_desktop_config.json` is absolute\n- Ensure the binary is executable: `chmod +x mcp-server`\n- Check logs for any error messages\n\n### CLI detection not working\n- The server detects CLI usage by checking if stdin is a TTY\n- If running through a script, it may think it's being called by an MCP client\n- Use explicit CLI commands to force CLI mode\n\n## Resources\n\n- [Model Context Protocol Documentation](https://modelcontextprotocol.io/)\n- [MCP Go Library (mark3labs)](https://github.com/mark3labs/mcp-go)\n- [Claude Desktop MCP Integration](https://docs.anthropic.com/en/docs/claude-code/mcp)\n\n## License\n\nThis project is provided as-is for educational and development purposes.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstandardbeagle%2Fmcp-debug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstandardbeagle%2Fmcp-debug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstandardbeagle%2Fmcp-debug/lists"}