refactor: migrate MCP SDK to main repo (#3516)

This commit is contained in:
澄潭
2026-02-16 23:39:18 +08:00
committed by GitHub
parent 87c6cc9c9f
commit 9346f1340b
75 changed files with 10117 additions and 3392 deletions

View File

@@ -2,9 +2,12 @@ module amap-tools
go 1.24.1
replace github.com/alibaba/higress/plugins/wasm-go/pkg/mcp => ../../pkg/mcp
require (
github.com/higress-group/proxy-wasm-go-sdk v0.0.0-20250611100342-5654e89a7a80
github.com/higress-group/wasm-go v1.0.0
github.com/alibaba/higress/plugins/wasm-go/pkg/mcp v0.0.0
github.com/higress-group/proxy-wasm-go-sdk v0.0.0-20251103120604-77e9cce339d2
github.com/higress-group/wasm-go v1.0.10-0.20260115123534-84ef43c39dc9
)
require (
@@ -23,6 +26,7 @@ require (
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/shopspring/decimal v1.4.0 // indirect
github.com/spf13/cast v1.7.0 // indirect
github.com/tetratelabs/wazero v1.7.2 // indirect
github.com/tidwall/gjson v1.18.0 // indirect
github.com/tidwall/match v1.1.1 // indirect
github.com/tidwall/pretty v1.2.1 // indirect

View File

@@ -17,7 +17,7 @@ package main
import (
"amap-tools/tools"
"github.com/higress-group/wasm-go/pkg/mcp"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp"
)
func main() {}

View File

@@ -15,8 +15,8 @@
package tools
import (
"github.com/higress-group/wasm-go/pkg/mcp"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
)
func LoadTools(server *mcp.MCPServer) server.Server {

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = AroundSearchRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = BicyclingRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = DrivingRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = TransitIntegratedRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = WalkingRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = DistanceRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = GeoRequest{}

View File

@@ -24,8 +24,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
"github.com/higress-group/proxy-wasm-go-sdk/proxywasm"
)

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = ReGeocodeRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = SearchDetailRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = TextSearchRequest{}

View File

@@ -23,8 +23,8 @@ import (
"amap-tools/config"
"github.com/higress-group/wasm-go/pkg/mcp/server"
"github.com/higress-group/wasm-go/pkg/mcp/utils"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/server"
"github.com/alibaba/higress/plugins/wasm-go/pkg/mcp/utils"
)
var _ server.Tool = WeatherRequest{}