Skip to content

Commit edaf0b6

Browse files
committed
docs(mcp): add debugger guide and update development docs #371
- Add new MCP debugger documentation with usage instructions - Rename and update development guide for MCP server - Refactor UI components to improve tool display flow
1 parent 6a9d379 commit edaf0b6

File tree

4 files changed

+50
-5
lines changed

4 files changed

+50
-5
lines changed

core/src/main/kotlin/cc/unitmesh/devti/mcp/editor/McpPreviewEditor.kt

+5-2
Original file line numberDiff line numberDiff line change
@@ -248,10 +248,13 @@ open class McpPreviewEditor(
248248
result.append(chunk)
249249
SwingUtilities.invokeLater {
250250
resultPanel.setText(result.toString())
251-
mainPanel.revalidate()
252-
mainPanel.repaint()
253251
}
254252
}
253+
254+
resultPanel.parseAndShowTools(result.toString())
255+
256+
mainPanel.revalidate()
257+
mainPanel.repaint()
255258
}
256259
}
257260

core/src/main/kotlin/cc/unitmesh/devti/mcp/ui/McpChatResultPanel.kt

+1-2
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,9 @@ class McpChatResultPanel(private val project: Project, val config: McpChatConfig
9090

9191
fun setText(text: String) {
9292
rawResultTextArea.text = text
93-
parseAndShowTools(text)
9493
}
9594

96-
private fun parseAndShowTools(text: String) {
95+
fun parseAndShowTools(text: String) {
9796
toolsPanel.removeAll()
9897

9998
toolCalls = ToolCall.fromString(text)

docs/mcp/develop-mcp.md renamed to docs/mcp/development.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ layout: default
33
title: Develop MCP Server
44
nav_order: 3
55
parent: MCP
6+
permalink: /mcp/development
67
---
78

9+
## Build Server
10+
811
Resources
912

1013
- [MCP For Server Developers](https://modelcontextprotocol.io/quickstart/server)
@@ -14,7 +17,8 @@ Since MVP Specification has different version, we recommend you keep same with A
1417
- Kotlin SDK: io.modelcontextprotocol:kotlin-sdk:0.4.0
1518
- Java SDK: io.modelcontextprotocol.sdk:mcp:0.8.1
1619

17-
## Test
20+
21+
## Test Your Server with RPC Command
1822

1923
Start the server, and paste follow message:
2024

docs/mcp/mcp-debugger.md

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
---
2+
layout: default
3+
title: MCP Debugger
4+
nav_order: 4
5+
parent: MCP
6+
permalink: /mcp/mcp-debugger
7+
---
8+
9+
## AutoDev MCP debugger
10+
11+
<img src="https://unitmesh.cc/auto-dev/mcp-debugger.png" alt="Inline Chat" width="600px"/>
12+
13+
create a file end with `.mcp.json` in your project root directory, and add the following content:
14+
15+
```json
16+
{
17+
"mcpServers": {
18+
"filesystem": {
19+
"command": "npx",
20+
"args": [
21+
"-y",
22+
"@modelcontextprotocol/server-filesystem",
23+
"/Volumes/source/ai/autocrud"
24+
]
25+
}
26+
}
27+
}
28+
```
29+
30+
Then, click show preview in File toolbar, you can see:
31+
32+
- MCP Server/Tool LIST
33+
- MCP Model Configured
34+
- MCP Chat input box
35+
36+
After send a message, you can see the response in the console:
37+
38+
<img src="https://unitmesh.cc/auto-dev/mcp-debugger-chat.png" alt="Inline Chat" width="600px"/>
39+

0 commit comments

Comments
 (0)