@langwatch/mcp-server 0.2.2 → 0.3.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.3.0](https://github.com/langwatch/langwatch/compare/mcp-server@v0.2.2...mcp-server@v0.3.0) (2025-11-15)
4
+
5
+
6
+ ### Features
7
+
8
+ * remove the need of passing a langwatch api key for using the mcp ([#817](https://github.com/langwatch/langwatch/issues/817)) ([66e49b5](https://github.com/langwatch/langwatch/commit/66e49b5c640d0c220aa08e198fb4dbf24681d567))
9
+
3
10
  ## [0.2.2](https://github.com/langwatch/langwatch/compare/mcp-server@v0.2.1...mcp-server@v0.2.2) (2025-11-13)
4
11
 
5
12
 
package/README.md CHANGED
@@ -1,32 +1,24 @@
1
1
  # LangWatch 🏰 MCP Server
2
2
 
3
- The LangWatch MCP Server is a tool designed to automatically instrument your AI code with LangWatch monitoring via the [Model Context Protocol](https://modelcontextprotocol.io/introduction).
3
+ The LangWatch MCP Server makes your AI coding assistant an expert in both [LangWatch](https://docs.langwatch.ai/), for automatically instrumenting your code, managing versioned prompts and creating evaluations; and [Scenario](https://scenario.langwatch.ai/), for automatically testing your agents via simulations.
4
4
 
5
- This server facilitates LLM development by helping AI coding assistants automatically add LangWatch instrumentation to your codebase, then use those traces to analyze and debug the very AI agents they're building.
5
+ ## Setup in your Coding Assistant 👩‍💻
6
6
 
7
- ## Setup in your Codebase
8
-
9
- Check out [LangWatch integration guide](https://docs.langwatch.ai/integration/overview) to start tracking your agents so both you and Cursor/Windsurf/Claude Code or your favorite coding assistant can debug it.
10
-
11
- ## Setup in Cursor 👩‍💻
12
-
13
- 1. Navigate to the Cursor Settings
14
- 2. Navigate to the MCP item in the sidebar
7
+ 1. Open Cursor/Claude Code/your editor Settings
8
+ 2. Navigate to the MCP settings
15
9
  3. Set the "name" as "LangWatch"
16
- 4. Set the "type" to `command`
17
- 5. Set the "command" to `npx -y @langwatch/mcp-server --apiKey=sk-lw-...`
18
-
19
- - `--apiKey`: Your LangWatch API key. This is mandatory and must be provided.
20
- - `--endpoint`: _Optional_ The endpoint for the LangWatch API. Defaults to `https://app.langwatch.ai` if not specified.
21
-
22
- > [!TIP]
23
- > To aid in securing your keys, the MCP will first look at the global system environment variables `LANGWATCH_API_KEY` and `LANGWATCH_ENDPOINT` to check if they have values as well as looking at arguments passed into the server on start.
24
-
25
- <picture>
26
- <source media="(prefers-color-scheme: dark)" srcset="../assets/mcp-server/cursor-setup.dark.webp">
27
- <source media="(prefers-color-scheme: light)" srcset="../assets/mcp-server/cursor-setup.light.webp">
28
- <img alt="LangWatch Logo" src="../assets/mcp-server/cursor-setup.light.webp" width="900">
29
- </picture>
10
+ 4. Add the LangWatch MCP:
11
+
12
+ ```json
13
+ {
14
+ "mcpServers": {
15
+ "langwatch": {
16
+ "command": "npx",
17
+ "args": ["-y", "@langwatch/mcp-server"]
18
+ }
19
+ }
20
+ }
21
+ ```
30
22
 
31
23
  ## Tools
32
24
 
@@ -38,43 +30,28 @@ The MCP Server provides the following tools:
38
30
  - **Parameters:**
39
31
  - `url`: (Optional) The full url of the specific doc page. If not provided, the docs index will be fetched.
40
32
 
41
- ### `get_latest_traces`
33
+ ### `fetch_scenario_docs`
42
34
 
43
- - **Description:** Retrieves the latest LLM traces.
35
+ - **Description:** Fetches Scenario docs for understanding how to write agent simulations to test the agents on your codebase.
44
36
  - **Parameters:**
45
- - `pageOffset` (optional): The page offset for pagination.
46
- - `daysBackToSearch` (optional): The number of days back to search for traces. Defaults to 1.
47
-
48
- ### `get_trace_by_id`
49
-
50
- - **Description:** Retrieves a specific LLM trace by its ID.
51
- - **Parameters:**
52
- - `id`: The ID of the trace to retrieve.
53
-
54
- ## Usage in Cursor
55
-
56
- To use these tools within Cursor, follow these steps:
37
+ - `url`: (Optional) The full url of the specific doc page. If not provided, the docs index will be fetched.
57
38
 
58
- 1. **Open the Cursor Chat view:**
39
+ ## Example Usage
59
40
 
60
- - `Cmd + I`
41
+ Ask your coding assistant to instrument your code:
61
42
 
62
- 2. **Ensure the MCP server is running:**
43
+ > "Can you instrument my LLM code with LangWatch"
63
44
 
64
- 3. **Interact with your Agent:**
65
- - Ask a question like the following to test the tools are accessible: \*Note: When the tool is detected, you'll need to run `Run tool` in the chat view for it to be called.
45
+ Or ask it to write a scenario test:
66
46
 
67
- > "I just ran into an issue while debugging, can you check the latest traces and fix it?"
47
+ > "Can you implement a scenario test for my agent?"
68
48
 
69
- <picture>
70
- <source media="(prefers-color-scheme: dark)" srcset="../assets/mcp-server/cursor-example.dark.webp">
71
- <source media="(prefers-color-scheme: light)" srcset="../assets/mcp-server/cursor-example.light.webp">
72
- <img alt="LangWatch Logo" src="../assets/mcp-server/cursor-example.light.webp" width="900">
73
- </picture>
49
+ <img alt="LangWatch MCP Cursor Example" src="../assets/mcp-server/cursor-example.png" width="900">
74
50
 
75
51
  ## 🛟 Support
76
52
 
77
53
  If you have questions or need help, join our community:
78
54
 
79
55
  - [Discord Community](https://discord.gg/kT4PhDS2gH)
56
+ - [LangWatch Docs](https://docs.langwatch.ai/)
80
57
  - [Email Support](mailto:support@langwatch.ai)