mongodb-mcp-server 0.1.2 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/.github/pull_request_template.md +5 -0
  2. package/.github/workflows/accuracy-tests.yml +55 -0
  3. package/.github/workflows/check.yml +1 -1
  4. package/.github/workflows/code_health.yaml +4 -4
  5. package/.github/workflows/code_health_fork.yaml +0 -14
  6. package/.github/workflows/dependabot_pr.yaml +26 -0
  7. package/.github/workflows/docker.yaml +1 -1
  8. package/.github/workflows/jira-issue.yml +72 -0
  9. package/.smithery/smithery.yaml +10 -0
  10. package/.vscode/extensions.json +1 -1
  11. package/.vscode/launch.json +11 -1
  12. package/.vscode/settings.json +1 -11
  13. package/Dockerfile +1 -0
  14. package/README.md +132 -31
  15. package/dist/common/atlas/accessListUtils.js +36 -0
  16. package/dist/common/atlas/accessListUtils.js.map +1 -0
  17. package/dist/common/atlas/apiClient.js +25 -6
  18. package/dist/common/atlas/apiClient.js.map +1 -1
  19. package/dist/common/atlas/cluster.js +1 -1
  20. package/dist/common/atlas/cluster.js.map +1 -1
  21. package/dist/{config.js → common/config.js} +8 -1
  22. package/dist/common/config.js.map +1 -0
  23. package/dist/{errors.js → common/errors.js} +1 -0
  24. package/dist/common/errors.js.map +1 -0
  25. package/dist/{logger.js → common/logger.js} +20 -19
  26. package/dist/common/logger.js.map +1 -0
  27. package/dist/common/managedTimeout.js +20 -0
  28. package/dist/common/managedTimeout.js.map +1 -0
  29. package/dist/common/packageInfo.js.map +1 -0
  30. package/dist/{session.js → common/session.js} +20 -21
  31. package/dist/common/session.js.map +1 -0
  32. package/dist/common/sessionStore.js +73 -0
  33. package/dist/common/sessionStore.js.map +1 -0
  34. package/dist/helpers/container.js +28 -0
  35. package/dist/helpers/container.js.map +1 -0
  36. package/dist/helpers/generatePassword.js.map +1 -0
  37. package/dist/helpers/indexCheck.js +63 -0
  38. package/dist/helpers/indexCheck.js.map +1 -0
  39. package/dist/index.js +30 -37
  40. package/dist/index.js.map +1 -1
  41. package/dist/server.js +44 -7
  42. package/dist/server.js.map +1 -1
  43. package/dist/telemetry/constants.js +1 -1
  44. package/dist/telemetry/constants.js.map +1 -1
  45. package/dist/telemetry/telemetry.js +86 -116
  46. package/dist/telemetry/telemetry.js.map +1 -1
  47. package/dist/tools/atlas/atlasTool.js +3 -3
  48. package/dist/tools/atlas/atlasTool.js.map +1 -1
  49. package/dist/tools/atlas/connect/connectCluster.js +198 -0
  50. package/dist/tools/atlas/connect/connectCluster.js.map +1 -0
  51. package/dist/tools/atlas/create/createAccessList.js +9 -10
  52. package/dist/tools/atlas/create/createAccessList.js.map +1 -1
  53. package/dist/tools/atlas/create/createDBUser.js +3 -1
  54. package/dist/tools/atlas/create/createDBUser.js.map +1 -1
  55. package/dist/tools/atlas/create/createFreeCluster.js +2 -0
  56. package/dist/tools/atlas/create/createFreeCluster.js.map +1 -1
  57. package/dist/tools/atlas/create/createProject.js.map +1 -1
  58. package/dist/tools/atlas/read/inspectAccessList.js.map +1 -1
  59. package/dist/tools/atlas/read/inspectCluster.js.map +1 -1
  60. package/dist/tools/atlas/read/listAlerts.js.map +1 -1
  61. package/dist/tools/atlas/read/listClusters.js.map +1 -1
  62. package/dist/tools/atlas/read/listDBUsers.js.map +1 -1
  63. package/dist/tools/atlas/read/listOrgs.js.map +1 -1
  64. package/dist/tools/atlas/read/listProjects.js.map +1 -1
  65. package/dist/tools/atlas/tools.js +1 -1
  66. package/dist/tools/atlas/tools.js.map +1 -1
  67. package/dist/tools/mongodb/{metadata → connect}/connect.js +7 -4
  68. package/dist/tools/mongodb/connect/connect.js.map +1 -0
  69. package/dist/tools/mongodb/create/createCollection.js.map +1 -1
  70. package/dist/tools/mongodb/create/createIndex.js +1 -1
  71. package/dist/tools/mongodb/create/createIndex.js.map +1 -1
  72. package/dist/tools/mongodb/create/insertMany.js +1 -1
  73. package/dist/tools/mongodb/create/insertMany.js.map +1 -1
  74. package/dist/tools/mongodb/delete/deleteMany.js +20 -1
  75. package/dist/tools/mongodb/delete/deleteMany.js.map +1 -1
  76. package/dist/tools/mongodb/delete/dropCollection.js.map +1 -1
  77. package/dist/tools/mongodb/delete/dropDatabase.js.map +1 -1
  78. package/dist/tools/mongodb/metadata/collectionSchema.js.map +1 -1
  79. package/dist/tools/mongodb/metadata/collectionStorageSize.js.map +1 -1
  80. package/dist/tools/mongodb/metadata/dbStats.js.map +1 -1
  81. package/dist/tools/mongodb/metadata/explain.js +2 -2
  82. package/dist/tools/mongodb/metadata/explain.js.map +1 -1
  83. package/dist/tools/mongodb/metadata/listCollections.js.map +1 -1
  84. package/dist/tools/mongodb/metadata/listDatabases.js.map +1 -1
  85. package/dist/tools/mongodb/metadata/logs.js.map +1 -1
  86. package/dist/tools/mongodb/mongodbTool.js +47 -10
  87. package/dist/tools/mongodb/mongodbTool.js.map +1 -1
  88. package/dist/tools/mongodb/read/aggregate.js +10 -1
  89. package/dist/tools/mongodb/read/aggregate.js.map +1 -1
  90. package/dist/tools/mongodb/read/collectionIndexes.js.map +1 -1
  91. package/dist/tools/mongodb/read/count.js +15 -1
  92. package/dist/tools/mongodb/read/count.js.map +1 -1
  93. package/dist/tools/mongodb/read/find.js +14 -4
  94. package/dist/tools/mongodb/read/find.js.map +1 -1
  95. package/dist/tools/mongodb/tools.js +1 -1
  96. package/dist/tools/mongodb/tools.js.map +1 -1
  97. package/dist/tools/mongodb/update/renameCollection.js.map +1 -1
  98. package/dist/tools/mongodb/update/updateMany.js +24 -2
  99. package/dist/tools/mongodb/update/updateMany.js.map +1 -1
  100. package/dist/tools/tool.js +12 -9
  101. package/dist/tools/tool.js.map +1 -1
  102. package/dist/transports/base.js +26 -0
  103. package/dist/transports/base.js.map +1 -0
  104. package/dist/{helpers/EJsonTransport.js → transports/stdio.js} +24 -2
  105. package/dist/transports/stdio.js.map +1 -0
  106. package/dist/transports/streamableHttp.js +140 -0
  107. package/dist/transports/streamableHttp.js.map +1 -0
  108. package/eslint.config.js +13 -4
  109. package/package.json +43 -33
  110. package/resources/test-summary-template.html +415 -0
  111. package/scripts/accuracy/generateTestSummary.ts +335 -0
  112. package/scripts/accuracy/runAccuracyTests.sh +45 -0
  113. package/scripts/accuracy/updateAccuracyRunStatus.ts +21 -0
  114. package/src/common/atlas/accessListUtils.ts +54 -0
  115. package/src/common/atlas/apiClient.ts +25 -6
  116. package/src/common/atlas/cluster.ts +1 -1
  117. package/src/{config.ts → common/config.ts} +16 -2
  118. package/src/{errors.ts → common/errors.ts} +1 -0
  119. package/src/{logger.ts → common/logger.ts} +21 -24
  120. package/src/common/managedTimeout.ts +27 -0
  121. package/src/{session.ts → common/session.ts} +24 -26
  122. package/src/common/sessionStore.ts +111 -0
  123. package/src/helpers/container.ts +35 -0
  124. package/src/helpers/indexCheck.ts +83 -0
  125. package/src/index.ts +30 -40
  126. package/src/server.ts +55 -11
  127. package/src/telemetry/constants.ts +1 -1
  128. package/src/telemetry/telemetry.ts +109 -153
  129. package/src/telemetry/types.ts +2 -1
  130. package/src/tools/atlas/atlasTool.ts +4 -4
  131. package/src/tools/atlas/connect/connectCluster.ts +259 -0
  132. package/src/tools/atlas/create/createAccessList.ts +15 -13
  133. package/src/tools/atlas/create/createDBUser.ts +5 -3
  134. package/src/tools/atlas/create/createFreeCluster.ts +4 -2
  135. package/src/tools/atlas/create/createProject.ts +2 -2
  136. package/src/tools/atlas/read/inspectAccessList.ts +2 -2
  137. package/src/tools/atlas/read/inspectCluster.ts +2 -2
  138. package/src/tools/atlas/read/listAlerts.ts +2 -2
  139. package/src/tools/atlas/read/listClusters.ts +2 -2
  140. package/src/tools/atlas/read/listDBUsers.ts +2 -2
  141. package/src/tools/atlas/read/listOrgs.ts +2 -2
  142. package/src/tools/atlas/read/listProjects.ts +2 -2
  143. package/src/tools/atlas/tools.ts +1 -1
  144. package/src/tools/mongodb/{metadata → connect}/connect.ts +12 -9
  145. package/src/tools/mongodb/create/createCollection.ts +2 -2
  146. package/src/tools/mongodb/create/createIndex.ts +3 -3
  147. package/src/tools/mongodb/create/insertMany.ts +3 -3
  148. package/src/tools/mongodb/delete/deleteMany.ts +24 -3
  149. package/src/tools/mongodb/delete/dropCollection.ts +2 -2
  150. package/src/tools/mongodb/delete/dropDatabase.ts +2 -2
  151. package/src/tools/mongodb/metadata/collectionSchema.ts +2 -2
  152. package/src/tools/mongodb/metadata/collectionStorageSize.ts +2 -2
  153. package/src/tools/mongodb/metadata/dbStats.ts +2 -2
  154. package/src/tools/mongodb/metadata/explain.ts +4 -4
  155. package/src/tools/mongodb/metadata/listCollections.ts +2 -2
  156. package/src/tools/mongodb/metadata/listDatabases.ts +2 -2
  157. package/src/tools/mongodb/metadata/logs.ts +2 -2
  158. package/src/tools/mongodb/mongodbTool.ts +60 -14
  159. package/src/tools/mongodb/read/aggregate.ts +14 -3
  160. package/src/tools/mongodb/read/collectionIndexes.ts +2 -2
  161. package/src/tools/mongodb/read/count.ts +19 -3
  162. package/src/tools/mongodb/read/find.ts +20 -6
  163. package/src/tools/mongodb/tools.ts +1 -1
  164. package/src/tools/mongodb/update/renameCollection.ts +2 -2
  165. package/src/tools/mongodb/update/updateMany.ts +28 -4
  166. package/src/tools/tool.ts +23 -18
  167. package/src/transports/base.ts +34 -0
  168. package/src/{helpers/EJsonTransport.ts → transports/stdio.ts} +30 -1
  169. package/src/transports/streamableHttp.ts +178 -0
  170. package/tests/accuracy/aggregate.test.ts +27 -0
  171. package/tests/accuracy/collectionIndexes.test.ts +40 -0
  172. package/tests/accuracy/collectionSchema.test.ts +28 -0
  173. package/tests/accuracy/collectionStorageSize.test.ts +41 -0
  174. package/tests/accuracy/count.test.ts +44 -0
  175. package/tests/accuracy/createCollection.test.ts +46 -0
  176. package/tests/accuracy/createIndex.test.ts +37 -0
  177. package/tests/accuracy/dbStats.test.ts +15 -0
  178. package/tests/accuracy/deleteMany.test.ts +44 -0
  179. package/tests/accuracy/dropCollection.test.ts +74 -0
  180. package/tests/accuracy/dropDatabase.test.ts +41 -0
  181. package/tests/accuracy/explain.test.ts +73 -0
  182. package/tests/accuracy/find.test.ts +114 -0
  183. package/tests/accuracy/insertMany.test.ts +48 -0
  184. package/tests/accuracy/listCollections.test.ts +60 -0
  185. package/tests/accuracy/listDatabases.test.ts +31 -0
  186. package/tests/accuracy/logs.test.ts +28 -0
  187. package/tests/accuracy/renameCollection.test.ts +31 -0
  188. package/tests/accuracy/sdk/accuracyResultStorage/diskStorage.ts +189 -0
  189. package/tests/accuracy/sdk/accuracyResultStorage/getAccuracyResultStorage.ts +11 -0
  190. package/tests/accuracy/sdk/accuracyResultStorage/mongodbStorage.ts +151 -0
  191. package/tests/accuracy/sdk/accuracyResultStorage/resultStorage.ts +117 -0
  192. package/tests/accuracy/sdk/accuracyScorer.ts +93 -0
  193. package/tests/accuracy/sdk/accuracyTestingClient.ts +94 -0
  194. package/tests/accuracy/sdk/agent.ts +56 -0
  195. package/tests/accuracy/sdk/constants.ts +26 -0
  196. package/tests/accuracy/sdk/describeAccuracyTests.ts +126 -0
  197. package/tests/accuracy/sdk/gitInfo.ts +7 -0
  198. package/tests/accuracy/sdk/matcher.ts +193 -0
  199. package/tests/accuracy/sdk/models.ts +95 -0
  200. package/tests/accuracy/test-data-dumps/comics.books.json +417 -0
  201. package/tests/accuracy/test-data-dumps/comics.characters.json +402 -0
  202. package/tests/accuracy/test-data-dumps/mflix.movies.json +496 -0
  203. package/tests/accuracy/test-data-dumps/mflix.shows.json +572 -0
  204. package/tests/accuracy/updateMany.test.ts +42 -0
  205. package/tests/integration/helpers.ts +9 -9
  206. package/tests/integration/indexCheck.test.ts +464 -0
  207. package/tests/integration/server.test.ts +6 -4
  208. package/tests/integration/telemetry.test.ts +29 -0
  209. package/tests/integration/tools/atlas/accessLists.test.ts +22 -2
  210. package/tests/integration/tools/atlas/alerts.test.ts +3 -2
  211. package/tests/integration/tools/atlas/atlasHelpers.ts +3 -0
  212. package/tests/integration/tools/atlas/clusters.test.ts +68 -16
  213. package/tests/integration/tools/atlas/dbUsers.test.ts +14 -1
  214. package/tests/integration/tools/atlas/orgs.test.ts +2 -1
  215. package/tests/integration/tools/atlas/projects.test.ts +4 -3
  216. package/tests/integration/tools/mongodb/{metadata → connect}/connect.test.ts +34 -3
  217. package/tests/integration/tools/mongodb/create/createCollection.test.ts +1 -0
  218. package/tests/integration/tools/mongodb/create/createIndex.test.ts +1 -0
  219. package/tests/integration/tools/mongodb/create/insertMany.test.ts +1 -0
  220. package/tests/integration/tools/mongodb/delete/deleteMany.test.ts +1 -0
  221. package/tests/integration/tools/mongodb/delete/dropCollection.test.ts +1 -1
  222. package/tests/integration/tools/mongodb/delete/dropDatabase.test.ts +1 -0
  223. package/tests/integration/tools/mongodb/metadata/collectionSchema.test.ts +1 -0
  224. package/tests/integration/tools/mongodb/metadata/collectionStorageSize.test.ts +1 -0
  225. package/tests/integration/tools/mongodb/metadata/dbStats.test.ts +1 -0
  226. package/tests/integration/tools/mongodb/metadata/explain.test.ts +1 -0
  227. package/tests/integration/tools/mongodb/metadata/listCollections.test.ts +1 -0
  228. package/tests/integration/tools/mongodb/metadata/listDatabases.test.ts +3 -2
  229. package/tests/integration/tools/mongodb/metadata/logs.test.ts +1 -0
  230. package/tests/integration/tools/mongodb/mongodbHelpers.ts +67 -2
  231. package/tests/integration/tools/mongodb/read/aggregate.test.ts +2 -1
  232. package/tests/integration/tools/mongodb/read/collectionIndexes.test.ts +1 -0
  233. package/tests/integration/tools/mongodb/read/count.test.ts +1 -0
  234. package/tests/integration/tools/mongodb/read/find.test.ts +2 -1
  235. package/tests/integration/tools/mongodb/update/renameCollection.test.ts +1 -0
  236. package/tests/integration/tools/mongodb/update/updateMany.test.ts +1 -0
  237. package/tests/integration/transports/stdio.test.ts +40 -0
  238. package/tests/integration/transports/streamableHttp.test.ts +56 -0
  239. package/tests/matchers/toIncludeSameMembers.test.ts +59 -0
  240. package/tests/matchers/toIncludeSameMembers.ts +12 -0
  241. package/tests/setup.ts +7 -0
  242. package/tests/unit/accessListUtils.test.ts +39 -0
  243. package/tests/unit/accuracyScorer.test.ts +390 -0
  244. package/tests/unit/{apiClient.test.ts → common/apiClient.test.ts} +15 -15
  245. package/tests/unit/common/managedTimeout.test.ts +67 -0
  246. package/tests/unit/{session.test.ts → common/session.test.ts} +7 -12
  247. package/tests/unit/helpers/indexCheck.test.ts +150 -0
  248. package/tests/unit/telemetry.test.ts +99 -137
  249. package/tests/unit/{EJsonTransport.test.ts → transports/stdio.test.ts} +4 -4
  250. package/tests/vitest.d.ts +11 -0
  251. package/tsconfig.json +0 -1
  252. package/{tsconfig.jest.json → tsconfig.test.json} +1 -2
  253. package/vitest.config.ts +41 -0
  254. package/dist/common/atlas/generatePassword.js.map +0 -1
  255. package/dist/config.js.map +0 -1
  256. package/dist/errors.js.map +0 -1
  257. package/dist/helpers/EJsonTransport.js.map +0 -1
  258. package/dist/helpers/packageInfo.js.map +0 -1
  259. package/dist/logger.js.map +0 -1
  260. package/dist/session.js.map +0 -1
  261. package/dist/tools/atlas/metadata/connectCluster.js +0 -100
  262. package/dist/tools/atlas/metadata/connectCluster.js.map +0 -1
  263. package/dist/tools/mongodb/metadata/connect.js.map +0 -1
  264. package/global.d.ts +0 -1
  265. package/jest.config.cjs +0 -22
  266. package/src/tools/atlas/metadata/connectCluster.ts +0 -121
  267. /package/dist/{helpers → common}/packageInfo.js +0 -0
  268. /package/dist/{common/atlas → helpers}/generatePassword.js +0 -0
  269. /package/src/{helpers → common}/packageInfo.ts +0 -0
  270. /package/src/{common/atlas → helpers}/generatePassword.ts +0 -0
