@langwatch/mcp-server 0.10.0 → 1.0.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 (122) hide show
  1. package/.release-please-shim +1 -1
  2. package/CHANGELOG.md +62 -0
  3. package/README.md +9 -17
  4. package/dist/{archive-project-HZBRPR2S.js → archive-project-MK3673A7.js} +4 -3
  5. package/dist/{archive-scenario-P5RRITRM.js → archive-scenario-KATSXRIN.js} +4 -3
  6. package/dist/{archive-suite-NUUFD2EM.js → archive-suite-C3KX6IIZ.js} +4 -3
  7. package/dist/{assign-prompt-tag-FKCCZPML.js → assign-prompt-tag-E3C5W6PI.js} +3 -2
  8. package/dist/chunk-37SMPMQS.js +12 -0
  9. package/dist/{chunk-42ZHHHIJ.js → chunk-5UWY24RP.js} +79 -4
  10. package/dist/chunk-BJ7B4R26.js +42 -0
  11. package/dist/chunk-CE6QMZOP.js +432 -0
  12. package/dist/{chunk-X2SEURT2.js → chunk-DAIQKS27.js} +2 -2
  13. package/dist/{chunk-R7C7OUVG.js → chunk-EU22L52K.js} +2 -2
  14. package/dist/{chunk-TROIWSEQ.js → chunk-J45SVWPR.js} +2 -2
  15. package/dist/{chunk-CCM4ZFGF.js → chunk-O3LWVN67.js} +2 -2
  16. package/dist/{chunk-BB7EOKHR.js → chunk-RYRB2YVJ.js} +2 -2
  17. package/dist/{chunk-HKY3GW45.js → chunk-T7WJVS2N.js} +2 -2
  18. package/dist/{chunk-JHOSVOHT.js → chunk-UXXA4D6K.js} +2 -2
  19. package/dist/{chunk-FVDAZ4XG.js → chunk-VYPSKRPN.js} +219 -137
  20. package/dist/{chunk-CHKCEZBP.js → chunk-WDH5P5RF.js} +2 -2
  21. package/dist/{chunk-BBJ5WAJB.js → chunk-WWMDHZZV.js} +2 -2
  22. package/dist/{chunk-ADSJ2FDA.js → chunk-XY4STOBE.js} +2 -2
  23. package/dist/{chunk-BYWYM2RP.js → chunk-Y3HDZ6OW.js} +2 -2
  24. package/dist/config.js +1 -0
  25. package/dist/{create-agent-K5Q7BFGZ.js → create-agent-7W57J7MT.js} +4 -3
  26. package/dist/{create-annotation-KN3GE3DK.js → create-annotation-W2XELBCQ.js} +4 -3
  27. package/dist/{create-api-key-OQI5PUNQ.js → create-api-key-MKRXKFJM.js} +4 -3
  28. package/dist/{create-dashboard-G4QA5AXP.js → create-dashboard-QGL7IODC.js} +4 -3
  29. package/dist/{create-dataset-WQSC37N7.js → create-dataset-3PH7A4HG.js} +4 -3
  30. package/dist/{create-dataset-records-B4RL3FLC.js → create-dataset-records-4DZS3VRL.js} +4 -3
  31. package/dist/{create-evaluator-YFFQIR7E.js → create-evaluator-YWH6NC4M.js} +4 -3
  32. package/dist/create-mcp-server.js +3 -2
  33. package/dist/{create-project-CUVQ67VN.js → create-project-BOBQ32C5.js} +4 -3
  34. package/dist/{create-prompt-NGXKSP4X.js → create-prompt-FLCFGITE.js} +3 -2
  35. package/dist/{create-prompt-tag-IUKYPVHH.js → create-prompt-tag-EMPNIKEA.js} +3 -2
  36. package/dist/{create-scenario-FNBXALH3.js → create-scenario-BSBIHUL6.js} +4 -3
  37. package/dist/{create-suite-DJEPD4ZB.js → create-suite-TWF6BBR4.js} +4 -3
  38. package/dist/{delete-agent-TJI5XBBM.js → delete-agent-7MSYNY5E.js} +4 -3
  39. package/dist/{delete-annotation-KRP53TUU.js → delete-annotation-ZT5IGN24.js} +4 -3
  40. package/dist/{delete-dashboard-N5SZJIR3.js → delete-dashboard-BTIY5S3L.js} +4 -3
  41. package/dist/{delete-dataset-KDUOHL2P.js → delete-dataset-U45HQHPR.js} +4 -3
  42. package/dist/{delete-dataset-records-DM4W3PAW.js → delete-dataset-records-R43IMAWB.js} +4 -3
  43. package/dist/{delete-evaluator-7ZATLJOA.js → delete-evaluator-U6JMQ6C7.js} +4 -3
  44. package/dist/{delete-prompt-tag-I6HNMSVJ.js → delete-prompt-tag-4EV4TDHB.js} +3 -2
  45. package/dist/{delete-workflow-QEO74JQR.js → delete-workflow-5QYALXEL.js} +4 -3
  46. package/dist/discover-evaluator-schema-MRGHVNTT.js +2175 -0
  47. package/dist/{discover-scenario-schema-MEEEVND7.js → discover-scenario-schema-UPBTCWPG.js} +3 -1
  48. package/dist/{discover-schema-3T52ORPB.js → discover-schema-ICGXPHUW.js} +3 -1
  49. package/dist/{get-agent-3KDWCP5N.js → get-agent-7QJVPH72.js} +4 -3
  50. package/dist/{get-analytics-GPVJX7SF.js → get-analytics-PVERWOA5.js} +3 -2
  51. package/dist/{get-dashboard-YPTIE5YY.js → get-dashboard-ZZPC3WMD.js} +4 -3
  52. package/dist/{get-dataset-6DQFYITM.js → get-dataset-25TB2LQH.js} +4 -3
  53. package/dist/{get-evaluator-PCM6XQAU.js → get-evaluator-3FTRQKEC.js} +4 -3
  54. package/dist/{get-project-JCMWXVLU.js → get-project-5OAXYC57.js} +4 -3
  55. package/dist/{get-prompt-5XAGWWBG.js → get-prompt-I753LZKZ.js} +3 -2
  56. package/dist/{get-scenario-7XBCDZWX.js → get-scenario-DSSTR6FI.js} +4 -3
  57. package/dist/{get-simulation-run-AV24FJWI.js → get-simulation-run-RQPMS2MC.js} +4 -3
  58. package/dist/{get-suite-4DBVHFEM.js → get-suite-GTOCY5PL.js} +4 -3
  59. package/dist/{get-trace-MRBDS3HJ.js → get-trace-O5VT3NAC.js} +7 -9
  60. package/dist/{get-workflow-UR4Y6UFX.js → get-workflow-3EZDOEIF.js} +4 -3
  61. package/dist/http-server-2ACJ3CXW.js +24366 -0
  62. package/dist/index.js +23374 -3140
  63. package/dist/{langwatch-api-annotations-ZJDRB4JH.js → langwatch-api-annotations-E65MI3WZ.js} +4 -3
  64. package/dist/{langwatch-api-dashboards-WARLI6NF.js → langwatch-api-dashboards-QCDECRCY.js} +4 -3
  65. package/dist/{langwatch-api-monitors-4XKXHYCG.js → langwatch-api-monitors-UIO2KTDV.js} +3 -2
  66. package/dist/{langwatch-api-secrets-6SHK5G7Q.js → langwatch-api-secrets-4T2EKSJ7.js} +3 -2
  67. package/dist/{langwatch-api-triggers-5SX6R2WU.js → langwatch-api-triggers-MPOEKPUY.js} +3 -2
  68. package/dist/{langwatch-api-workflows-NLJENNXE.js → langwatch-api-workflows-5HRZ7HR4.js} +4 -3
  69. package/dist/{list-agents-NECO7MPI.js → list-agents-TIJTP566.js} +4 -3
  70. package/dist/{list-annotations-3OJEO774.js → list-annotations-CGX5BT7E.js} +4 -3
  71. package/dist/{list-api-keys-AWW7ROLB.js → list-api-keys-JLWJPFRX.js} +4 -3
  72. package/dist/{list-dashboards-DVPVVVKW.js → list-dashboards-RNIWX3TX.js} +4 -3
  73. package/dist/{list-dataset-records-I4BYORF5.js → list-dataset-records-B5MHZR66.js} +4 -3
  74. package/dist/{list-datasets-WUAE5HGX.js → list-datasets-BVCAMQCP.js} +4 -3
  75. package/dist/{list-evaluators-B6OSVAM2.js → list-evaluators-65FBTL2U.js} +4 -3
  76. package/dist/{list-model-providers-NL6IP4UZ.js → list-model-providers-GRK3I3VV.js} +4 -3
  77. package/dist/{list-projects-5FHMJ4PQ.js → list-projects-JLMBFMW3.js} +4 -3
  78. package/dist/{list-prompt-tags-Z2DD6FLQ.js → list-prompt-tags-UHNWDGQI.js} +3 -2
  79. package/dist/{list-prompts-VNXKHK7T.js → list-prompts-7254B3U7.js} +3 -2
  80. package/dist/{list-scenarios-CFZHXL76.js → list-scenarios-46YNICKM.js} +4 -3
  81. package/dist/{list-simulation-runs-AM2BXLBW.js → list-simulation-runs-LGNEFNPN.js} +4 -3
  82. package/dist/{list-suites-ZDOHAAXF.js → list-suites-5VK4HXEK.js} +4 -3
  83. package/dist/{list-workflows-WBRBKLIT.js → list-workflows-MLQDM6CP.js} +4 -3
  84. package/dist/{rename-prompt-tag-A4RJUK7Z.js → rename-prompt-tag-RHQMNEQL.js} +3 -2
  85. package/dist/report-issue-DXJ6TPTC.js +412 -0
  86. package/dist/{revoke-api-key-ZSPSPF5G.js → revoke-api-key-3Y35EMBT.js} +4 -3
  87. package/dist/{run-agent-JFNDY7MR.js → run-agent-RBSIFKRT.js} +4 -3
  88. package/dist/{run-suite-TH7LO5TJ.js → run-suite-K3DNQ3SE.js} +4 -3
  89. package/dist/{run-workflow-CK3JP5U2.js → run-workflow-5LVBZYLS.js} +4 -3
  90. package/dist/{search-traces-3BBVYPC3.js → search-traces-U4HLOCZ2.js} +9 -2
  91. package/dist/{set-model-provider-WOC5FNMV.js → set-model-provider-V3M5CDIY.js} +4 -3
  92. package/dist/{update-agent-YMEV5MTL.js → update-agent-47RZIHS7.js} +4 -3
  93. package/dist/{update-dataset-EYT5POFM.js → update-dataset-G6QJJGS5.js} +4 -3
  94. package/dist/{update-dataset-record-VFF5JTX4.js → update-dataset-record-RMWLSWCS.js} +4 -3
  95. package/dist/{update-evaluator-6IJHFG2E.js → update-evaluator-SFRRI5Q3.js} +4 -3
  96. package/dist/{update-project-OIT4WPFI.js → update-project-PI5DWBVK.js} +4 -3
  97. package/dist/{update-prompt-ZU2DD6KM.js → update-prompt-RQFTEO7Y.js} +3 -2
  98. package/dist/{update-scenario-3VUTPDRU.js → update-scenario-G3IU2UIB.js} +4 -3
  99. package/dist/{update-suite-C6JFDQHL.js → update-suite-TRGGLNR7.js} +4 -3
  100. package/package.json +20 -18
  101. package/pnpm-workspace.yaml +27 -2
  102. package/pyproject.toml +9 -1
  103. package/src/__tests__/all-tools.integration.test.ts +56 -120
  104. package/src/__tests__/documentation-fetch-security.integration.test.ts +176 -0
  105. package/src/__tests__/langwatch-api.unit.test.ts +206 -0
  106. package/src/__tests__/public-http-request-security.integration.test.ts +118 -0
  107. package/src/__tests__/report-issue.integration.test.ts +147 -0
  108. package/src/__tests__/tools.unit.test.ts +24 -0
  109. package/src/create-mcp-server.ts +43 -29
  110. package/src/documentation-fetch.ts +111 -0
  111. package/src/langwatch-api-agents.ts +2 -2
  112. package/src/langwatch-api.ts +138 -8
  113. package/src/public-http-request.ts +242 -0
  114. package/src/tools/get-trace.ts +2 -12
  115. package/src/tools/report-issue.ts +150 -0
  116. package/src/tools/search-traces.ts +4 -0
  117. package/src/utils/format-evaluations.ts +20 -0
  118. package/tsconfig.json +8 -1
  119. package/uv.lock +259 -205
  120. package/dist/chunk-XC62KJIT.js +0 -71
  121. package/dist/discover-evaluator-schema-H23XCLNE.js +0 -1402
  122. package/dist/http-server-XUQLIFE7.js +0 -226
