@langwatch/mcp-server 0.3.2 → 0.3.3
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.d.ts +2 -0
- package/dist/index.js +13996 -0
- package/dist/index.js.map +1 -0
- package/package.json +8 -8
|
@@ -0,0 +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://langwatch.ai/docs/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://langwatch.ai/docs\" + 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://langwatch.ai/scenario/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://langwatch.ai/scenario\" + 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.3\",\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,EACA,SAAW;AAAA,IACT,OAAS;AAAA,IACT,OAAS;AAAA,IACT,YAAc;AAAA,IACd,MAAQ;AAAA,EACV;AAAA,EACA,QAAU;AAAA,EACV,SAAW;AAAA,EACX,SAAW;AAAA,IACT,MAAQ;AAAA,EACV;AAAA,EACA,iBAAmB;AAAA,IACjB,qBAAqB;AAAA,IACrB,6BAA6B;AAAA,IAC7B,cAAc;AAAA,IACd,uBAAuB;AAAA,IACvB,gBAAgB;AAAA,IAChB,qBAAqB;AAAA,IACrB,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,8BAA8B;AAAA,IAC9B,IAAM;AAAA,IAC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,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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langwatch/mcp-server",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "An MCP server for Langwatch.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -17,12 +17,6 @@
|
|
|
17
17
|
"url": "https://github.com/langwatch/langwatch.git",
|
|
18
18
|
"directory": "mcp-server"
|
|
19
19
|
},
|
|
20
|
-
"scripts": {
|
|
21
|
-
"start": "tsx src/index.ts",
|
|
22
|
-
"build": "tsup && node build.js",
|
|
23
|
-
"prepublish": "pnpm run build",
|
|
24
|
-
"test": "vitest"
|
|
25
|
-
},
|
|
26
20
|
"author": "",
|
|
27
21
|
"license": "MIT",
|
|
28
22
|
"engines": {
|
|
@@ -61,5 +55,11 @@
|
|
|
61
55
|
},
|
|
62
56
|
"bin": {
|
|
63
57
|
"langwatch-mcp-server": "./dist/index.js"
|
|
58
|
+
},
|
|
59
|
+
"scripts": {
|
|
60
|
+
"start": "tsx src/index.ts",
|
|
61
|
+
"build": "tsup && node build.js",
|
|
62
|
+
"prepublish": "pnpm run build",
|
|
63
|
+
"test": "vitest"
|
|
64
64
|
}
|
|
65
|
-
}
|
|
65
|
+
}
|