on main help sign in
Merge remote-tracking branch 'origin/main' into show-mcps-correctly
commit26ab7b4295733291ca4422202e4b21ad6e1c1c6e authorKujtim Hoxha <kujtimii.h@gmail.com> dateMon 4 Aug 2025, 17:46 (1 year ago) parent7055d9e87ee7df
4 files changed+27−6
.github/cla-signatures.json+16 go.mod+1−1 go.sum+2−2 internal/llm/agent/mcp-tools.go+8−3
.github/cla-signatures.json+16
@@ -207,6 +207,22 @@
207207 "created_at": "2025-08-03T21:35:15Z",
208208 "repoId": 987670088,
209209 "pullRequestNo": 527
210+ },
211+ {
212+ "name": "Ed4ward",
213+ "id": 153800328,
214+ "comment_id": 3150375016,
215+ "created_at": "2025-08-04T12:16:16Z",
216+ "repoId": 987670088,
217+ "pullRequestNo": 539
218+ },
219+ {
220+ "name": "ngnhng",
221+ "id": 51743767,
222+ "comment_id": 3150846779,
223+ "created_at": "2025-08-04T14:01:30Z",
224+ "repoId": 987670088,
225+ "pullRequestNo": 546
210226 }
211227 ]
212228}
go.mod+1−1
@@ -27,7 +27,7 @@ require (
2727 github.com/google/uuid v1.6.0
2828 github.com/invopop/jsonschema v0.13.0
2929 github.com/joho/godotenv v1.5.1
30− github.com/mark3labs/mcp-go v0.34.0
30+ github.com/mark3labs/mcp-go v0.36.0
3131 github.com/muesli/termenv v0.16.0
3232 github.com/ncruces/go-sqlite3 v0.25.0
3333 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646
go.sum+2−2
@@ -180,8 +180,8 @@ github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69
180180github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0=
181181github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0=
182182github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
183−github.com/mark3labs/mcp-go v0.34.0 h1:eWy7WBGvhk6EyAAyVzivTCprE52iXJwNtvHV6Cv3bR0=
184−github.com/mark3labs/mcp-go v0.34.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
183+github.com/mark3labs/mcp-go v0.36.0 h1:rIZaijrRYPeSbJG8/qNDe0hWlGrCJ7FWHNMz2SQpTis=
184+github.com/mark3labs/mcp-go v0.36.0/go.mod h1:T7tUa2jO6MavG+3P25Oy/jR7iCeJPHImCZHRymCn39g=
185185github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
186186github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
187187github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
internal/llm/agent/mcp-tools.go+8−3
@@ -12,11 +12,9 @@ import (
1212 "github.com/charmbracelet/crush/internal/config"
1313 "github.com/charmbracelet/crush/internal/csync"
1414 "github.com/charmbracelet/crush/internal/llm/tools"
15+ "github.com/charmbracelet/crush/internal/permission"
1516 "github.com/charmbracelet/crush/internal/pubsub"
1617 "github.com/charmbracelet/crush/internal/version"
17−
18− "github.com/charmbracelet/crush/internal/permission"
19−
2018 "github.com/mark3labs/mcp-go/client"
2119 "github.com/mark3labs/mcp-go/client/transport"
2220 "github.com/mark3labs/mcp-go/mcp"
@@ -319,6 +317,7 @@ func createMcpClient(m config.MCPConfig) (*client.Client, error) {
319317 return client.NewStreamableHttpClient(
320318 m.URL,
321319 transport.WithHTTPHeaders(m.ResolvedHeaders()),
320+ transport.WithLogger(mcpHTTPLogger{}),
322321 )
323322 case config.MCPSse:
324323 return client.NewSSEMCPClient(
@@ -329,3 +328,9 @@ func createMcpClient(m config.MCPConfig) (*client.Client, error) {
329328 return nil, fmt.Errorf("unsupported mcp type: %s", m.Type)
330329 }
331330}
331+
332+// for MCP's HTTP client.
333+type mcpHTTPLogger struct{}
334+
335+func (l mcpHTTPLogger) Errorf(format string, v ...any) { slog.Error(fmt.Sprintf(format, v...)) }
336+func (l mcpHTTPLogger) Infof(format string, v ...any) { slog.Info(fmt.Sprintf(format, v...)) }