@@ -0,0 +1,572 @@
1
+ [
2
+ {
3
+ "_id": "b586e37c-6b32-417d-a53c-2a4c1121b11b",
4
+ "title": "Object-based analyzing architecture",
5
+ "seasons": 8,
6
+ "episodes": 62,
7
+ "platform": "Amazon Prime",
8
+ "genres": ["Comedy"],
9
+ "cast": [
10
+ "Roger Gomez",
11
+ "Sandra Williams",
12
+ "Matthew Rodriguez",
13
+ "Scott Brown",
14
+ "Kristie Horn",
15
+ "Nicole Avila"
16
+ ],
17
+ "start_year": 2014,
18
+ "end_year": null
19
+ },
20
+ {
21
+ "_id": "c28471ea-336f-4060-9b18-0bbff3de6622",
22
+ "title": "Customer-focused encompassing architecture",
23
+ "seasons": 4,
24
+ "episodes": 108,
25
+ "platform": "Hulu",
26
+ "genres": ["Thriller"],
27
+ "cast": ["Joseph Holmes", "Patrick Smith", "Charles Delacruz"],
28
+ "start_year": 2001,
29
+ "end_year": null
30
+ },
31
+ {
32
+ "_id": "93f0969b-2377-4531-9c4e-45d2593015cd",
33
+ "title": "User-centric background approach",
34
+ "seasons": 6,
35
+ "episodes": 49,
36
+ "platform": "HBO",
37
+ "genres": ["Comedy", "Documentary"],
38
+ "cast": [
39
+ "Jason Castillo",
40
+ "Jessica Burke",
41
+ "Philip Lewis",
42
+ "Philip Goodman",
43
+ "Corey Lee"
44
+ ],
45
+ "start_year": 2016,
46
+ "end_year": 2018
47
+ },
48
+ {
49
+ "_id": "a0b76db0-99a1-49fe-a5ea-fe802a66bde9",
50
+ "title": "Networked directional budgetary management",
51
+ "seasons": 5,
52
+ "episodes": 23,
53
+ "platform": "Amazon Prime",
54
+ "genres": ["Comedy", "Thriller"],
55
+ "cast": ["Mark Allen", "Anthony Snyder", "Kimberly Jones"],
56
+ "start_year": 2002,
57
+ "end_year": null
58
+ },
59
+ {
60
+ "_id": "fbdef9b9-1ad4-4a6b-a39a-2e0b90423cb5",
61
+ "title": "Enterprise-wide dynamic intranet",
62
+ "seasons": 1,
63
+ "episodes": 12,
64
+ "platform": "Amazon Prime",
65
+ "genres": ["Crime", "Documentary"],
66
+ "cast": ["Matthew Green", "Kelly Wright", "Tonya Sullivan", "Daniel Brown"],
67
+ "start_year": 2009,
68
+ "end_year": 2020
69
+ },
70
+ {
71
+ "_id": "db54ab5c-bf6b-48ea-8272-1b1a4a76b848",
72
+ "title": "Exclusive real-time access",
73
+ "seasons": 10,
74
+ "episodes": 76,
75
+ "platform": "Amazon Prime",
76
+ "genres": ["Drama"],
77
+ "cast": ["Stacey Shaw", "Zachary Steele", "Laurie Martinez"],
78
+ "start_year": 2011,
79
+ "end_year": 2020
80
+ },
81
+ {
82
+ "_id": "53869b62-c8c7-48b3-86c9-17c935b43ff6",
83
+ "title": "Persevering leadingedge application",
84
+ "seasons": 5,
85
+ "episodes": 73,
86
+ "platform": "HBO",
87
+ "genres": ["Thriller"],
88
+ "cast": ["Diane Boyd", "Anna Rubio", "Cheryl Fisher", "Tyler Villa"],
89
+ "start_year": 2008,
90
+ "end_year": 2020
91
+ },
92
+ {
93
+ "_id": "3be07c4d-5275-4181-b2f6-5b1a1e46aa7b",
94
+ "title": "Multi-lateral analyzing model",
95
+ "seasons": 2,
96
+ "episodes": 114,
97
+ "platform": "Amazon Prime",
98
+ "genres": ["Fantasy"],
99
+ "cast": [
100
+ "Kathleen Marshall",
101
+ "Kimberly Quinn",
102
+ "Steven Parker",
103
+ "Adrienne Green",
104
+ "Justin Hughes",
105
+ "Jean Smith"
106
+ ],
107
+ "start_year": 2017,
108
+ "end_year": 2023
109
+ },
110
+ {
111
+ "_id": "50cb455b-5ec0-4e68-8601-43e58defb762",
112
+ "title": "User-centric tangible monitoring",
113
+ "seasons": 3,
114
+ "episodes": 55,
115
+ "platform": "Disney+",
116
+ "genres": ["Drama"],
117
+ "cast": [
118
+ "Barbara Clark",
119
+ "Carolyn Scott",
120
+ "Timothy Reed",
121
+ "Cory Burton",
122
+ "Jacob Hill"
123
+ ],
124
+ "start_year": 2006,
125
+ "end_year": 2012
126
+ },
127
+ {
128
+ "_id": "bab2dba4-88bd-4b24-afce-8781eb280d53",
129
+ "title": "Persevering background monitoring",
130
+ "seasons": 4,
131
+ "episodes": 61,
132
+ "platform": "Amazon Prime",
133
+ "genres": ["Comedy", "Fantasy"],
134
+ "cast": ["Adam Lin", "Evan Smith", "Christine Howard", "Ruben Hopkins"],
135
+ "start_year": 2006,
136
+ "end_year": 2023
137
+ },
138
+ {
139
+ "_id": "518f2ad9-bb65-4228-8d4c-7a62b9f88599",
140
+ "title": "Cross-group intangible architecture",
141
+ "seasons": 1,
142
+ "episodes": 90,
143
+ "platform": "HBO",
144
+ "genres": ["Comedy"],
145
+ "cast": [
146
+ "Eric Ryan",
147
+ "Ashley Ball",
148
+ "Douglas Barton",
149
+ "Brian Whitehead",
150
+ "Michael Greer"
151
+ ],
152
+ "start_year": 2018,
153
+ "end_year": null
154
+ },
155
+ {
156
+ "_id": "d5f9304d-567d-4335-b43c-ec4034d7009f",
157
+ "title": "Programmable bottom-line monitoring",
158
+ "seasons": 10,
159
+ "episodes": 69,
160
+ "platform": "Hulu",
161
+ "genres": ["Documentary", "Fantasy"],
162
+ "cast": [
163
+ "Mrs. Olivia Booth",
164
+ "William Murphy",
165
+ "Patricia Payne",
166
+ "Lisa Estes",
167
+ "Jason Martin",
168
+ "Jeff Greene"
169
+ ],
170
+ "start_year": 2011,
171
+ "end_year": 2024
172
+ },
173
+ {
174
+ "_id": "27718a30-6e42-47ad-8adf-1533b9b8a419",
175
+ "title": "Multi-lateral multi-tasking contingency",
176
+ "seasons": 3,
177
+ "episodes": 89,
178
+ "platform": "Disney+",
179
+ "genres": ["Crime"],
180
+ "cast": ["Elizabeth Lambert", "Corey Hughes", "Melissa Stephens"],
181
+ "start_year": 2006,
182
+ "end_year": null
183
+ },
184
+ {
185
+ "_id": "defc7620-3b4e-46ff-a949-bec1af753812",
186
+ "title": "Focused zero administration migration",
187
+ "seasons": 9,
188
+ "episodes": 73,
189
+ "platform": "Disney+",
190
+ "genres": ["Documentary", "Drama"],
191
+ "cast": ["Shane Richardson", "Lisa Cooper", "Samantha Perkins"],
192
+ "start_year": 2008,
193
+ "end_year": null
194
+ },
195
+ {
196
+ "_id": "9d6781fb-d095-4a00-932d-3f1fac1b0049",
197
+ "title": "Horizontal methodical encoding",
198
+ "seasons": 8,
199
+ "episodes": 40,
200
+ "platform": "Netflix",
201
+ "genres": ["Crime"],
202
+ "cast": ["Patricia Barrett", "Scott Gonzalez", "Michaela Johnson"],
203
+ "start_year": 2006,
204
+ "end_year": null
205
+ },
206
+ {
207
+ "_id": "ac19b1b1-2bf9-4093-83fa-60411aa3f80f",
208
+ "title": "Enterprise-wide analyzing product",
209
+ "seasons": 8,
210
+ "episodes": 61,
211
+ "platform": "Hulu",
212
+ "genres": ["Drama"],
213
+ "cast": ["Christie Waters", "Casey Allen", "Nicole Frank"],
214
+ "start_year": 2001,
215
+ "end_year": 2005
216
+ },
217
+ {
218
+ "_id": "2dfd2240-dc9f-439f-9e06-b1ec8de397bf",
219
+ "title": "Compatible well-modulated extranet",
220
+ "seasons": 10,
221
+ "episodes": 89,
222
+ "platform": "Hulu",
223
+ "genres": ["Drama"],
224
+ "cast": [
225
+ "Pedro Butler",
226
+ "Christian Hall",
227
+ "Dawn Gregory",
228
+ "Shannon Russell",
229
+ "Omar Mullins",
230
+ "Ian Ramos"
231
+ ],
232
+ "start_year": 2012,
233
+ "end_year": 2013
234
+ },
235
+ {
236
+ "_id": "94db1534-7163-430e-83e3-6a75bc6aec0f",
237
+ "title": "User-centric tangible infrastructure",
238
+ "seasons": 5,
239
+ "episodes": 11,
240
+ "platform": "Hulu",
241
+ "genres": ["Drama"],
242
+ "cast": [
243
+ "Deborah Garcia",
244
+ "Michelle Barajas",
245
+ "Melissa Reynolds",
246
+ "Douglas Wilson"
247
+ ],
248
+ "start_year": 2001,
249
+ "end_year": null
250
+ },
251
+ {
252
+ "_id": "65b2213f-a606-42d8-b845-0199ba2e9b82",
253
+ "title": "Inverse optimal circuit",
254
+ "seasons": 1,
255
+ "episodes": 29,
256
+ "platform": "Amazon Prime",
257
+ "genres": ["Fantasy", "Documentary"],
258
+ "cast": [
259
+ "Grace Rodriguez",
260
+ "Alison Greene",
261
+ "Michael Allen",
262
+ "Steven Hayden"
263
+ ],
264
+ "start_year": 2013,
265
+ "end_year": null
266
+ },
267
+ {
268
+ "_id": "5a8a2745-e57c-4086-aa09-84131f40149f",
269
+ "title": "Public-key discrete alliance",
270
+ "seasons": 9,
271
+ "episodes": 111,
272
+ "platform": "Disney+",
273
+ "genres": ["Documentary"],
274
+ "cast": [
275
+ "Emily Irwin",
276
+ "Olivia Gibson",
277
+ "Jean Hernandez",
278
+ "Michael Cummings"
279
+ ],
280
+ "start_year": 2013,
281
+ "end_year": 2022
282
+ },
283
+ {
284
+ "_id": "51326558-2080-4615-a583-b4f2fbd15600",
285
+ "title": "Managed zero administration groupware",
286
+ "seasons": 8,
287
+ "episodes": 108,
288
+ "platform": "Hulu",
289
+ "genres": ["Drama", "Crime"],
290
+ "cast": [
291
+ "Karen Phillips",
292
+ "Kelly Marsh",
293
+ "Daniel Hamilton",
294
+ "Abigail Smith"
295
+ ],
296
+ "start_year": 2018,
297
+ "end_year": 2019
298
+ },
299
+ {
300
+ "_id": "87a2cd5f-75ee-4650-b2a4-a56384c97137",
301
+ "title": "Reverse-engineered static initiative",
302
+ "seasons": 6,
303
+ "episodes": 66,
304
+ "platform": "Amazon Prime",
305
+ "genres": ["Crime", "Documentary"],
306
+ "cast": [
307
+ "Bradley Chavez",
308
+ "Catherine Horn",
309
+ "Joseph Bryant",
310
+ "Tara Rodriguez"
311
+ ],
312
+ "start_year": 2003,
313
+ "end_year": 2006
314
+ },
315
+ {
316
+ "_id": "0f647458-d09f-4be8-b1dc-49be1ba1e104",
317
+ "title": "Fundamental tangible matrices",
318
+ "seasons": 9,
319
+ "episodes": 22,
320
+ "platform": "Hulu",
321
+ "genres": ["Drama"],
322
+ "cast": ["Eric Lee", "Patrick Estrada", "Kelsey Brown", "Jeffrey Lewis"],
323
+ "start_year": 2001,
324
+ "end_year": null
325
+ },
326
+ {
327
+ "_id": "53d34237-0e86-4a5e-922b-0589c2e65458",
328
+ "title": "Self-enabling homogeneous infrastructure",
329
+ "seasons": 5,
330
+ "episodes": 35,
331
+ "platform": "Hulu",
332
+ "genres": ["Crime"],
333
+ "cast": [
334
+ "Chad Torres",
335
+ "Mark Williams",
336
+ "Terry Mcguire",
337
+ "Kathleen Cantu",
338
+ "Harold Knapp"
339
+ ],
340
+ "start_year": 2006,
341
+ "end_year": null
342
+ },
343
+ {
344
+ "_id": "71cc1515-ba84-4df6-92db-55af3cfa91f0",
345
+ "title": "Horizontal web-enabled application",
346
+ "seasons": 2,
347
+ "episodes": 94,
348
+ "platform": "Netflix",
349
+ "genres": ["Thriller", "Fantasy"],
350
+ "cast": [
351
+ "Catherine Davila",
352
+ "Jessica James",
353
+ "Cory Miller",
354
+ "Alexis Sanchez",
355
+ "Andrew Miller"
356
+ ],
357
+ "start_year": 2002,
358
+ "end_year": 2017
359
+ },
360
+ {
361
+ "_id": "200556f7-10c6-4414-83f7-24ef74bff12a",
362
+ "title": "User-friendly bi-directional data-warehouse",
363
+ "seasons": 2,
364
+ "episodes": 87,
365
+ "platform": "Hulu",
366
+ "genres": ["Drama", "Fantasy"],
367
+ "cast": [
368
+ "Tiffany Brown",
369
+ "Christina Morales",
370
+ "Samuel Blake",
371
+ "Stephanie Johnson",
372
+ "Wesley Deleon"
373
+ ],
374
+ "start_year": 2020,
375
+ "end_year": null
376
+ },
377
+ {
378
+ "_id": "613832c9-5307-4c80-9dde-3eab4e5aa770",
379
+ "title": "Pre-emptive leadingedge capacity",
380
+ "seasons": 5,
381
+ "episodes": 56,
382
+ "platform": "Netflix",
383
+ "genres": ["Comedy"],
384
+ "cast": ["James Durham", "Jessica Myers", "Rachel King"],
385
+ "start_year": 2005,
386
+ "end_year": null
387
+ },
388
+ {
389
+ "_id": "f9cb1076-3eaf-41d2-84df-057d27c1a544",
390
+ "title": "Fundamental intangible contingency",
391
+ "seasons": 4,
392
+ "episodes": 99,
393
+ "platform": "Disney+",
394
+ "genres": ["Crime", "Fantasy"],
395
+ "cast": [
396
+ "Robert Foster",
397
+ "Jill Barton",
398
+ "Kimberly Simmons",
399
+ "Tracey Gomez"
400
+ ],
401
+ "start_year": 2017,
402
+ "end_year": 2020
403
+ },
404
+ {
405
+ "_id": "f96b112f-943e-43cd-90f0-56725cfa7e59",
406
+ "title": "Diverse asymmetric forecast",
407
+ "seasons": 9,
408
+ "episodes": 24,
409
+ "platform": "Amazon Prime",
410
+ "genres": ["Drama", "Crime"],
411
+ "cast": [
412
+ "Carl Johnson",
413
+ "Douglas Beck",
414
+ "Kevin Guerra",
415
+ "Taylor Wilson",
416
+ "Eric Jarvis",
417
+ "Sarah Charles MD"
418
+ ],
419
+ "start_year": 2007,
420
+ "end_year": null
421
+ },
422
+ {
423
+ "_id": "78eb682f-a03d-4cbf-bbfc-0e899e5f50d0",
424
+ "title": "Profit-focused solution-oriented Graphical User Interface",
425
+ "seasons": 10,
426
+ "episodes": 117,
427
+ "platform": "HBO",
428
+ "genres": ["Crime", "Fantasy"],
429
+ "cast": ["Carol Miller", "Jennifer Bass", "Melanie Leblanc"],
430
+ "start_year": 2002,
431
+ "end_year": null
432
+ },
433
+ {
434
+ "_id": "ebb6d3c9-3c98-4799-94bc-aadd0bf2974c",
435
+ "title": "Reduced leadingedge system engine",
436
+ "seasons": 1,
437
+ "episodes": 58,
438
+ "platform": "Hulu",
439
+ "genres": ["Crime", "Drama"],
440
+ "cast": [
441
+ "James Warren",
442
+ "Kelly Carter",
443
+ "Sarah Jones",
444
+ "Aaron Castaneda",
445
+ "Katherine Manning"
446
+ ],
447
+ "start_year": 2011,
448
+ "end_year": null
449
+ },
450
+ {
451
+ "_id": "4ffd32a7-0bf4-4c95-a7c8-19002c2eb83c",
452
+ "title": "Switchable 24/7 website",
453
+ "seasons": 6,
454
+ "episodes": 71,
455
+ "platform": "Netflix",
456
+ "genres": ["Documentary"],
457
+ "cast": [
458
+ "Sarah Brown",
459
+ "Patrick Beck",
460
+ "Angela Herrera MD",
461
+ "Steven Mcconnell"
462
+ ],
463
+ "start_year": 2018,
464
+ "end_year": null
465
+ },
466
+ {
467
+ "_id": "37267325-4337-4912-992f-a162f9014569",
468
+ "title": "Synergized asymmetric adapter",
469
+ "seasons": 4,
470
+ "episodes": 16,
471
+ "platform": "Hulu",
472
+ "genres": ["Fantasy"],
473
+ "cast": ["Gabrielle Meyer", "Madison Matthews", "Taylor Martinez"],
474
+ "start_year": 2010,
475
+ "end_year": null
476
+ },
477
+ {
478
+ "_id": "ea2abd77-c7da-443e-89fd-6f410f5d697e",
479
+ "title": "Extended contextually-based customer loyalty",
480
+ "seasons": 1,
481
+ "episodes": 79,
482
+ "platform": "Hulu",
483
+ "genres": ["Fantasy"],
484
+ "cast": ["Michael Lewis", "Cassandra Hicks", "Sydney Garcia"],
485
+ "start_year": 2015,
486
+ "end_year": 2023
487
+ },
488
+ {
489
+ "_id": "b568dd56-c083-4431-a740-4f4b5f4e1b21",
490
+ "title": "Versatile grid-enabled application",
491
+ "seasons": 7,
492
+ "episodes": 82,
493
+ "platform": "Hulu",
494
+ "genres": ["Crime", "Fantasy"],
495
+ "cast": ["Keith Brown", "Annette Johnson", "Joseph Carroll", "Derek Lewis"],
496
+ "start_year": 2006,
497
+ "end_year": 2008
498
+ },
499
+ {
500
+ "_id": "b6f2e1c3-6915-4e02-b1c2-44b5bec8fd68",
501
+ "title": "Operative optimizing encryption",
502
+ "seasons": 2,
503
+ "episodes": 52,
504
+ "platform": "Amazon Prime",
505
+ "genres": ["Fantasy", "Drama"],
506
+ "cast": [
507
+ "Garrett Mcgrath",
508
+ "Craig Jackson",
509
+ "Michael Sullivan",
510
+ "Andrew Boyer"
511
+ ],
512
+ "start_year": 2011,
513
+ "end_year": null
514
+ },
515
+ {
516
+ "_id": "51c225d5-aa67-4b14-aca5-33757cef6bf4",
517
+ "title": "Business-focused 24/7 collaboration",
518
+ "seasons": 1,
519
+ "episodes": 113,
520
+ "platform": "Netflix",
521
+ "genres": ["Thriller", "Comedy"],
522
+ "cast": ["Matthew Hill", "Andrew White", "Grant Young", "John Mathews"],
523
+ "start_year": 2015,
524
+ "end_year": 2020
525
+ },
526
+ {
527
+ "_id": "7465e69f-341e-4234-8ffb-400622442a40",
528
+ "title": "Organized bi-directional application",
529
+ "seasons": 3,
530
+ "episodes": 40,
531
+ "platform": "Netflix",
532
+ "genres": ["Comedy"],
533
+ "cast": [
534
+ "Matthew Gordon",
535
+ "Mark Allen",
536
+ "Amanda Webb",
537
+ "Jeffrey Horton",
538
+ "Sheila Lewis",
539
+ "Marcus Gilbert"
540
+ ],
541
+ "start_year": 2011,
542
+ "end_year": null
543
+ },
544
+ {
545
+ "_id": "90570eac-f923-4c30-a5b0-661b28a8e4a5",
546
+ "title": "Configurable bottom-line success",
547
+ "seasons": 10,
548
+ "episodes": 106,
549
+ "platform": "HBO",
550
+ "genres": ["Fantasy", "Drama"],
551
+ "cast": [
552
+ "Elizabeth Taylor",
553
+ "Melissa Mullins",
554
+ "Alan Nguyen",
555
+ "Carolyn Kidd",
556
+ "Michael Pope"
557
+ ],
558
+ "start_year": 2015,
559
+ "end_year": null
560
+ },
561
+ {
562
+ "_id": "06d70791-5487-4dab-8b84-a91b3376e396",
563
+ "title": "Organic dedicated analyzer",
564
+ "seasons": 3,
565
+ "episodes": 88,
566
+ "platform": "HBO",
567
+ "genres": ["Thriller", "Drama"],
568
+ "cast": ["Amy Aguilar", "James Williams", "Kevin Kirby"],
569
+ "start_year": 2010,
570
+ "end_year": 2025
571
+ }
572
+ ]
@@ -0,0 +1,42 @@
1
+ import { describeAccuracyTests } from "./sdk/describeAccuracyTests.js";
2
+ import { Matcher } from "./sdk/matcher.js";
3
+
4
+ describeAccuracyTests([
5
+ {
6
+ prompt: "Update all the documents in 'mflix.movies' namespace with a new field 'new_field' set to 1",
7
+ expectedToolCalls: [
8
+ {
9
+ toolName: "update-many",
10
+ parameters: {
11
+ database: "mflix",
12
+ collection: "movies",
13
+ update: {
14
+ $set: {
15
+ new_field: 1,
16
+ },
17
+ },
18
+ upsert: Matcher.anyOf(Matcher.undefined, Matcher.boolean()),
19
+ },
20
+ },
21
+ ],
22
+ },
23
+ {
24
+ prompt: "Update all the documents in 'mflix.movies' namespace, where runtime is less than 100, with a new field 'new_field' set to 1",
25
+ expectedToolCalls: [
26
+ {
27
+ toolName: "update-many",
28
+ parameters: {
29
+ database: "mflix",
30
+ collection: "movies",
31
+ filter: { runtime: { $lt: 100 } },
32
+ update: {
33
+ $set: {
34
+ new_field: 1,
35
+ },
36
+ },
37
+ upsert: Matcher.anyOf(Matcher.undefined, Matcher.boolean()),
38
+ },
39
+ },
40
+ ],
41
+ },
42
+ ]);
@@ -1,13 +1,13 @@
1
1
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
2
  import { InMemoryTransport } from "./inMemoryTransport.js";
