Skip to content

Commit 42d36c2

Browse files
Harshil Goelrenovate[bot]
andauthored
chore: upgrade mcp-go deps (#9416)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
1 parent 874780e commit 42d36c2

File tree

3 files changed

+41
-38
lines changed

3 files changed

+41
-38
lines changed

dgraph/cmd/mcp/mcp_server.go

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ func getConn(connectionString string) (*dgo.Dgraph, error) {
4747
return conn, nil
4848
}
4949

50+
var True = true
51+
var False = false
52+
5053
// NewMCPServer initializes and returns a new MCPServer instance.
5154
func NewMCPServer(connectionString string, readOnly bool) (*server.MCPServer, error) {
5255
s := server.NewMCPServer(
@@ -60,10 +63,10 @@ func NewMCPServer(connectionString string, readOnly bool) (*server.MCPServer, er
6063
schemaTool := mcp.NewTool("Get-Schema",
6164
mcp.WithDescription("Get Dgraph DQL Schema from dgraph db"),
6265
mcp.WithToolAnnotation(mcp.ToolAnnotation{
63-
ReadOnlyHint: true,
64-
DestructiveHint: false,
65-
IdempotentHint: true,
66-
OpenWorldHint: false,
66+
ReadOnlyHint: &True,
67+
DestructiveHint: &False,
68+
IdempotentHint: &True,
69+
OpenWorldHint: &False,
6770
}),
6871
)
6972

@@ -74,10 +77,10 @@ func NewMCPServer(connectionString string, readOnly bool) (*server.MCPServer, er
7477
mcp.Description("The query to perform"),
7578
),
7679
mcp.WithToolAnnotation(mcp.ToolAnnotation{
77-
ReadOnlyHint: true,
78-
DestructiveHint: false,
79-
IdempotentHint: true,
80-
OpenWorldHint: false,
80+
ReadOnlyHint: &True,
81+
DestructiveHint: &False,
82+
IdempotentHint: &True,
83+
OpenWorldHint: &False,
8184
}),
8285
)
8386

@@ -89,15 +92,15 @@ func NewMCPServer(connectionString string, readOnly bool) (*server.MCPServer, er
8992
mcp.Description("Updated schema to insert inside the db"),
9093
),
9194
mcp.WithToolAnnotation(mcp.ToolAnnotation{
92-
ReadOnlyHint: false,
93-
DestructiveHint: true,
94-
IdempotentHint: false,
95-
OpenWorldHint: false,
95+
ReadOnlyHint: &False,
96+
DestructiveHint: &True,
97+
IdempotentHint: &False,
98+
OpenWorldHint: &False,
9699
}),
97100
)
98101

99102
s.AddTool(alterSchemaTool, func(ctx context.Context, request mcp.CallToolRequest) (*mcp.CallToolResult, error) {
100-
schema, ok := request.Params.Arguments["schema"].(string)
103+
schema, ok := request.GetArguments()["schema"].(string)
101104
if !ok {
102105
return nil, fmt.Errorf("schema must be present")
103106
}
@@ -121,10 +124,10 @@ func NewMCPServer(connectionString string, readOnly bool) (*server.MCPServer, er
121124
mcp.Description("The mutation to perform in json format"),
122125
),
123126
mcp.WithToolAnnotation(mcp.ToolAnnotation{
124-
ReadOnlyHint: false,
125-
DestructiveHint: true,
126-
IdempotentHint: false,
127-
OpenWorldHint: false,
127+
ReadOnlyHint: &False,
128+
DestructiveHint: &True,
129+
IdempotentHint: &False,
130+
OpenWorldHint: &False,
128131
}),
129132
)
130133

@@ -140,7 +143,7 @@ func NewMCPServer(connectionString string, readOnly bool) (*server.MCPServer, er
140143
glog.Errorf("failed to discard transaction: %v", err)
141144
}
142145
}()
143-
mutation, ok := request.Params.Arguments["mutation"].(string)
146+
mutation, ok := request.GetArguments()["mutation"].(string)
144147
if !ok {
145148
return nil, fmt.Errorf("mutation must present")
146149
}
@@ -167,7 +170,7 @@ func NewMCPServer(connectionString string, readOnly bool) (*server.MCPServer, er
167170
glog.Errorf("failed to discard transaction: %v", err)
168171
}
169172
}()
170-
op := request.Params.Arguments["query"].(string)
173+
op := request.GetArguments()["query"].(string)
171174
resp, err := txn.Query(ctx, op)
172175
if err != nil {
173176
return mcp.NewToolResultError(err.Error()), nil
@@ -224,10 +227,10 @@ func NewMCPServer(connectionString string, readOnly bool) (*server.MCPServer, er
224227
commonQueriesTool := mcp.NewTool("Get-Common-Queries",
225228
mcp.WithDescription("Get common queries that you can run on the db. If you are seeing issues with your queries, you can check this tool once."),
226229
mcp.WithToolAnnotation(mcp.ToolAnnotation{
227-
ReadOnlyHint: true,
228-
DestructiveHint: false,
229-
IdempotentHint: true,
230-
OpenWorldHint: false,
230+
ReadOnlyHint: &True,
231+
DestructiveHint: &False,
232+
IdempotentHint: &True,
233+
OpenWorldHint: &False,
231234
}),
232235
)
233236

go.mod

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ require (
77
github.com/HdrHistogram/hdrhistogram-go v1.1.2
88
github.com/IBM/sarama v1.45.1
99
github.com/Masterminds/semver/v3 v3.3.1
10-
github.com/blevesearch/bleve/v2 v2.5.0
10+
github.com/blevesearch/bleve/v2 v2.5.1
1111
github.com/dgraph-io/badger/v4 v4.7.0
1212
github.com/dgraph-io/dgo/v250 v250.0.0-preview2
1313
github.com/dgraph-io/gqlgen v0.13.2
@@ -23,7 +23,7 @@ require (
2323
github.com/go-jose/go-jose/v4 v4.1.0
2424
github.com/go-sql-driver/mysql v1.9.2
2525
github.com/golang-jwt/jwt/v5 v5.2.2
26-
github.com/golang/geo v0.0.0-20250509130527-0a13e5a5d53d
26+
github.com/golang/geo v0.0.0-20250516193853-92f93c4cb289
2727
github.com/golang/glog v1.2.5
2828
github.com/golang/snappy v1.0.0
2929
github.com/google/codesearch v1.2.0
@@ -33,7 +33,7 @@ require (
3333
github.com/graph-gophers/graphql-go v1.6.0
3434
github.com/hashicorp/vault/api v1.16.0
3535
github.com/klauspost/compress v1.18.0
36-
github.com/mark3labs/mcp-go v0.21.0
36+
github.com/mark3labs/mcp-go v0.29.0
3737
github.com/minio/minio-go/v6 v6.0.57
3838
github.com/paulmach/go.geojson v1.5.0
3939
github.com/pkg/errors v0.9.1
@@ -67,7 +67,7 @@ require (
6767
golang.org/x/term v0.32.0
6868
golang.org/x/text v0.25.0
6969
golang.org/x/tools v0.33.0
70-
google.golang.org/grpc v1.72.0
70+
google.golang.org/grpc v1.72.1
7171
google.golang.org/protobuf v1.36.6
7272
gopkg.in/yaml.v3 v3.0.1
7373
)
@@ -79,7 +79,7 @@ require (
7979
github.com/beorn7/perks v1.0.1 // indirect
8080
github.com/bits-and-blooms/bitset v1.22.0 // indirect
8181
github.com/blevesearch/bleve_index_api v1.2.8 // indirect
82-
github.com/blevesearch/geo v0.2.0 // indirect
82+
github.com/blevesearch/geo v0.2.3 // indirect
8383
github.com/blevesearch/go-porterstemmer v1.0.3 // indirect
8484
github.com/blevesearch/segment v0.9.1 // indirect
8585
github.com/blevesearch/snowballstem v0.9.0 // indirect

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
7575
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
7676
github.com/bits-and-blooms/bitset v1.22.0 h1:Tquv9S8+SGaS3EhyA+up3FXzmkhxPGjQQCkcs2uw7w4=
7777
github.com/bits-and-blooms/bitset v1.22.0/go.mod h1:7hO7Gc7Pp1vODcmWvKMRA9BNmbv6a/7QIWpPxHddWR8=
78-
github.com/blevesearch/bleve/v2 v2.5.0 h1:HzYqBy/5/M9Ul9ESEmXzN/3Jl7YpmWBdHM/+zzv/3k4=
79-
github.com/blevesearch/bleve/v2 v2.5.0/go.mod h1:PcJzTPnEynO15dCf9isxOga7YFRa/cMSsbnRwnszXUk=
78+
github.com/blevesearch/bleve/v2 v2.5.1 h1:cc/O++W2Hcjp1SU5ETHeE+QYWv2oV88ldYEPowdmg8M=
79+
github.com/blevesearch/bleve/v2 v2.5.1/go.mod h1:9g/wnbWKm9AgXrU8Ecqi+IDdqjUHWymwkQRDg+5tafU=
8080
github.com/blevesearch/bleve_index_api v1.2.8 h1:Y98Pu5/MdlkRyLM0qDHostYo7i+Vv1cDNhqTeR4Sy6Y=
8181
github.com/blevesearch/bleve_index_api v1.2.8/go.mod h1:rKQDl4u51uwafZxFrPD1R7xFOwKnzZW7s/LSeK4lgo0=
82-
github.com/blevesearch/geo v0.2.0 h1:f+IE3/C3mGeXDyhtMbWel6BgqBqaOUz43GtWg26GlB0=
83-
github.com/blevesearch/geo v0.2.0/go.mod h1:k8Hyfz12kM8QmeWLhgX7VMMCoVFmttBnr62V5zniXak=
82+
github.com/blevesearch/geo v0.2.3 h1:K9/vbGI9ehlXdxjxDRJtoAMt7zGAsMIzc6n8zWcwnhg=
83+
github.com/blevesearch/geo v0.2.3/go.mod h1:K56Q33AzXt2YExVHGObtmRSFYZKYGv0JEN5mdacJJR8=
8484
github.com/blevesearch/go-porterstemmer v1.0.3 h1:GtmsqID0aZdCSNiY8SkuPJ12pD4jI+DdXTAn4YRcHCo=
8585
github.com/blevesearch/go-porterstemmer v1.0.3/go.mod h1:angGc5Ht+k2xhJdZi511LtmxuEf0OVpvUUNrwmM1P7M=
8686
github.com/blevesearch/segment v0.9.1 h1:+dThDy+Lvgj5JMxhmOVlgFfkUtZV2kw49xax4+jTfSU=
@@ -216,8 +216,8 @@ github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69
216216
github.com/golang-jwt/jwt/v5 v5.2.2 h1:Rl4B7itRWVtYIHFrSNd7vhTiz9UpLdi6gZhZ3wEeDy8=
217217
github.com/golang-jwt/jwt/v5 v5.2.2/go.mod h1:pqrtFR0X4osieyHYxtmOUWsAWrfe1Q5UVIyoH402zdk=
218218
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0/go.mod h1:E/TSTwGwJL78qG/PmXZO1EjYhfJinVAhrmmHX6Z8B9k=
219-
github.com/golang/geo v0.0.0-20250509130527-0a13e5a5d53d h1:744gh8J7sbiKoLDyb4KMKj7DCiA2+vDVjb/nKGiv6yE=
220-
github.com/golang/geo v0.0.0-20250509130527-0a13e5a5d53d/go.mod h1:Vaw7L5b+xa3Rj4/pRtrQkymn3lSBRB/NAEdbF9YEVLA=
219+
github.com/golang/geo v0.0.0-20250516193853-92f93c4cb289 h1:HeOFbnyPys/vx/t+d4fwZM782mnjRVtbjxVkDittTUs=
220+
github.com/golang/geo v0.0.0-20250516193853-92f93c4cb289/go.mod h1:Vaw7L5b+xa3Rj4/pRtrQkymn3lSBRB/NAEdbF9YEVLA=
221221
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
222222
github.com/golang/glog v1.2.5 h1:DrW6hGnjIhtvhOIiAKT6Psh/Kd/ldepEa81DKeiRJ5I=
223223
github.com/golang/glog v1.2.5/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
@@ -394,8 +394,8 @@ github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+
394394
github.com/ledongthuc/pdf v0.0.0-20220302134840-0c2507a12d80/go.mod h1:imJHygn/1yfhB7XSJJKlFZKl/J+dCPAknuiaGOshXAs=
395395
github.com/logrusorgru/aurora v0.0.0-20200102142835-e9ef32dff381/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
396396
github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc=
397-
github.com/mark3labs/mcp-go v0.21.0 h1:oyEtiXg8PnrVEFis9b1AwbiUWF2dTbyBP5yLo7SruXE=
398-
github.com/mark3labs/mcp-go v0.21.0/go.mod h1:KmJndYv7GIgcPVwEKJjNcbhVQ+hJGJhrCCB/9xITzpE=
397+
github.com/mark3labs/mcp-go v0.29.0 h1:sH1NBcumKskhxqYzhXfGc201D7P76TVXiT0fGVhabeI=
398+
github.com/mark3labs/mcp-go v0.29.0/go.mod h1:rXqOudj/djTORU/ThxYx8fqEVj/5pvTuuebQ2RC7uk4=
399399
github.com/matryer/moq v0.0.0-20200106131100-75d0ddfc0007/go.mod h1:9ELz6aaclSIGnZBoaSLZ3NAl1VTufbOrXBPvtcy6WiQ=
400400
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
401401
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
@@ -933,8 +933,8 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
933933
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
934934
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
935935
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
936-
google.golang.org/grpc v1.72.0 h1:S7UkcVa60b5AAQTaO6ZKamFp1zMZSU0fGDK2WZLbBnM=
937-
google.golang.org/grpc v1.72.0/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
936+
google.golang.org/grpc v1.72.1 h1:HR03wO6eyZ7lknl75XlxABNVLLFc2PAb6mHlYh756mA=
937+
google.golang.org/grpc v1.72.1/go.mod h1:wH5Aktxcg25y1I3w7H69nHfXdOG3UiadoBtjh3izSDM=
938938
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
939939
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
940940
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=

0 commit comments

Comments
 (0)