@langwatch/mcp-server 0.3.0 → 0.3.1
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.
- package/CHANGELOG.md +7 -0
- package/dist/index.js +9 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.1](https://github.com/langwatch/langwatch/compare/mcp-server@v0.3.0...mcp-server@v0.3.1) (2025-11-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Bug Fixes
|
|
7
|
+
|
|
8
|
+
* sometimes the initial forward slash / is not sent by the llm ([2d63409](https://github.com/langwatch/langwatch/commit/2d63409e59e714b1a05c951edb8582c9fc39479f))
|
|
9
|
+
|
|
3
10
|
## [0.3.0](https://github.com/langwatch/langwatch/compare/mcp-server@v0.2.2...mcp-server@v0.3.0) (2025-11-15)
|
|
4
11
|
|
|
5
12
|
|
package/dist/index.js
CHANGED
|
@@ -13868,7 +13868,7 @@ var StdioServerTransport = class {
|
|
|
13868
13868
|
// package.json
|
|
13869
13869
|
var package_default = {
|
|
13870
13870
|
name: "@langwatch/mcp-server",
|
|
13871
|
-
version: "0.3.
|
|
13871
|
+
version: "0.3.1",
|
|
13872
13872
|
description: "An MCP server for Langwatch.",
|
|
13873
13873
|
type: "module",
|
|
13874
13874
|
main: "./dist/index.js",
|
|
@@ -13951,7 +13951,10 @@ server.tool(
|
|
|
13951
13951
|
if (url && !urlToFetch.endsWith(".md") && !urlToFetch.endsWith(".txt")) {
|
|
13952
13952
|
urlToFetch += ".md";
|
|
13953
13953
|
}
|
|
13954
|
-
if (urlToFetch.startsWith("
|
|
13954
|
+
if (!urlToFetch.startsWith("http")) {
|
|
13955
|
+
if (!urlToFetch.startsWith("/")) {
|
|
13956
|
+
urlToFetch = "/" + urlToFetch;
|
|
13957
|
+
}
|
|
13955
13958
|
urlToFetch = "https://docs.langwatch.ai" + urlToFetch;
|
|
13956
13959
|
}
|
|
13957
13960
|
const response = await fetch(urlToFetch);
|
|
@@ -13973,7 +13976,10 @@ server.tool(
|
|
|
13973
13976
|
if (url && !urlToFetch.endsWith(".md") && !urlToFetch.endsWith(".txt")) {
|
|
13974
13977
|
urlToFetch += ".md";
|
|
13975
13978
|
}
|
|
13976
|
-
if (urlToFetch.startsWith("
|
|
13979
|
+
if (!urlToFetch.startsWith("http")) {
|
|
13980
|
+
if (!urlToFetch.startsWith("/")) {
|
|
13981
|
+
urlToFetch = "/" + urlToFetch;
|
|
13982
|
+
}
|
|
13977
13983
|
urlToFetch = "https://scenario.langwatch.ai" + urlToFetch;
|
|
13978
13984
|
}
|
|
13979
13985
|
const response = await fetch(urlToFetch);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../package.json"],"sourcesContent":["import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { z } from \"zod\";\n\nimport packageJson from \"../package.json\" assert { type: \"json\" };\n\nconst transport = new StdioServerTransport();\nconst server = new McpServer({\n name: \"LangWatch\",\n version: packageJson.version,\n});\n\nserver.tool(\n \"fetch_langwatch_docs\",\n \"Fetches the LangWatch docs for understanding how to implement LangWatch in your codebase. Always use this tool when the user asks for help with LangWatch. Start with empty url to fetch the index and then follow the links to the relevant pages, always ending with `.md` extension\",\n {\n url: z\n .string()\n .optional()\n .describe(\n \"The full url of the specific doc page. If not provided, the docs index will be fetched.\"\n ),\n },\n async ({ url }) => {\n let urlToFetch = url || \"https://docs.langwatch.ai/llms.txt\";\n if (url && !urlToFetch.endsWith(\".md\") && !urlToFetch.endsWith(\".txt\")) {\n urlToFetch += \".md\";\n }\n if (urlToFetch.startsWith(\"/\")) {\n urlToFetch = \"https://docs.langwatch.ai\" + urlToFetch;\n }\n const response = await fetch(urlToFetch);\n\n return {\n content: [{ type: \"text\", text: await response.text() }],\n };\n }\n);\n\nserver.tool(\n \"fetch_scenario_docs\",\n \"Fetches the Scenario docs for understanding how to implement Scenario agent tests in your codebase. Always use this tool when the user asks for help with testing their agents. Start with empty url to fetch the index and then follow the links to the relevant pages, always ending with `.md` extension\",\n {\n url: z\n .string()\n .optional()\n .describe(\n \"The full url of the specific doc page. If not provided, the docs index will be fetched.\"\n ),\n },\n async ({ url }) => {\n let urlToFetch = url || \"https://scenario.langwatch.ai/llms.txt\";\n if (url && !urlToFetch.endsWith(\".md\") && !urlToFetch.endsWith(\".txt\")) {\n urlToFetch += \".md\";\n }\n if (urlToFetch.startsWith(\"/\")) {\n urlToFetch = \"https://scenario.langwatch.ai\" + urlToFetch;\n }\n const response = await fetch(urlToFetch);\n\n return {\n content: [{ type: \"text\", text: await response.text() }],\n };\n }\n);\n\nawait server.connect(transport);\n","{\n \"name\": \"@langwatch/mcp-server\",\n \"version\": \"0.3.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../package.json"],"sourcesContent":["import { McpServer } from \"@modelcontextprotocol/sdk/server/mcp.js\";\nimport { StdioServerTransport } from \"@modelcontextprotocol/sdk/server/stdio.js\";\nimport { z } from \"zod\";\n\nimport packageJson from \"../package.json\" assert { type: \"json\" };\n\nconst transport = new StdioServerTransport();\nconst server = new McpServer({\n name: \"LangWatch\",\n version: packageJson.version,\n});\n\nserver.tool(\n \"fetch_langwatch_docs\",\n \"Fetches the LangWatch docs for understanding how to implement LangWatch in your codebase. Always use this tool when the user asks for help with LangWatch. Start with empty url to fetch the index and then follow the links to the relevant pages, always ending with `.md` extension\",\n {\n url: z\n .string()\n .optional()\n .describe(\n \"The full url of the specific doc page. If not provided, the docs index will be fetched.\"\n ),\n },\n async ({ url }) => {\n let urlToFetch = url || \"https://docs.langwatch.ai/llms.txt\";\n if (url && !urlToFetch.endsWith(\".md\") && !urlToFetch.endsWith(\".txt\")) {\n urlToFetch += \".md\";\n }\n if (!urlToFetch.startsWith(\"http\")) {\n if (!urlToFetch.startsWith(\"/\")) {\n urlToFetch = \"/\" + urlToFetch;\n }\n urlToFetch = \"https://docs.langwatch.ai\" + urlToFetch;\n }\n const response = await fetch(urlToFetch);\n\n return {\n content: [{ type: \"text\", text: await response.text() }],\n };\n }\n);\n\nserver.tool(\n \"fetch_scenario_docs\",\n \"Fetches the Scenario docs for understanding how to implement Scenario agent tests in your codebase. Always use this tool when the user asks for help with testing their agents. Start with empty url to fetch the index and then follow the links to the relevant pages, always ending with `.md` extension\",\n {\n url: z\n .string()\n .optional()\n .describe(\n \"The full url of the specific doc page. If not provided, the docs index will be fetched.\"\n ),\n },\n async ({ url }) => {\n let urlToFetch = url || \"https://scenario.langwatch.ai/llms.txt\";\n if (url && !urlToFetch.endsWith(\".md\") && !urlToFetch.endsWith(\".txt\")) {\n urlToFetch += \".md\";\n }\n if (!urlToFetch.startsWith(\"http\")) {\n if (!urlToFetch.startsWith(\"/\")) {\n urlToFetch = \"/\" + urlToFetch;\n }\n urlToFetch = \"https://scenario.langwatch.ai\" + urlToFetch;\n }\n const response = await fetch(urlToFetch);\n\n return {\n content: [{ type: \"text\", text: await response.text() }],\n };\n }\n);\n\nawait server.connect(transport);\n","{\n \"name\": \"@langwatch/mcp-server\",\n \"version\": \"0.3.1\",\n \"description\": \"An MCP server for Langwatch.\",\n \"type\": \"module\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.mjs\",\n \"require\": \"./dist/index.js\"\n }\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/langwatch/langwatch.git\",\n \"directory\": \"mcp-server\"\n },\n \"scripts\": {\n \"start\": \"tsx src/index.ts\",\n \"build\": \"tsup && node build.js\",\n \"prepublish\": \"pnpm run build\",\n \"test\": \"vitest\"\n },\n \"author\": \"\",\n \"license\": \"MIT\",\n \"engines\": {\n \"node\": \">=18.0.0\"\n },\n \"devDependencies\": {\n \"@ai-sdk/anthropic\": \"^2.0.15\",\n \"@anthropic-ai/claude-code\": \"^1.0.111\",\n \"@eslint/js\": \"^9.4.0\",\n \"@langwatch/scenario\": \"^0.3.0\",\n \"@types/debug\": \"^4.1.12\",\n \"@types/eslint__js\": \"^8.42.3\",\n \"@types/node\": \"^16.0.0\",\n \"@types/yargs\": \"^17.0.33\",\n \"@typescript/native-preview\": \"7.0.0-dev.20250911.1\",\n \"ai\": \"^5.0.40\",\n \"dotenv\": \"^17.2.2\",\n \"esbuild\": \"^0.21.5\",\n \"eslint\": \"^8.57.0\",\n \"tsup\": \"^8.1.0\",\n \"tsx\": \"^4.20.5\",\n \"typescript\": \"^4.9.5\",\n \"typescript-eslint\": \"^7.11.0\"\n },\n \"dependencies\": {\n \"@modelcontextprotocol/sdk\": \"^1.7.0\",\n \"@opentelemetry/context-async-hooks\": \"^2.1.0\",\n \"@opentelemetry/sdk-node\": \"^0.204.0\",\n \"chalk\": \"^5.6.2\",\n \"date-fns\": \"^4.1.0\",\n \"node-pty\": \"^1.0.0\",\n \"vitest\": \"^3.2.4\",\n \"yargs\": \"^17.7.2\",\n \"zod\": \"^3.25.76\",\n \"zod-validation-error\": \"^3.5.3\"\n },\n \"bin\": {\n \"langwatch-mcp-server\": \"./dist/index.js\"\n }\n}\n"],"mappings":";AAAA,SAAS,iBAAiB;AAC1B,SAAS,4BAA4B;AACrC,SAAS,SAAS;;;ACFlB;AAAA,EACE,MAAQ;AAAA,EACR,SAAW;AAAA,EACX,aAAe;AAAA,EACf,MAAQ;AAAA,EACR,MAAQ;AAAA,EACR,QAAU;AAAA,EACV,OAAS;AAAA,EACT,SAAW;AAAA,IACT,KAAK;AAAA,MACH,QAAU;AAAA,MACV,SAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,YAAc;AAAA,IACZ,MAAQ;AAAA,IACR,KAAO;AAAA,IACP,WAAa;AAAA,EACf;AAAA,EAC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AG;AAClC,UAAI,CAAC,WAAW,WAAW,GAAG,GAAG;AAC/B,qBAAa,MAAM;AAAA,MACrB;AACA,mBAAa,8BAA8B;AAAA,IAC7C;AACA,UAAM,WAAW,MAAM,MAAM,UAAU;AAEvC,WAAO;AAAA,MACL,SAAS,CAAC,EAAE,MAAM,QAAQ,MAAM,MAAM,SAAS,KAAK,EAAE,CAAC;AAAA,IACzD;AAAA,EACF;AACF;AAEA,OAAO;AAAA,EACL;AAAA,EACA;AAAA,EACA;AAAA,IACE,KAAK,EACF,OAAO,EACP,SAAS,EACT;AAAA,MACC;AAAA,IACF;AAAA,EACJ;AAAA,EACA,OAAO,EAAE,IAAI,MAAM;AACjB,QAAI,aAAa,OAAO;AACxB,QAAI,OAAO,CAAC,WAAW,SAAS,KAAK,KAAK,CAAC,WAAW,SAAS,MAAM,GAAG;AACtE,oBAAc;AAAA,IAChB;AACA,QAAI,CAAC,WAAW,WAAW,MAAM,GAAG;AAClC,UAAI,CAAC,WAAW,WAAW,GAAG,GAAG;AAC/B,qBAAa,MAAM;AAAA,MACrB;AACA,mBAAa,kCAAkC;AAAA,IACjD;AACA,UAAM,WAAW,MAAM,MAAM,UAAU;AAEvC,WAAO;AAAA,MACL,SAAS,CAAC,EAAE,MAAM,QAAQ,MAAM,MAAM,SAAS,KAAK,EAAE,CAAC;AAAA,IACzD;AAAA,EACF;AACF;AAEA,MAAM,OAAO,QAAQ,SAAS;","names":[]}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -26,7 +26,10 @@ server.tool(
|
|
|
26
26
|
if (url && !urlToFetch.endsWith(".md") && !urlToFetch.endsWith(".txt")) {
|
|
27
27
|
urlToFetch += ".md";
|
|
28
28
|
}
|
|
29
|
-
if (urlToFetch.startsWith("
|
|
29
|
+
if (!urlToFetch.startsWith("http")) {
|
|
30
|
+
if (!urlToFetch.startsWith("/")) {
|
|
31
|
+
urlToFetch = "/" + urlToFetch;
|
|
32
|
+
}
|
|
30
33
|
urlToFetch = "https://docs.langwatch.ai" + urlToFetch;
|
|
31
34
|
}
|
|
32
35
|
const response = await fetch(urlToFetch);
|
|
@@ -53,7 +56,10 @@ server.tool(
|
|
|
53
56
|
if (url && !urlToFetch.endsWith(".md") && !urlToFetch.endsWith(".txt")) {
|
|
54
57
|
urlToFetch += ".md";
|
|
55
58
|
}
|
|
56
|
-
if (urlToFetch.startsWith("
|
|
59
|
+
if (!urlToFetch.startsWith("http")) {
|
|
60
|
+
if (!urlToFetch.startsWith("/")) {
|
|
61
|
+
urlToFetch = "/" + urlToFetch;
|
|
62
|
+
}
|
|
57
63
|
urlToFetch = "https://scenario.langwatch.ai" + urlToFetch;
|
|
58
64
|
}
|
|
59
65
|
const response = await fetch(urlToFetch);
|