Skip to content

feat: wire MCP server dead-code and impact tools to dedicated API endpoints #27

@jonathanpopham

Description

@jonathanpopham

Context

The MCP server (internal/mcp/server.go) has inline implementations of findDeadFunctions and findAffected that do naive graph traversal (same approach the CLI commands used before #23 and #25). Now that client.DeadCode() and client.Impact() exist, the MCP tools should use them.

Current state

  • dead_code MCP tool: inline graph edge counting (checks calls/contains_call edges)
  • blast_radius MCP tool: inline reverse BFS on imports edges

Proposed change

  • dead_code tool → call client.DeadCode(), return rich results (confidence, line, reason)
  • blast_radius tool → call client.Impact(), return risk scores, affected files, entry points

Dependencies

Notes

  • VSA: changes are isolated to internal/mcp/server.go
  • The MCP tool schemas (inputSchema) will need updating to expose new params (min_confidence, limit, diff)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions