Skip to content

Latest commit

 

History

History
82 lines (55 loc) · 2.4 KB

File metadata and controls

82 lines (55 loc) · 2.4 KB

MCP Server Fixed for Augment Code ✅

Issues Found and Fixed

Issue 1: Field Naming Convention

Problem: Augment sends protocolVersion (camelCase) but server expected protocol_version (snake_case)

Fix: Added #[serde(rename_all = "camelCase")] to protocol structs:

  • InitializeParams
  • InitializeResult
  • ClientInfo
  • ServerInfo

Issue 2: Protocol Version

Problem: Server hardcoded protocol version 2024-11-05 but Augment uses 2025-06-18

Fix: Server now accepts and echoes back the client's protocol version

Testing

The server now works correctly with Augment's messages:

echo '{"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"augment-mcp-client","version":"1.0.0"}},"jsonrpc":"2.0","id":0}' | ./target/release/smart-diff-mcp

Response:

{"jsonrpc":"2.0","id":0,"result":{"capabilities":{"resources":{"list_changed":true,"subscribe":false},"tools":{"list_changed":true}},"protocolVersion":"2025-06-18","serverInfo":{"name":"smart-diff-mcp-server","version":"0.1.0"}}}

Next Steps

  1. Update your Augment configuration to use the regular binary (not the debug wrapper):

    /home/matteius/codediff/target/release/smart-diff-mcp
    
  2. Restart Augment Code or toggle the MCP server off and on

  3. Verify connection: The smart-diff server should now show a green dot (connected)

  4. Test it: Try asking Augment to compare some code:

    Use the smart-diff MCP server to compare /path/to/old with /path/to/new
    

Available Tools

Once connected, Augment can use these tools:

  1. compare_locations - Compare two code locations
  2. list_changed_functions - List functions sorted by change magnitude
  3. get_function_diff - Get detailed diff for a specific function
  4. get_comparison_summary - Get summary statistics

Debug Wrapper (Optional)

If you want to keep debugging, you can still use the debug wrapper:

/home/matteius/codediff/target/release/smart-diff-mcp-debug

Check logs at: /tmp/smart-diff-mcp-debug.log

Changes Made

Files modified:

  • crates/mcp-server/src/mcp/protocol.rs - Added camelCase serialization
  • crates/mcp-server/src/server.rs - Accept client's protocol version

Rebuilt binary:

cargo build --release -p smart-diff-mcp-server

Status

Fixed and Ready

The MCP server now works with Augment Code!