Skip to content

Commit cf128ff

Browse files
feat: update draft specs to 2026-07-28 (#3699)
This PR updates draft to `2026-07-28`. The `enable-draft-specs` flag will now have no effects towards the server. `DRAFT-2026-v1` will now resolve to unsupported protocol version error. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
1 parent 8903cbe commit cf128ff

11 files changed

Lines changed: 68 additions & 56 deletions

File tree

‎docs/en/documentation/connect-to/mcp-client/_index.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The Toolbox SDKs can be combined with MCP clients in many cases.
2020

2121
Toolbox currently supports the following versions of MCP specification:
2222

23+
* [2026-07-28](https://modelcontextprotocol.io/specification/2026-07-28)
2324
* [2025-11-25](https://modelcontextprotocol.io/specification/2025-11-25)
2425
* [2025-06-18](https://modelcontextprotocol.io/specification/2025-06-18)
2526
* [2025-03-26](https://modelcontextprotocol.io/specification/2025-03-26)

‎docs/en/documentation/introduction/_index.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ Toolbox is fully compatible with the Model Context Protocol (MCP) and maintains
770770
### Stable Releases
771771
The following official MCP specification versions are currently supported for production use:
772772

773+
* `2026-07-28`
773774
* `2025-11-25`
774775
* `2025-06-18`
775776
* `2025-03-26`
@@ -788,7 +789,7 @@ test these forthcoming revisions before their official release using the
788789

789790
To test these draft specifications, enable the startup flag and use this version
790791
string during negotiation:
791-
* `DRAFT-2026-v1`
792+
* No supported draft right now
792793

793794
Description: Enables experimental support for upcoming draft MCP specifications,
794795
allowing you to test new schema standards and transport adjustments before they

‎internal/server/mcp/mcp.go‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
v20250326 "github.com/googleapis/mcp-toolbox/internal/server/mcp/v20250326"
2828
v20250618 "github.com/googleapis/mcp-toolbox/internal/server/mcp/v20250618"
2929
v20251125 "github.com/googleapis/mcp-toolbox/internal/server/mcp/v20251125"
30-
vdraft "github.com/googleapis/mcp-toolbox/internal/server/mcp/vdraft"
30+
v20260728 "github.com/googleapis/mcp-toolbox/internal/server/mcp/v20260728"
3131
"github.com/googleapis/mcp-toolbox/internal/server/primitives"
3232
"github.com/googleapis/mcp-toolbox/internal/util"
3333
)
@@ -53,11 +53,8 @@ func ProcessMethod(ctx context.Context, mcpVersion string, id jsonrpc.RequestId,
5353
return jsonrpc.NewError(id, jsonrpc.INTERNAL_ERROR, err.Error(), nil), err
5454
}
5555
switch mcpVersion {
56-
case mcputil.VERSION_DRAFT:
57-
if enableDraft {
58-
return vdraft.ProcessMethod(ctx, id, method, g, primitiveMgr, body, header)
59-
}
60-
return jsonrpc.NewUnsupportedProtocolVersionError(id, mcpVersion, enableDraft)
56+
case mcputil.VERSION_20260728:
57+
return v20260728.ProcessMethod(ctx, id, method, g, primitiveMgr, body, header)
6158
case mcputil.VERSION_20251125:
6259
return v20251125.ProcessMethod(ctx, id, method, g, primitiveMgr, body, header)
6360
case mcputil.VERSION_20250618:

‎internal/server/mcp/util/util.go‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const (
1919
VERSION_20250326 = "2025-03-26"
2020
VERSION_20250618 = "2025-06-18"
2121
VERSION_20251125 = "2025-11-25"
22-
VERSION_DRAFT = "DRAFT-2026-v1"
22+
VERSION_20260728 = "2026-07-28"
2323
)
2424

2525
// LATEST_PROTOCOL_VERSION is the latest version of the MCP protocol supported.
@@ -28,19 +28,18 @@ const LATEST_PROTOCOL_VERSION = VERSION_20251125
2828

2929
// LATEST_PROTOCOL_VERSION_NONSTABLE is the latest version of the MCP protocol
3030
// supported that includes non-stable version
31-
const LATEST_PROTOCOL_VERSION_NONSTABLE = VERSION_DRAFT
31+
const LATEST_PROTOCOL_VERSION_NONSTABLE = VERSION_20260728
3232

3333
// SUPPORTED_PROTOCOL_VERSIONS is the MCP protocol versions that are supported.
3434
var SUPPORTED_PROTOCOL_VERSIONS = []string{
3535
VERSION_20241105,
3636
VERSION_20250326,
3737
VERSION_20250618,
3838
VERSION_20251125,
39+
VERSION_20260728,
3940
}
4041

41-
var SUPPORTED_PROTOCOL_VERSIONS_NONSTABLE = []string{
42-
VERSION_DRAFT,
43-
}
42+
var SUPPORTED_PROTOCOL_VERSIONS_NONSTABLE = []string{}
4443

4544
func GetSupportedVersions(enableDraft bool) []string {
4645
if enableDraft {

internal/server/mcp/vdraft/manifests.go renamed to internal/server/mcp/v20260728/manifests.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package vdraft
15+
package v20260728
1616

1717
import (
1818
"fmt"

internal/server/mcp/vdraft/manifests_test.go renamed to internal/server/mcp/v20260728/manifests_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package vdraft
15+
package v20260728
1616

1717
import (
1818
"encoding/json"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package vdraft
15+
package v20260728
1616

1717
import (
1818
"bytes"

internal/server/mcp/vdraft/method_test.go renamed to internal/server/mcp/v20260728/method_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package vdraft
15+
package v20260728
1616

1717
import (
1818
"context"
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15-
package vdraft
15+
package v20260728
1616

1717
import (
1818
"github.com/googleapis/mcp-toolbox/internal/server/mcp/jsonrpc"
@@ -24,7 +24,7 @@ import (
2424
const SERVER_NAME = "Toolbox"
2525

2626
// PROTOCOL_VERSION is the version of the MCP protocol in this package.
27-
const PROTOCOL_VERSION = util.VERSION_DRAFT
27+
const PROTOCOL_VERSION = util.VERSION_20260728
2828

2929
// methods that are supported.
3030
const (

‎internal/server/mcp_test.go‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ const protocolVersion20241105 = "2024-11-05"
4848
const protocolVersion20250326 = "2025-03-26"
4949
const protocolVersion20250618 = "2025-06-18"
5050
const protocolVersion20251125 = "2025-11-25"
51-
const protocolVersionDraft = "DRAFT-2026-v1"
51+
const protocolVersion20260728 = "2026-07-28"
5252
const serverName = "Toolbox"
5353

5454
var basicInputSchema = map[string]any{
@@ -562,13 +562,13 @@ func TestMcpEndpoint(t *testing.T) {
562562
invalidMethods: []string{"server/discover"},
563563
},
564564
{
565-
name: "version DRAFT",
566-
protocol: protocolVersionDraft,
565+
name: "version 2026-07-28",
566+
protocol: protocolVersion20260728,
567567
idHeader: false,
568568
reqHeader: []string{"Mcp-Protocol-Version", "Mcp-Method", "Mcp-Name"},
569569
invalidMethods: []string{"ping"},
570570
meta: map[string]any{
571-
"io.modelcontextprotocol/protocolVersion": protocolVersionDraft,
571+
"io.modelcontextprotocol/protocolVersion": protocolVersion20260728,
572572
"io.modelcontextprotocol/clientInfo": map[string]any{
573573
"version": "client-temp-version",
574574
"name": "client-name",
@@ -845,7 +845,7 @@ func TestMcpEndpoint(t *testing.T) {
845845
"id": "server-discover",
846846
"result": map[string]any{
847847
"resultType": "complete",
848-
"supportedVersions": []any{"2024-11-05", "2025-03-26", "2025-06-18", "2025-11-25", "DRAFT-2026-v1"},
848+
"supportedVersions": []any{"2024-11-05", "2025-03-26", "2025-06-18", "2025-11-25", "2026-07-28"},
849849
"capabilities": map[string]any{
850850
"tools": map[string]any{"listChanged": false},
851851
"prompts": map[string]any{"listChanged": false},
@@ -1396,9 +1396,9 @@ func TestMcpEndpointWithoutEnablingDraftSpecs(t *testing.T) {
13961396
ts := runServer(r, false)
13971397
defer ts.Close()
13981398

1399-
protocol := protocolVersionDraft
1399+
protocol := "DRAFT"
14001400
meta := map[string]any{
1401-
"io.modelcontextprotocol/protocolVersion": protocolVersionDraft,
1401+
"io.modelcontextprotocol/protocolVersion": protocol,
14021402
"io.modelcontextprotocol/clientInfo": map[string]any{
14031403
"version": "client-temp-version",
14041404
"name": "client-name",
@@ -1422,8 +1422,8 @@ func TestMcpEndpointWithoutEnablingDraftSpecs(t *testing.T) {
14221422
"error": map[string]interface{}{
14231423
"code": float64(-32022),
14241424
"data": map[string]interface{}{
1425-
"requested": "DRAFT-2026-v1",
1426-
"supported": []interface{}{"2024-11-05", "2025-03-26", "2025-06-18", "2025-11-25"},
1425+
"requested": "DRAFT",
1426+
"supported": []interface{}{"2024-11-05", "2025-03-26", "2025-06-18", "2025-11-25", "2026-07-28"},
14271427
},
14281428
"message": "unsupported protocol version",
14291429
},

0 commit comments

Comments
 (0)