Commit dc8d81e

mo khan <mo@mokhan.ca>
2025-08-15 15:02:14
chore: upgrade to the latest protocol version
1 parent af932f0
Changed files (13)
cmd/fetch/README.md
@@ -37,7 +37,7 @@ mcp-fetch
 #### Basic Testing
 ```bash
 # Test server initialization
-echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-fetch
+echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-fetch
 
 # List available tools
 echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | timeout 5s mcp-fetch
cmd/filesystem/main.go
@@ -37,21 +37,6 @@ EXAMPLE USAGE:
 
     # Create and read a file
     echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": {"name": "write_file", "arguments": {"path": "/tmp/test.txt", "content": "Hello!"}}}' | mcp-filesystem --allowed-directory /tmp
-
-MCP CAPABILITIES:
-    - Tools: read_file, write_file (ultra-minimal for efficiency)
-    - Resources: file:// URIs with automatic programming file discovery
-    - Security: Path validation and directory restrictions
-    - Protocol: JSON-RPC 2.0 over stdio
-    - Performance: <10ms startup, <5MB memory, 92%% token reduction
-
-DESIGN PHILOSOPHY:
-    This server provides only essential file operations. For advanced operations:
-    - Directory listing: Use bash MCP server (ls command)
-    - File search: Use bash MCP server (find/grep commands)
-    - File editing: Use read-modify-write pattern
-
-For detailed documentation, see: cmd/filesystem/README.md
 `)
 }
 
cmd/filesystem/README.md
@@ -38,7 +38,7 @@ mcp-filesystem --allowed-directory <path1> [--allowed-directory <path2> ...]
 #### Basic Testing
 ```bash
 # Test server initialization
-echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-filesystem --allowed-directory /tmp
+echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-filesystem --allowed-directory /tmp
 
 # List available tools
 echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | timeout 5s mcp-filesystem --allowed-directory /tmp
cmd/git/main.go
@@ -32,7 +32,7 @@ EXAMPLE USAGE:
     mcp-git --repository /path/to/repo
 
     # Test with MCP protocol
-    echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | mcp-git
+    echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | mcp-git
 
 ADDING TO CLAUDE CODE:
     # Add to Claude Code for current directory
cmd/git/README.md
@@ -38,7 +38,7 @@ mcp-git --repository <path>
 #### Basic Testing
 ```bash
 # Test server initialization
-echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-git --repository .
+echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-git --repository .
 
 # List available tools
 echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | timeout 5s mcp-git --repository .
cmd/maildir/README.md
@@ -38,7 +38,7 @@ mcp-maildir --maildir-path <path1> [--maildir-path <path2> ...]
 #### Basic Testing
 ```bash
 # Test server initialization
-echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-maildir --maildir-path ~/.local/share/mail
+echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-maildir --maildir-path ~/.local/share/mail
 
 # List available tools
 echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | timeout 5s mcp-maildir --maildir-path ~/.local/share/mail
cmd/memory/README.md
@@ -38,7 +38,7 @@ mcp-memory [--memory-file <path>]
 #### Basic Testing
 ```bash
 # Test server initialization
-echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-memory
+echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-memory
 
 # List available tools
 echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | timeout 5s mcp-memory
cmd/sequential-thinking/README.md
@@ -48,7 +48,7 @@ mcp-sequential-thinking --session-file /path/to/sessions.json
 #### Basic Testing
 ```bash
 # Test server initialization
-echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-sequential-thinking
+echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-sequential-thinking
 
 # List available tools
 echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | timeout 5s mcp-sequential-thinking
cmd/time/README.md
@@ -37,7 +37,7 @@ mcp-time
 #### Basic Testing
 ```bash
 # Test server initialization
-echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-time
+echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2025-06-18", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | timeout 5s mcp-time
 
 # List available tools
 echo '{"jsonrpc": "2.0", "id": 2, "method": "tools/list", "params": {}}' | timeout 5s mcp-time
pkg/filesystem/server.go
@@ -373,4 +373,4 @@ func expandHome(filePath string) string {
     return filepath.Join(homeDir, filePath[2:])
   }
   return filePath
-}
\ No newline at end of file
+}
pkg/mcp/server.go
@@ -252,7 +252,7 @@ func (s *Server) handleInitialize(req JSONRPCRequest) JSONRPCResponse {
 	}
 
 	result := InitializeResult{
-		ProtocolVersion: "2024-11-05",
+		ProtocolVersion: "2025-06-18",
 		Capabilities:    s.capabilities,
 		ServerInfo: ServerInfo{
 			Name:    s.name,
test/integration/main_test.go
@@ -320,7 +320,7 @@ func testServer(t *testing.T, config ServerTestConfig) {
 		ID:      1,
 		Method:  "initialize",
 		Params: InitializeParams{
-			ProtocolVersion: "2024-11-05",
+			ProtocolVersion: "2025-06-18",
 			Capabilities:    map[string]interface{}{},
 			ClientInfo: ClientInfo{
 				Name:    "test-client",
@@ -343,8 +343,8 @@ func testServer(t *testing.T, config ServerTestConfig) {
 		t.Fatalf("Failed to parse initialize response: %v", err)
 	}
 
-	if initResult.ProtocolVersion != "2024-11-05" {
-		t.Errorf("Expected protocol version 2024-11-05, got %s", initResult.ProtocolVersion)
+	if initResult.ProtocolVersion != "2025-06-18" {
+		t.Errorf("Expected protocol version 2025-06-18, got %s", initResult.ProtocolVersion)
 	}
 
 	if initResult.ServerInfo.Name != config.ExpectedServers {
@@ -478,7 +478,7 @@ func TestServerStartupPerformance(t *testing.T) {
 				ID:      1,
 				Method:  "initialize",
 				Params: InitializeParams{
-					ProtocolVersion: "2024-11-05",
+					ProtocolVersion: "2025-06-18",
 					Capabilities:    map[string]interface{}{},
 					ClientInfo:      ClientInfo{Name: "test", Version: "1.0.0"},
 				},
test/integration_test.go
@@ -125,7 +125,7 @@ func testMCPServer(t *testing.T, server TestServer, testDir string) {
 			ID:      1,
 			Method:  "initialize",
 			Params: map[string]interface{}{
-				"protocolVersion": "2024-11-05",
+				"protocolVersion": "2025-06-18",
 				"capabilities":    map[string]interface{}{},
 				"clientInfo": map[string]interface{}{
 					"name":    "test-client",
@@ -668,7 +668,7 @@ func BenchmarkServerStartup(b *testing.B) {
 					ID:      1,
 					Method:  "initialize",
 					Params: map[string]interface{}{
-						"protocolVersion": "2024-11-05",
+						"protocolVersion": "2025-06-18",
 						"capabilities":    map[string]interface{}{},
 						"clientInfo":      map[string]interface{}{"name": "bench", "version": "1.0.0"},
 					},