Skip to content

Commit 1e639b9

Browse files
jakemac53Commit Queue
authored andcommitted
change the MCP server build script to point at the custom binary
update package:ai in deps, add entrypoint script for the mcp server which injects an analytics instance Change-Id: I1fd770a061085e7303c24b0c76e48d208687d9ad Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/437080 Auto-Submit: Jake Macdonald <[email protected]> Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Ben Konyi <[email protected]>
1 parent bb08090 commit 1e639b9

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ vars = {
131131
### /third_party/pkg dependencies
132132
# 'tools/rev_sdk_deps.dart' will rev pkg dependencies to their latest; put an
133133
# EOL comment after a dependency to instead pin at the current revision.
134-
"ai_rev": "5f9c50fc93c978e059a3ab2a071faeca6f81fd68",
134+
"ai_rev": "706d22444f2ca6123aeb8f1f4508b1d4451b6d0d",
135135
"core_rev": "b59ecf4ceebe6153e1c0166b7c9a7fdd9458a89d",
136136
"dartdoc_rev": "f1fe17752b1193ad52d69271ceb686cc3e4712b0",
137137
"ecosystem_rev": "d5233c6dd0767cffa5742e32c4bc7c230c9c4b12",

utils/dart_mcp_server/BUILD.gn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ group("dart_mcp_server_aot") {
1313
}
1414

1515
aot_snapshot("dart_mcp_server_aot_snapshot") {
16-
main_dart = "../../third_party/pkg/ai/pkgs/dart_mcp_server/bin/main.dart"
16+
main_dart = "dart_mcp_server.dart"
1717
output = "$root_gen_dir/dart_mcp_server_aot.dart.snapshot"
1818
}
1919

2020
aot_snapshot("dart_mcp_server_aot_product_snapshot") {
21-
main_dart = "../../third_party/pkg/ai/pkgs/dart_mcp_server/bin/main.dart"
21+
main_dart = "dart_mcp_server.dart"
2222
output = "$root_gen_dir/dart_mcp_server_aot_product.dart.snapshot"
2323

2424
# dartaotruntime has dart_product_config applied to it,
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
2+
// for details. All rights reserved. Use of this source code is governed by a
3+
// BSD-style license that can be found in the LICENSE file.
4+
5+
/// A custom entrypoint used by `dart mcp-server`. Injects an analytics instance
6+
/// using the [DashTool.dartTool] tool.
7+
library;
8+
9+
import 'dart:io';
10+
11+
import 'package:dart_mcp_server/dart_mcp_server.dart';
12+
import 'package:unified_analytics/unified_analytics.dart';
13+
14+
void main(List<String> args) async {
15+
exitCode = await DartMCPServer.run(
16+
args,
17+
analytics: Analytics(
18+
tool: DashTool.dartTool,
19+
// The actual version is part up to the first space.
20+
dartVersion: Platform.version.split(' ').first,
21+
),
22+
);
23+
}

0 commit comments

Comments
 (0)