-
Notifications
You must be signed in to change notification settings - Fork 8
Comparing changes
Open a pull request
base repository: smart-mcp-proxy/mcpproxy-go
base: main@{1day}
head repository: smart-mcp-proxy/mcpproxy-go
compare: main
- 9 commits
- 31 files changed
- 2 contributors
Commits on Nov 15, 2025
-
feat: add JavaScript code execution tool with full observability
Implement JavaScript code execution feature for orchestrating multiple upstream MCP tools in a single request. This reduces round-trip latency and enables complex multi-step workflows with conditional logic, loops, and data transformations. ## Core Features - Sandboxed JavaScript (ES5.1+) execution using Goja - call_tool() function for invoking upstream MCP servers - Execution limits (timeout, max_tool_calls, allowed_servers) - Concurrent execution pool with configurable size - Feature toggle (disabled by default for security) ## Observability - execution_id tracking for log correlation - Pool metrics (size, available, in-use) - Acquisition/release duration tracking - Tool call timing and result logging - Thread-safe metrics collection ## Security - Sandbox restrictions (no require, fs, network access) - Timeout enforcement with watchdog goroutine - Server whitelist support - Max tool calls limit to prevent abuse ## Developer Experience - CLI command: mcpproxy code exec - Comprehensive documentation (overview, examples, API reference, troubleshooting) - 19 unit tests with 100% pass rate ## Configuration - enable_code_execution: false (default) - code_execution_timeout_ms: 120000 (2 minutes) - code_execution_max_tool_calls: 0 (unlimited) - code_execution_pool_size: 10 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 36899fa - Browse repository at this point
Copy the full SHA 36899faView commit details -
fix: register code_execution tool in CallBuiltInTool and CallToolDire…
…ct methods Add missing code_execution operation constant and register it in all tool routing methods to enable CLI command support. - Add operationCodeExecution constant - Add case in CallBuiltInTool switch statement - Add case in CallToolDirect switch statement - Add to proxyTools map in handleCallTool - Add to proxy tool routing switch statement This fixes the 'unknown built-in tool: code_execution' error when using the mcpproxy code exec CLI command. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 29d6b47 - Browse repository at this point
Copy the full SHA 29d6b47View commit details -
feat: add MCP session tracking and parent-child call linking
Add comprehensive session tracking for MCP tool calls with UI display: - Track MCP session ID, client name, and client version from InitializeRequest - Link nested tool calls (from code_execution) to their parent calls - Add 5 new optional fields to ToolCallRecord: parent_call_id, execution_type, mcp_session_id, mcp_client_name, mcp_client_version - Create thread-safe session store for capturing client metadata - Display session information in Tool Call History UI with Session column - Show full session details and JavaScript code in expanded row view - Support error status display with red badge and error messages - Include test data generator for populating sample records Backend changes: - internal/server/session_store.go: Thread-safe session metadata storage - internal/server/mcp.go: OnRegisterSession hook for capturing client info - internal/server/mcp_code_execution.go: Parent-child linking for nested calls - internal/runtime/runtime.go: API conversion includes new session fields - internal/storage/server_identity.go: Extended ToolCallRecord schema - internal/contracts/types.go: API response types with session fields Frontend changes: - frontend/src/types/api.ts: TypeScript types for session tracking - frontend/src/views/ToolCalls.vue: Session column, Monaco editor for code, parent call navigation Testing: - cmd/populate-test-data: Tool to generate test records with session data 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for afe19cd - Browse repository at this point
Copy the full SHA afe19cdView commit details -
fix: allow 0 for code execution config defaults in validation
Changes: - Updated Validate() to apply defaults for code_execution fields before validation - Modified ValidateDetailed() to allow 0 values (treat as "use default") - Fixed test failures in TestValidateDetailed and TestValidateWithDefaults Fields affected: - CodeExecutionTimeoutMs: 0 or 1-600000 (default: 120000) - CodeExecutionPoolSize: 0 or 1-100 (default: 10) - CodeExecutionMaxToolCalls: >= 0 (0 means unlimited) This ensures configs without these fields can still validate successfully.
Configuration menu - View commit details
-
Copy full SHA for 76f9d03 - Browse repository at this point
Copy the full SHA 76f9d03View commit details
Commits on Nov 16, 2025
-
Merge pull request #138 from smart-mcp-proxy/001-code-execution
feat: JavaScript Code Execution Tool with Full Observability
Configuration menu - View commit details
-
Copy full SHA for acbfe68 - Browse repository at this point
Copy the full SHA acbfe68View commit details -
fix: include code_execution parent calls in tool call history and add…
… token metrics for nested calls This commit fixes two issues in the tool call history feature: 1. **Code execution parent calls not visible**: The `GetToolCalls()` method in `internal/runtime/runtime.go` only queried buckets for servers registered in `server_identities`, which excluded the built-in "code_execution" pseudo-server. Now explicitly fetches from the `server_code_execution_tool_calls` bucket. 2. **Missing token metrics for nested calls**: Nested tool calls executed within `code_execution` did not calculate token counts. Added tokenizer integration to `storeToolCallInHistory()` in `internal/server/mcp_code_execution.go` to compute input/output/total tokens and encoding for nested calls. Changes: - internal/runtime/runtime.go:694-700: Added code to fetch code_execution tool calls - internal/server/mcp_code_execution.go:264: Added mainServer field to upstreamToolCaller - internal/server/mcp_code_execution.go:109: Pass mainServer to upstreamToolCaller - internal/server/mcp_code_execution.go:360-408: Calculate token metrics for nested calls Related to code execution observability and parent-child call tracking. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 585df2f - Browse repository at this point
Copy the full SHA 585df2fView commit details -
feat: add token metrics for code_execution parent calls and improve UI
Backend Changes: - Add token metrics calculation for parent code_execution tool calls - Count input tokens from both code and input arguments - Count output tokens from execution result - Use same tokenizer pattern as nested calls for consistency Frontend Changes: - Make Monaco editor resizable (vertical resize, 150px-600px range) - Add copy button for JavaScript code section (matches Arguments/Response pattern) - Set default Monaco editor height to 250px for better code visibility - Add visual feedback for copy action (checkmark icon, 2-second toast) All three issues from user feedback are now resolved: 1. ✅ Code execution parent calls show token metrics 2. ✅ Monaco editor is resizable and has proper default height 3. ✅ Copy button available for JavaScript code section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 86083cc - Browse repository at this point
Copy the full SHA 86083ccView commit details -
fix: make Monaco editor properly fill resizable container
The Monaco editor was not responding to the resizable container because it needed absolute positioning instead of flexbox to work correctly with the VueMonacoEditor component. Changes: - Remove height prop from VueMonacoEditor component - Change container to use position: relative - Position monaco-wrapper absolutely to fill container (top/left/right/bottom: 0) - Set Monaco editor to width: 100%, height: 100% This allows the container to be resized vertically (150px-600px range) and the Monaco editor will properly fill the resized space. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 4603a6d - Browse repository at this point
Copy the full SHA 4603a6dView commit details -
Merge pull request #139 from smart-mcp-proxy/fix/tool-call-history-co…
…de-execution fix: include code_execution parent calls in tool call history and add token metrics for nested calls
Configuration menu - View commit details
-
Copy full SHA for 64adf50 - Browse repository at this point
Copy the full SHA 64adf50View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff main@{1day}...main