Skip to content

Commit 1b790e9

Browse files
committed
Fix bad accept header by bumping mcp-go to v0.34.0
Fix "Not Acceptable: Client must accept both application/json and text/event-stream" error with http streamable transport by bumping mcp-go to latest which has fix ffc63d90. Closes: #69
1 parent f8dff5d commit 1b790e9

File tree

4 files changed

+10
-7
lines changed

4 files changed

+10
-7
lines changed

cmd/mcptools/commands/shell_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ func TestShellCallCommand(t *testing.T) {
187187
name: "tool_name without params",
188188
input: "test-tool\n/q\n",
189189
expectedOutputs: []string{"Tool executed successfully"},
190-
expectedParams: map[string]any{"name": "test-tool"},
190+
expectedParams: map[string]any{"name": "test-tool", "arguments": map[string]any{}},
191191
mockResponses: map[string]map[string]any{
192192
"tools/call": {
193193
"content": []any{map[string]any{"type": "text", "text": "Tool executed successfully"}},
@@ -198,7 +198,7 @@ func TestShellCallCommand(t *testing.T) {
198198
name: "call tool without params",
199199
input: "call test-tool\n/q\n",
200200
expectedOutputs: []string{"Tool executed successfully"},
201-
expectedParams: map[string]any{"name": "test-tool"},
201+
expectedParams: map[string]any{"name": "test-tool", "arguments": map[string]any{}},
202202
mockResponses: map[string]map[string]any{
203203
"tools/call": {
204204
"content": []any{map[string]any{"type": "text", "text": "Tool executed successfully"}},

cmd/mcptools/commands/test_helpers.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ func (m *MockTransport) Close() error {
5454
return nil
5555
}
5656

57+
// GetSessionId is a no-op for the mock transport
58+
func (m *MockTransport) GetSessionId() string {
59+
return ""
60+
}
61+
5762
// setupMockClient creates a mock client with the given execute function and returns cleanup function.
5863
func setupMockClient(executeFunc func(method string, _ any) (map[string]any, error)) func() {
5964
// Save original function and restore later

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/f/mcptools
33
go 1.24.1
44

55
require (
6-
github.com/mark3labs/mcp-go v0.24.1
6+
github.com/mark3labs/mcp-go v0.34.0
77
github.com/peterh/liner v1.2.2
88
github.com/spf13/cobra v1.9.1
99
github.com/spf13/viper v1.20.1

go.sum

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
1818
github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
1919
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
2020
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
21-
github.com/mark3labs/mcp-go v0.23.1 h1:RzTzZ5kJ+HxwnutKA4rll8N/pKV6Wh5dhCmiJUu5S9I=
22-
github.com/mark3labs/mcp-go v0.23.1/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
23-
github.com/mark3labs/mcp-go v0.24.1 h1:YV+5X/+W4oBdERLWgiA1uR7AIvenlKJaa5V4hqufI7E=
24-
github.com/mark3labs/mcp-go v0.24.1/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
21+
github.com/mark3labs/mcp-go v0.34.0 h1:eWy7WBGvhk6EyAAyVzivTCprE52iXJwNtvHV6Cv3bR0=
22+
github.com/mark3labs/mcp-go v0.34.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
2523
github.com/mattn/go-runewidth v0.0.3/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
2624
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
2725
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=

0 commit comments

Comments
 (0)