-
Notifications
You must be signed in to change notification settings - Fork 32
Auto-detect and inspect safe-inputs in MCP inspect with Go SDK #5709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Modified spawnSafeInputsInspector to use workflow compiler's ParseWorkflowFile - This ensures imported safe-inputs from shared workflows are properly resolved - Updated TestSpawnSafeInputsInspector_WithSafeInputs to use compiler - Added TestSpawnSafeInputsInspector_WithImportedSafeInputs test case - Tested with copilot-pr-merged-report workflow which imports shared/gh.md Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot once the safe-inputs are resolved and the safe-inputs server is started, do an inspection using the go-sdk just like the other mcp servers like github. Do not use the node.js mcp inspector. |
- Modified spawnSafeInputsInspector to use inspectMCPServer with Go SDK - Removed npx dependency check since we no longer launch the Node.js inspector - Creates MCPServerConfig for safe-inputs HTTP server and inspects it like other MCP servers - Shows tools in formatted table with allow/not-allow status - Tests still pass as they validate file generation, not inspector behavior Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in d3b8fb3. The safe-inputs inspector now uses the Go SDK ( The Node.js Output example: |
|
@copilot remove the --safe-inputs flag and always point the safeinputs server when present in the agentic workflow |
|
@copilot server name is "safeinputs" no dash |
- Removed --safe-inputs flag from mcp inspect command - Modified InspectWorkflowMCP to use compiler.ParseWorkflowFile for import resolution - Automatically detect and start safe-inputs server when present in workflow - Created startSafeInputsServer helper function to handle server startup - Safe-inputs server is now inspected alongside other MCP servers - Updated help text to reflect automatic safe-inputs detection - All tests pass, fmt and lint clean Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done in 929a5e4. The Output example: The |
|
@copilot server name is "safeinputs" no dash |
- Remove duplicate workflow parsing (use compiler only for safe-inputs detection) - Simplify process cleanup by removing platform-specific signal checks - Remove unused syscall import - Tests and lint pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Restore frontmatter validation with warnings in verbose mode - Improve comments for process cleanup to explain error handling - Continue inspection even if validation fails (non-blocking) - Tests and lint pass Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
- Changed MCP server name from "safe-inputs" to "safeinputs" (no dash) - Updated in both startSafeInputsServer and spawnSafeInputsInspector functions - Tests pass, lint clean Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Fixed in de95dfd. Server name changed from "safe-inputs" to "safeinputs" (no dash). Output:
Fixed in de95dfd. Server name changed from "safe-inputs" to "safeinputs" (no dash). Output: |
Document three user-facing features from December 6-7: 1. gh aw init now creates .github/aw/logs/.gitignore (#5712) - Prevents workflow logs from being committed 2. Fuzzy workflow name matching (#5710) - Added Smart Features section with examples - Documents typo suggestions across all commands - Explains Levenshtein distance matching algorithm 3. Auto-detection of safe-inputs in mcp inspect (#5709) - Clarified that safe-inputs are automatically detected - Removed reference to deprecated --safe-inputs flag - Documents imported safe-inputs support 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
mcp inspect --safe-inputsshould resolve imported safe-inputs from shared workflowsspawnSafeInputsInspectorto use workflow compiler to parse and merge importsSummary
Successfully implemented automatic safe-inputs detection and inspection in the MCP inspect command. The
gh aw mcp inspectcommand now:Changes
InspectWorkflowMCPto parse MCP servers from frontmatter, then separately use compiler for safe-inputs detectionstartSafeInputsServerhelper function to start the safe-inputs HTTP server--safe-inputsflag and updated help textTesting
Verified with
copilot-pr-merged-report.mdwhich importsshared/gh.md:ghtool without any flagOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.