@@ -1 +1 @@
1
- release-please shadow marker (v2) — next: 0.8.0
1
+ release-please shadow marker (v3), next: 1.0.0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,67 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.0](https://github.com/langwatch/langwatch/compare/mcp-server@v0.10.1...mcp-server@v1.0.0) (2026-07-24)
4
+
5
+
6
+ ### Features
7
+
8
+ * agent issue reports, npx langwatch report at every access point ([#6101](https://github.com/langwatch/langwatch/issues/6101)) ([e881f8e](https://github.com/langwatch/langwatch/commit/e881f8e5ed5e24094e9c55e3f8d390c9ff2f43e4))
9
+ * **errors:** handled-error remediation channel (tips/docsUrl/fault) + shared package ([#5917](https://github.com/langwatch/langwatch/issues/5917)) ([bf9bf5a](https://github.com/langwatch/langwatch/commit/bf9bf5ab61c1c70160be712532a92d81816f77be))
10
+ * **langy:** event-sourced frontend, model-emitted cards, and a home built on one field ([#6027](https://github.com/langwatch/langwatch/issues/6027)) ([5d72c7e](https://github.com/langwatch/langwatch/commit/5d72c7efc7b27fbc683ed77df7a943d01fb6b7a9))
11
+ * **mcp-server:** graduate to 1.0.0 ([fa2341f](https://github.com/langwatch/langwatch/commit/fa2341f3e4e2caafea684886e3f68de99c5e9bd4))
12
+
13
+
14
+ ### Bug Fixes
15
+
16
+ * **deps:** bump @anthropic-ai/claude-code to 2.1.202 with consistent lockfiles ([#5808](https://github.com/langwatch/langwatch/issues/5808)) ([a32cb2d](https://github.com/langwatch/langwatch/commit/a32cb2d7935dab244e05dd6ef360296d90a548d5))
17
+ * **mcp-server:** bump vitest to 4.1.8 for SNYK-JS-VITEST-17375131 ([#5379](https://github.com/langwatch/langwatch/issues/5379)) ([f495f35](https://github.com/langwatch/langwatch/commit/f495f35e385db610bdfbd235992dbcf18df8b1eb))
18
+ * **mcp-server:** keep zod and @modelcontextprotocol/sdk as real dependencies ([#5976](https://github.com/langwatch/langwatch/issues/5976)) ([2a368ef](https://github.com/langwatch/langwatch/commit/2a368eff7f7b1129b992bf3a74259e63cf299140))
19
+ * **mcp-server:** move unused runtime deps to devDependencies (npx cold-start 27s -> 2s) ([#5965](https://github.com/langwatch/langwatch/issues/5965)) ([7c5b49a](https://github.com/langwatch/langwatch/commit/7c5b49a18cc24a1c9f0a462d521c5907e4e98216))
20
+ * **mcp-server:** surface evaluation results in search_traces ([#5983](https://github.com/langwatch/langwatch/issues/5983)) ([dacb1e9](https://github.com/langwatch/langwatch/commit/dacb1e9fbadfb0d156bf44d31cd263720180eded))
21
+ * **security:** harden MCP outbound requests and browser policy ([#6091](https://github.com/langwatch/langwatch/issues/6091)) ([694aeaf](https://github.com/langwatch/langwatch/commit/694aeaf21e8aab41055d027c6106c64d8e67e624))
22
+ * **security:** raise hono and undici floors across npm workspaces ([#5071](https://github.com/langwatch/langwatch/issues/5071)) ([5b5d57a](https://github.com/langwatch/langwatch/commit/5b5d57ac59baa38e90f9db82f3c213a26262bce4))
23
+ * **security:** raise litellm to >=1.84.0 in mcp-server and python-sdk ([cb44747](https://github.com/langwatch/langwatch/commit/cb447477d21feb9448445505bbe088f4b54776dc))
24
+ * **security:** raise litellm to >=1.84.0 in mcp-server and python-sdk (CRITICAL) ([#5230](https://github.com/langwatch/langwatch/issues/5230)) ([cb44747](https://github.com/langwatch/langwatch/commit/cb447477d21feb9448445505bbe088f4b54776dc))
25
+ * **security:** raise mcp-server python-dotenv and python-liquid transitive floors ([#5610](https://github.com/langwatch/langwatch/issues/5610)) ([52db5a4](https://github.com/langwatch/langwatch/commit/52db5a4c69e7a6b7bef9d80cf58d696d44ce4238))
26
+
27
+
28
+ ### Miscellaneous
29
+
30
+ * **deps-dev:** bump @anthropic-ai/claude-code ([acb7ce4](https://github.com/langwatch/langwatch/commit/acb7ce41ac1ec574ed8b1a78aeddd4867246ee5c))
31
+ * **deps-dev:** bump @anthropic-ai/claude-code from 2.1.158 to 2.1.163 in /mcp-server in the npm_and_yarn group across 1 directory ([#4995](https://github.com/langwatch/langwatch/issues/4995)) ([acb7ce4](https://github.com/langwatch/langwatch/commit/acb7ce41ac1ec574ed8b1a78aeddd4867246ee5c))
32
+ * **deps-dev:** bump @anthropic-ai/claude-code from 2.1.163 to 2.1.195 in /mcp-server ([#5376](https://github.com/langwatch/langwatch/issues/5376)) ([5ff4826](https://github.com/langwatch/langwatch/commit/5ff4826214587a6aed784a69578062ab12fd9df1))
33
+ * **deps-dev:** bump @anthropic-ai/claude-code in /mcp-server ([5ff4826](https://github.com/langwatch/langwatch/commit/5ff4826214587a6aed784a69578062ab12fd9df1))
34
+ * **deps-dev:** bump @langwatch/scenario from 0.4.11 to 0.4.15 in /mcp-server ([#5338](https://github.com/langwatch/langwatch/issues/5338)) ([de74e61](https://github.com/langwatch/langwatch/commit/de74e6183244683b650105eea70dda5fe4bda4a4))
35
+ * **deps-dev:** bump @langwatch/scenario in /mcp-server ([de74e61](https://github.com/langwatch/langwatch/commit/de74e6183244683b650105eea70dda5fe4bda4a4))
36
+ * **deps-dev:** bump @types/eslint__js from 8.42.3 to 9.14.0 in /langwatch ([#4605](https://github.com/langwatch/langwatch/issues/4605)) ([b937610](https://github.com/langwatch/langwatch/commit/b937610ea11752f5a07aa111da07e9dd7bbaa9f8))
37
+ * **deps-dev:** bump @typescript/native-preview from 7.0.0-dev.20250911.1 to 7.0.0-dev.20260628.1 in /mcp-server ([#5373](https://github.com/langwatch/langwatch/issues/5373)) ([1ac876f](https://github.com/langwatch/langwatch/commit/1ac876fe55f2c73452c82b9a4219e52980dda9d2))
38
+ * **deps-dev:** bump @typescript/native-preview to 7.0.0-dev.20260628.1 in /mcp-server ([1ac876f](https://github.com/langwatch/langwatch/commit/1ac876fe55f2c73452c82b9a4219e52980dda9d2))
39
+ * **deps-dev:** bump eslint from 10.4.1 to 10.6.0 in /mcp-server ([#5372](https://github.com/langwatch/langwatch/issues/5372)) ([78244c1](https://github.com/langwatch/langwatch/commit/78244c197c8000cb7358f19f7cdcf7e07e93231e))
40
+ * **deps-dev:** bump the typescript-native-preview group across 3 directories with 1 update ([#5721](https://github.com/langwatch/langwatch/issues/5721)) ([6e44614](https://github.com/langwatch/langwatch/commit/6e44614f5b193cf959203bb32e357cc7407e4b16))
41
+ * **deps-dev:** bump the typescript-native-preview group across 3 directories with 1 update ([#5755](https://github.com/langwatch/langwatch/issues/5755)) ([1508d35](https://github.com/langwatch/langwatch/commit/1508d359e5bc5a8f382dbec25d53c5448b910d90))
42
+ * **deps-dev:** bump tsx from 4.22.3 to 4.22.4 in /mcp-server ([#4779](https://github.com/langwatch/langwatch/issues/4779)) ([1e8e538](https://github.com/langwatch/langwatch/commit/1e8e538e57e0096957439a4146a5eea480df3e93))
43
+ * **deps-dev:** bump typescript-eslint from 8.60.0 to 8.62.0 in /mcp-server ([#4880](https://github.com/langwatch/langwatch/issues/4880)) ([5773c2d](https://github.com/langwatch/langwatch/commit/5773c2db77634313075eb58e94190e0d7c146577))
44
+ * **deps-dev:** bump typescript-eslint from 8.62.0 to 8.62.1 in /mcp-server ([#5478](https://github.com/langwatch/langwatch/issues/5478)) ([9250768](https://github.com/langwatch/langwatch/commit/92507686d7d519691b8d53a625c4a67374ded313))
45
+ * **deps-dev:** bump typescript-eslint in /mcp-server ([9250768](https://github.com/langwatch/langwatch/commit/92507686d7d519691b8d53a625c4a67374ded313))
46
+ * **deps-dev:** bump typescript-eslint in /mcp-server ([5773c2d](https://github.com/langwatch/langwatch/commit/5773c2db77634313075eb58e94190e0d7c146577))
47
+ * **deps-dev:** remove redundant @types/eslint__js in /mcp-server ([b937610](https://github.com/langwatch/langwatch/commit/b937610ea11752f5a07aa111da07e9dd7bbaa9f8))
48
+ * **deps:** batch small dependency updates in /langwatch + /mcp-server ([#5447](https://github.com/langwatch/langwatch/issues/5447)) ([daed7b1](https://github.com/langwatch/langwatch/commit/daed7b1325fc06b70c0739849d27280a8a4f6c9c))
49
+ * **deps:** bump @modelcontextprotocol/sdk from 1.26.0 to 1.29.0 in /langwatch ([#4607](https://github.com/langwatch/langwatch/issues/4607)) ([08f2ce6](https://github.com/langwatch/langwatch/commit/08f2ce6b50877edf35ec524e1524afdbb5de53b0))
50
+ * **deps:** bump @opentelemetry/context-async-hooks from 2.7.1 to 2.8.0 in /mcp-server ([#5033](https://github.com/langwatch/langwatch/issues/5033)) ([1506b70](https://github.com/langwatch/langwatch/commit/1506b701e999bc779190bff988942927537cffd1))
51
+ * **deps:** bump @opentelemetry/context-async-hooks in /mcp-server ([1506b70](https://github.com/langwatch/langwatch/commit/1506b701e999bc779190bff988942927537cffd1))
52
+ * **deps:** bump @opentelemetry/sdk-node from 0.217.0 to 0.219.0 in /mcp-server ([#5048](https://github.com/langwatch/langwatch/issues/5048)) ([9f1ef55](https://github.com/langwatch/langwatch/commit/9f1ef5572a9cca3114e583b4a319fb3ec416e080))
53
+ * **deps:** bump @opentelemetry/sdk-node in /mcp-server ([9f1ef55](https://github.com/langwatch/langwatch/commit/9f1ef5572a9cca3114e583b4a319fb3ec416e080))
54
+ * **deps:** bump vitest from 4.1.0 to 4.1.9 in /mcp-server ([#4784](https://github.com/langwatch/langwatch/issues/4784)) ([efe348f](https://github.com/langwatch/langwatch/commit/efe348f4b4e4836f7b27d5ab32673a5bc77323a2))
55
+ * **deps:** bump yargs from 17.7.2 to 18.0.0 in /mcp-server ([#4307](https://github.com/langwatch/langwatch/issues/4307)) ([dddc31d](https://github.com/langwatch/langwatch/commit/dddc31d6901a4d7fc91ea25fe442810dacdbda67))
56
+
57
+ ## [0.10.1](https://github.com/langwatch/langwatch/compare/mcp-server@v0.10.0...mcp-server@v0.10.1) (2026-05-31)
58
+
59
+
60
+ ### Bug Fixes
61
+
62
+ * **mcp-server:** resolve critical/high dependency vulnerabilities (protobufjs, langsmith) ([#4428](https://github.com/langwatch/langwatch/issues/4428)) ([25c0307](https://github.com/langwatch/langwatch/commit/25c0307747e01e3ed81c122ce13d0d57423cbab0))
63
+ * **mcp-server:** resolve critical/high deps vulns (protobufjs, langsmith) ([25c0307](https://github.com/langwatch/langwatch/commit/25c0307747e01e3ed81c122ce13d0d57423cbab0))
64
+
3
65
  ## [0.10.0](https://github.com/langwatch/langwatch/compare/mcp-server@v0.9.0...mcp-server@v0.10.0) (2026-05-29)
4
66
 
5
67
 
package/README.md CHANGED
@@ -4,30 +4,22 @@ MCP server that gives AI coding agents access to LangWatch observability data, p
4
4
 
5
5
  ## Quick Setup
6
6
 
7
- Add to your MCP client configuration (Claude Code, Cursor, etc.):
8
-
9
- ```json
10
- {
11
- "mcpServers": {
12
- "langwatch": {
13
- "command": "npx",
14
- "args": ["-y", "@langwatch/mcp-server"],
15
- "env": {
16
- "LANGWATCH_API_KEY": "your-api-key-here"
17
- }
18
- }
19
- }
20
- }
21
- ```
22
-
23
- For Claude Code, you can also run:
7
+ For Claude Code, run:
24
8
 
25
9
  ```bash
26
10
  claude mcp add langwatch -- npx -y @langwatch/mcp-server --apiKey your-api-key-here
27
11
  ```
28
12
 
13
+ For Claude Code (manual) or other MCP clients (Cursor, Copilot, etc.), add an entry named `langwatch` under the `mcpServers` object of your client's MCP settings file with these fields:
14
+
15
+ - `command`: `npx`
16
+ - `args`: `-y`, then the package name `@langwatch/mcp-server` on a separate token
17
+ - `env.LANGWATCH_API_KEY`: your LangWatch API key
18
+
29
19
  The API key is required for observability and prompt tools. Documentation tools work without it.
30
20
 
21
+ > The config is described in prose rather than as a JSON snippet because some CLI agents (notably Gemini CLI 0.36.0 and earlier) parse `@`-prefixed runs as file paths and can crash with `ENAMETOOLONG` when a multi-line JSON snippet wraps the scoped package name in double quotes. See [#3104](https://github.com/langwatch/langwatch/issues/3104). The bash form above is safe — the package name is followed by a whitespace terminator.
22
+
31
23
  ## Configuration
32
24
 
33
25
  | Env Var | CLI Arg | Description |
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  archiveProject
3
- } from "./chunk-ADSJ2FDA.js";
4
- import "./chunk-42ZHHHIJ.js";
3
+ } from "./chunk-XY4STOBE.js";
4
+ import "./chunk-5UWY24RP.js";
5
5
  import "./chunk-KOO5733S.js";
6
+ import "./chunk-BJ7B4R26.js";
6
7
 
7
8
  // src/tools/archive-project.ts
8
9
  async function handleArchiveProject(params) {
@@ -16,4 +17,4 @@ async function handleArchiveProject(params) {
16
17
  export {
17
18
  handleArchiveProject
18
19
  };
19
- //# sourceMappingURL=archive-project-HZBRPR2S.js.map
20
+ //# sourceMappingURL=archive-project-MK3673A7.js.map
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  archiveScenario
3
- } from "./chunk-CCM4ZFGF.js";
4
- import "./chunk-42ZHHHIJ.js";
3
+ } from "./chunk-O3LWVN67.js";
4
+ import "./chunk-5UWY24RP.js";
5
5
  import "./chunk-KOO5733S.js";
6
+ import "./chunk-BJ7B4R26.js";
6
7
 
7
8
  // src/tools/archive-scenario.ts
8
9
  async function handleArchiveScenario(params) {
@@ -16,4 +17,4 @@ async function handleArchiveScenario(params) {
16
17
  export {
17
18
  handleArchiveScenario
18
19
  };
19
- //# sourceMappingURL=archive-scenario-P5RRITRM.js.map
20
+ //# sourceMappingURL=archive-scenario-KATSXRIN.js.map
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  archiveSuite
3
- } from "./chunk-CHKCEZBP.js";
4
- import "./chunk-42ZHHHIJ.js";
3
+ } from "./chunk-WDH5P5RF.js";
4
+ import "./chunk-5UWY24RP.js";
5
5
  import "./chunk-KOO5733S.js";
6
+ import "./chunk-BJ7B4R26.js";
6
7
 
7
8
  // src/tools/archive-suite.ts
8
9
  async function handleArchiveSuite(params) {
@@ -12,4 +13,4 @@ async function handleArchiveSuite(params) {
12
13
  export {
13
14
  handleArchiveSuite
14
15
  };
15
- //# sourceMappingURL=archive-suite-NUUFD2EM.js.map
16
+ //# sourceMappingURL=archive-suite-C3KX6IIZ.js.map
@@ -1,7 +1,8 @@
1
1
  import {
2
2
  assignPromptTag
3
- } from "./chunk-42ZHHHIJ.js";
3
+ } from "./chunk-5UWY24RP.js";
4
4
  import "./chunk-KOO5733S.js";
5
+ import "./chunk-BJ7B4R26.js";
5
6
 
6
7
  // src/tools/assign-prompt-tag.ts
7
8
  async function handleAssignPromptTag(params) {
@@ -16,4 +17,4 @@ async function handleAssignPromptTag(params) {
16
17
  export {
17
18
  handleAssignPromptTag
18
19
  };
19
- //# sourceMappingURL=assign-prompt-tag-FKCCZPML.js.map
20
+ //# sourceMappingURL=assign-prompt-tag-E3C5W6PI.js.map
@@ -0,0 +1,12 @@
1
+ // src/utils/format-evaluations.ts
2
+ function formatEvaluationLines(evaluations) {
3
+ return evaluations.map((evaluation) => {
4
+ const status = evaluation.passed === true ? "PASSED" : evaluation.passed === false ? "FAILED" : "N/A";
5
+ return `- **${evaluation.name || evaluation.evaluator_id}**: ${status}${evaluation.score != null ? ` (score: ${evaluation.score})` : ""}${evaluation.label ? ` [${evaluation.label}]` : ""}`;
6
+ });
7
+ }
8
+
9
+ export {
10
+ formatEvaluationLines
11
+ };
12
+ //# sourceMappingURL=chunk-37SMPMQS.js.map
@@ -5,13 +5,67 @@ import {
5
5
 
6
6
  // src/langwatch-api.ts
7
7
  var LangWatchApiError = class extends Error {
8
- constructor(message, status, responseBody) {
8
+ constructor(message, status, responseBody, options = {}) {
9
9
  super(message);
10
10
  this.status = status;
11
11
  this.responseBody = responseBody;
12
12
  this.name = "LangWatchApiError";
13
+ this.code = options.code;
14
+ this.tips = options.tips;
15
+ this.docsUrl = options.docsUrl;
16
+ this.fault = options.fault;
17
+ this.reasons = options.reasons;
13
18
  }
19
+ status;
20
+ responseBody;
21
+ code;
22
+ tips;
23
+ docsUrl;
24
+ fault;
25
+ /**
26
+ * The per-field failures behind this error, verbatim from the envelope.
27
+ * A validation failure carries the offending field and the values it would
28
+ * have accepted here — the difference between an agent correcting its own
29
+ * request and an agent guessing again.
30
+ */
31
+ reasons;
14
32
  };
33
+ var VALID_FAULTS = ["customer", "platform", "provider"];
34
+ function parseErrorBody(responseBody) {
35
+ try {
36
+ const parsed = JSON.parse(responseBody);
37
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
38
+ return {};
39
+ }
40
+ const body = parsed;
41
+ const code = typeof body.code === "string" ? body.code : typeof body.error === "string" ? body.error : void 0;
42
+ const message = typeof body.message === "string" ? body.message : void 0;
43
+ if (code === void 0 && message === void 0) {
44
+ return {};
45
+ }
46
+ const tips = Array.isArray(body.tips) && body.tips.every((t) => typeof t === "string") ? body.tips : void 0;
47
+ const docsUrl = typeof body.docsUrl === "string" ? body.docsUrl : void 0;
48
+ const fault = VALID_FAULTS.includes(body.fault) ? body.fault : void 0;
49
+ const reasons = Array.isArray(body.reasons) && body.reasons.every((r) => !!r && typeof r === "object") ? body.reasons : void 0;
50
+ return { code, message, tips, docsUrl, fault, reasons };
51
+ } catch {
52
+ return {};
53
+ }
54
+ }
55
+ function describeReason(reason) {
56
+ const meta = reason.meta;
57
+ if (!meta || typeof meta !== "object") return null;
58
+ const field = typeof meta.field === "string" ? meta.field : null;
59
+ if (!field) return null;
60
+ const parts = [`- ${field}`];
61
+ if (meta.received !== void 0) {
62
+ parts.push(`received ${JSON.stringify(meta.received)}`);
63
+ }
64
+ if (Array.isArray(meta.expected) && meta.expected.length > 0) {
65
+ parts.push(`expected one of: ${meta.expected.join(", ")}`);
66
+ }
67
+ return parts.join(" \u2014 ");
68
+ }
15
69
  async function makeRequest(method, path, body) {
16
70
  const config = getConfig();
17
71
  const url = config.endpoint + path;
@@ -31,10 +85,31 @@ async function makeRequest(method, path, body) {
31
85
  });
32
86
  if (!response.ok) {
33
87
  const responseBody = await response.text();
88
+ const parsed = parseErrorBody(responseBody);
89
+ const lines = [
90
+ `LangWatch API error ${response.status}: ${parsed.message ?? responseBody}`
91
+ ];
92
+ const reasonLines = (parsed.reasons ?? []).map(describeReason).filter((line) => line !== null);
93
+ if (reasonLines.length > 0) {
94
+ lines.push("Rejected fields:", ...reasonLines);
95
+ }
96
+ if (parsed.tips && parsed.tips.length > 0) {
97
+ lines.push("Tips:", ...parsed.tips.map((tip) => `- ${tip}`));
98
+ }
99
+ if (parsed.docsUrl) {
100
+ lines.push(`Docs: ${parsed.docsUrl}`);
101
+ }
34
102
  throw new LangWatchApiError(
35
- `LangWatch API error ${response.status}: ${responseBody}`,
103
+ lines.join("\n"),
36
104
  response.status,
37
- responseBody
105
+ responseBody,
106
+ {
107
+ code: parsed.code,
108
+ tips: parsed.tips,
109
+ docsUrl: parsed.docsUrl,
110
+ fault: parsed.fault,
111
+ reasons: parsed.reasons
112
+ }
38
113
  );
39
114
  }
40
115
  if (response.status === 204 || response.headers?.get("content-length") === "0") {
@@ -139,4 +214,4 @@ export {
139
214
  renamePromptTag,
140
215
  deletePromptTag
141
216
  };
142
- //# sourceMappingURL=chunk-42ZHHHIJ.js.map
217
+ //# sourceMappingURL=chunk-5UWY24RP.js.map
@@ -0,0 +1,42 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
8
+ get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
9
+ }) : x)(function(x) {
10
+ if (typeof require !== "undefined") return require.apply(this, arguments);
11
+ throw Error('Dynamic require of "' + x + '" is not supported');
12
+ });
13
+ var __commonJS = (cb, mod) => function __require2() {
14
+ try {
15
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
+ } catch (e) {
17
+ throw mod = 0, e;
18
+ }
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+
37
+ export {
38
+ __require,
39
+ __commonJS,
40
+ __toESM
41
+ };
42
+ //# sourceMappingURL=chunk-BJ7B4R26.js.map