3
3
  import { Server } from "../../src/server.js";
4
- import { UserConfig } from "../../src/config.js";
4
+ import { UserConfig } from "../../src/common/config.js";
5
5
  import { McpError } from "@modelcontextprotocol/sdk/types.js";
6
6
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
7
- import { Session } from "../../src/session.js";
7
+ import { Session } from "../../src/common/session.js";
8
8
  import { Telemetry } from "../../src/telemetry/telemetry.js";
9
- import { config } from "../../src/config.js";
10
- import { jest } from "@jest/globals";
9
+ import { config } from "../../src/common/config.js";
10
+ import { afterAll, afterEach, beforeAll, describe, expect, it, vi } from "vitest";
11
11
 
12
12
  interface ParameterInfo {
13
13
  name: string;
@@ -25,6 +25,7 @@ export interface IntegrationTest {
25
25
  export const defaultTestConfig: UserConfig = {
26
26
  ...config,
27
27
  telemetry: "disabled",
28
+ loggers: ["stderr"],
28
29
  };
29
30
 
30
31
  export function setupIntegrationTest(getUserConfig: () => UserConfig): IntegrationTest {
@@ -60,8 +61,7 @@ export function setupIntegrationTest(getUserConfig: () => UserConfig): Integrati
60
61
 
61
62
  // Mock hasValidAccessToken for tests
62
63
  if (userConfig.apiClientId && userConfig.apiClientSecret) {
63
- const mockFn = jest.fn<() => Promise<boolean>>().mockResolvedValue(true);
64
- // @ts-expect-error accessing private property for testing
64
+ const mockFn = vi.fn().mockResolvedValue(true);
65
65
  session.apiClient.validateAccessToken = mockFn;
66
66
  }
67
67
 
@@ -85,7 +85,7 @@ export function setupIntegrationTest(getUserConfig: () => UserConfig): Integrati
85
85
 
86
86
  afterEach(async () => {
87
87
  if (mcpServer) {
88
- await mcpServer.session.close();
88
+ await mcpServer.session.disconnect();
89
89
  }
90
90
  });
91
91
 
@@ -132,7 +132,7 @@ export function getResponseElements(content: unknown | { content: unknown }): {
132
132
  content = (content as { content: unknown }).content;
133
133
  }
134
134
 
135
- expect(content).toBeArray();
135
+ expect(content).toBeInstanceOf(Array);
136
136
 
137
137
  const response = content as { type: string; text: string }[];
138
138
  for (const item of response) {
@@ -209,7 +209,7 @@ export function validateToolMetadata(
209
209
  validateToolAnnotations(tool, name, description);
210
210
  const toolParameters = getParameters(tool);
211
211
  expect(toolParameters).toHaveLength(parameters.length);
212
- expect(toolParameters).toIncludeAllMembers(parameters);
212
+ expect(toolParameters).toIncludeSameMembers(parameters);
213
213
  });
214
214
  }
215
215