@standardbeagle/mcp-tui 0.1.0 → 0.2.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/README.md +459 -122
- package/bin/mcp-tui +0 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,208 +1,545 @@
|
|
|
1
1
|
# MCP-TUI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**The fastest way to test, debug, and interact with Model Context Protocol servers.**
|
|
4
|
+
|
|
5
|
+
Stop struggling with curl commands, JSON formatting, and connection issues. MCP-TUI gives you instant visual access to any MCP server's tools, resources, and prompts - whether you need quick testing, automated scripting, or deep debugging.
|
|
6
|
+
|
|
7
|
+
## 🎯 Why Choose MCP-TUI?
|
|
8
|
+
|
|
9
|
+
**For Developers:**
|
|
10
|
+
- **⚡ Zero Setup Testing** - Connect to any MCP server in one command, no configuration files needed
|
|
11
|
+
- **🔍 Visual Debugging** - See exactly what your server exposes and how it responds in real-time
|
|
12
|
+
- **🤖 Automation Ready** - Script complex workflows with full CLI automation support
|
|
13
|
+
- **🛡️ Production Confidence** - Test error scenarios with included problematic servers before deployment
|
|
14
|
+
|
|
15
|
+
**For Teams:**
|
|
16
|
+
- **📋 Consistent Testing** - Standardized interface for testing all MCP servers across your organization
|
|
17
|
+
- **🌍 Universal Compatibility** - Works with any MCP server regardless of language or transport method
|
|
18
|
+
- **📊 Clear Reporting** - Structured output perfect for CI/CD pipelines and documentation
|
|
19
|
+
- **🚀 Faster Development** - Reduce debugging time from hours to minutes
|
|
20
|
+
|
|
21
|
+
## ✨ What You Get
|
|
22
|
+
|
|
23
|
+
### Interactive Visual Interface
|
|
24
|
+
**Problem Solved:** No more writing curl commands or parsing JSON responses manually
|
|
25
|
+
- Browse all available tools, resources, and prompts in an intuitive interface
|
|
26
|
+
- Execute tools with guided form inputs and see results immediately
|
|
27
|
+
- Real-time progress tracking for long-running operations
|
|
28
|
+
- Built-in clipboard support for easy data transfer
|
|
29
|
+
|
|
30
|
+
### Scriptable Automation
|
|
31
|
+
**Problem Solved:** Integrate MCP testing into CI/CD pipelines and automated workflows
|
|
32
|
+
- Full command-line interface for scripting and automation
|
|
33
|
+
- JSON output support for integration with other tools
|
|
34
|
+
- Batch operations and parallel execution capabilities
|
|
35
|
+
- Exit codes and error handling perfect for scripts
|
|
36
|
+
|
|
37
|
+
### Universal Transport Support
|
|
38
|
+
**Problem Solved:** Connect to any MCP server regardless of how it's built
|
|
39
|
+
- STDIO transport for local processes and development
|
|
40
|
+
- HTTP/SSE transport for web services and cloud deployments
|
|
41
|
+
- Automatic transport detection based on connection parameters
|
|
42
|
+
- Cross-platform process management with proper cleanup
|
|
43
|
+
|
|
44
|
+
### Robust Error Handling
|
|
45
|
+
**Problem Solved:** Understand exactly what's wrong when servers misbehave
|
|
46
|
+
- Structured error messages with actionable guidance
|
|
47
|
+
- Comprehensive debug logging for deep troubleshooting
|
|
48
|
+
- Test servers that simulate real-world failure scenarios
|
|
49
|
+
- Graceful degradation when servers become unresponsive
|
|
50
|
+
|
|
51
|
+
## 🚀 Get Started in 30 Seconds
|
|
52
|
+
|
|
53
|
+
### Installation
|
|
54
|
+
|
|
55
|
+
**Option 1: Go (Recommended)**
|
|
56
|
+
```bash
|
|
57
|
+
go install github.com/standardbeagle/mcp-tui@latest
|
|
58
|
+
```
|
|
59
|
+
*Benefits: Always up-to-date, fastest installation, works offline*
|
|
4
60
|
|
|
5
|
-
|
|
61
|
+
**Option 2: npm**
|
|
62
|
+
```bash
|
|
63
|
+
npm install -g @standardbeagle/mcp-tui
|
|
64
|
+
# or use directly: npx @standardbeagle/mcp-tui
|
|
65
|
+
```
|
|
66
|
+
*Benefits: Familiar for Node.js developers, automatic updates*
|
|
6
67
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
- **Progress Tracking**: Real-time progress display for long-running operations with elapsed time
|
|
15
|
-
- **Scrollable Output**: Large results can be scrolled with arrow keys, PgUp/PgDn
|
|
16
|
-
- **Clipboard Support**: Paste with right-click (Windows Terminal) or terminal's paste shortcut
|
|
68
|
+
**Option 3: Build from source**
|
|
69
|
+
```bash
|
|
70
|
+
git clone https://github.com/standardbeagle/mcp-tui.git
|
|
71
|
+
cd mcp-tui
|
|
72
|
+
make install
|
|
73
|
+
```
|
|
74
|
+
*Benefits: Latest features, customizable, contribute back*
|
|
17
75
|
|
|
18
|
-
|
|
76
|
+
### Instant Connection - Choose Your Style
|
|
19
77
|
|
|
20
|
-
|
|
78
|
+
**🎯 Just Getting Started? Try This:**
|
|
79
|
+
```bash
|
|
80
|
+
# One command gets you browsing any MCP server visually
|
|
81
|
+
mcp-tui "npx -y @modelcontextprotocol/server-everything stdio"
|
|
82
|
+
```
|
|
83
|
+
*Why this works: Skips all setup, connects instantly, shows you everything the server can do*
|
|
21
84
|
|
|
85
|
+
**🤖 Building Automation? Use CLI Mode:**
|
|
22
86
|
```bash
|
|
23
|
-
|
|
87
|
+
# List all available tools
|
|
88
|
+
mcp-tui "npx -y @modelcontextprotocol/server-everything stdio" tool list
|
|
89
|
+
|
|
90
|
+
# Execute a specific tool with parameters
|
|
91
|
+
mcp-tui "npx -y @modelcontextprotocol/server-everything stdio" tool call echo message="Hello World"
|
|
92
|
+
|
|
93
|
+
# Get JSON output for your scripts
|
|
94
|
+
mcp-tui --json "npx -y @modelcontextprotocol/server-everything stdio" tool list
|
|
24
95
|
```
|
|
96
|
+
*Why this works: Perfect for CI/CD, scripts, and automated testing workflows*
|
|
25
97
|
|
|
26
|
-
|
|
98
|
+
**🌐 Have a Web Service? Connect via HTTP:**
|
|
99
|
+
```bash
|
|
100
|
+
# Visual interface for web-based MCP servers
|
|
101
|
+
mcp-tui --url http://localhost:8000/mcp
|
|
27
102
|
|
|
103
|
+
# Automated testing of web services
|
|
104
|
+
mcp-tui --url http://localhost:8000/mcp tool list
|
|
105
|
+
```
|
|
106
|
+
*Why this works: No need to understand HTTP protocols, handles authentication automatically*
|
|
107
|
+
|
|
108
|
+
**🔧 Need Interactive Setup?**
|
|
28
109
|
```bash
|
|
29
|
-
#
|
|
30
|
-
|
|
110
|
+
# Guided connection setup with helpful prompts
|
|
111
|
+
mcp-tui
|
|
112
|
+
```
|
|
113
|
+
*Why this works: Perfect when you're exploring or don't know the exact server parameters*
|
|
114
|
+
|
|
115
|
+
## 🎮 Real-World Usage Scenarios
|
|
31
116
|
|
|
32
|
-
|
|
33
|
-
|
|
117
|
+
### Scenario 1: Testing Your New MCP Server
|
|
118
|
+
```bash
|
|
119
|
+
# Start your server development with confidence
|
|
120
|
+
mcp-tui "python my_awesome_server.py"
|
|
34
121
|
```
|
|
122
|
+
**What happens:** Instantly see all tools your server exposes, test each one interactively, catch errors before your users do.
|
|
35
123
|
|
|
36
|
-
###
|
|
124
|
+
### Scenario 2: CI/CD Integration Testing
|
|
125
|
+
```bash
|
|
126
|
+
# Add to your GitHub Actions or CI pipeline
|
|
127
|
+
mcp-tui --json "docker run my-mcp-server" tool list | jq '.tools | length'
|
|
128
|
+
```
|
|
129
|
+
**What happens:** Automated verification that your server deployment is working correctly.
|
|
37
130
|
|
|
131
|
+
### Scenario 3: Debugging Production Issues
|
|
38
132
|
```bash
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
go build -o mcp-tui .
|
|
133
|
+
# Quickly diagnose what's wrong with a misbehaving server
|
|
134
|
+
mcp-tui --debug --log-level debug "problematic-server-command"
|
|
42
135
|
```
|
|
136
|
+
**What happens:** Detailed logs show exactly where communication breaks down.
|
|
137
|
+
|
|
138
|
+
### Scenario 4: API Documentation Generation
|
|
139
|
+
```bash
|
|
140
|
+
# Generate documentation from your server's actual capabilities
|
|
141
|
+
mcp-tui --json "my-server" tool list > api-docs.json
|
|
142
|
+
```
|
|
143
|
+
**What happens:** Always up-to-date documentation that reflects your server's real state.
|
|
144
|
+
|
|
145
|
+
## 📚 Documentation Hub
|
|
146
|
+
|
|
147
|
+
**New to MCP-TUI?**
|
|
148
|
+
- **[Quick Start Guide](QUICK_START.md)** - 🚀 Connect to any MCP server in under 60 seconds
|
|
149
|
+
- **[User Guide](USER_GUIDE.md)** - 🎮 Complete tutorials and real-world workflows
|
|
150
|
+
- **[Examples Showcase](EXAMPLES.md)** - 📊 See how others use MCP-TUI in production
|
|
151
|
+
|
|
152
|
+
**Building with MCP-TUI?**
|
|
153
|
+
- **[Developer Benefits](DEVELOPER_BENEFITS.md)** - 💼 Why developers choose MCP-TUI for their workflow
|
|
154
|
+
- **[Development Guide](CLAUDE.md)** - 🛠️ Complete development environment setup and productivity tips
|
|
155
|
+
- **[Architecture Guide](ARCHITECTURE.md)** - 🏗️ Technical design decisions and their benefits
|
|
43
156
|
|
|
44
|
-
|
|
157
|
+
**Contributing Back?**
|
|
158
|
+
- **[Contributing Guide](CONTRIBUTING.md)** - 🤝 How your contributions make a difference
|
|
159
|
+
- **[Troubleshooting Guide](TROUBLESHOOTING.md)** - 🔧 Solutions to common issues
|
|
160
|
+
|
|
161
|
+
*Each guide is designed to get you productive quickly with clear benefits and practical examples.*
|
|
162
|
+
|
|
163
|
+
## 🏗️ Why MCP-TUI is Built Right
|
|
164
|
+
|
|
165
|
+
**The Architecture That Solves Real Problems:**
|
|
166
|
+
|
|
167
|
+
MCP-TUI's architecture directly addresses the pain points developers face when working with MCP servers:
|
|
168
|
+
|
|
169
|
+
### 🛡️ Problem: MCP Servers Often Crash or Misbehave
|
|
170
|
+
**Solution: Bulletproof Error Handling**
|
|
171
|
+
- Graceful recovery from server crashes
|
|
172
|
+
- Clear error messages that help you fix issues quickly
|
|
173
|
+
- Built-in test servers that simulate real-world failures
|
|
174
|
+
- No cryptic JSON-RPC error codes - just plain English explanations
|
|
175
|
+
|
|
176
|
+
### 🌍 Problem: Different Servers Use Different Connection Methods
|
|
177
|
+
**Solution: Universal Transport Layer**
|
|
178
|
+
- Works with STDIO, HTTP, and SSE servers without configuration
|
|
179
|
+
- Automatic connection type detection
|
|
180
|
+
- Platform-specific optimizations for Windows, macOS, and Linux
|
|
181
|
+
- Handles process lifecycle management so you don't have to
|
|
182
|
+
|
|
183
|
+
### 📊 Problem: Hard to Test and Debug MCP Integrations
|
|
184
|
+
**Solution: Developer-First Design**
|
|
185
|
+
- Visual interface shows exactly what your server exposes
|
|
186
|
+
- CLI mode perfect for automated testing
|
|
187
|
+
- Structured logging reveals what's happening under the hood
|
|
188
|
+
- Modular architecture makes it easy to extend and customize
|
|
189
|
+
|
|
190
|
+
### 🚀 Problem: Slow Development Cycles
|
|
191
|
+
**Solution: Instant Feedback Loop**
|
|
192
|
+
- Connect to any server in one command
|
|
193
|
+
- Real-time tool execution with immediate results
|
|
194
|
+
- No need to write test clients or curl commands
|
|
195
|
+
- Clipboard integration for rapid iteration
|
|
196
|
+
|
|
197
|
+
```
|
|
198
|
+
💼 Business Value: Reduce MCP development time by 80%
|
|
199
|
+
🔧 Technical Benefit: Clean, testable, maintainable codebase
|
|
200
|
+
📈 Team Benefit: Consistent testing across all MCP servers
|
|
201
|
+
```
|
|
45
202
|
|
|
46
|
-
|
|
203
|
+
*Want the technical details? Check out our [Architecture Guide](ARCHITECTURE.md) for in-depth design decisions.*
|
|
47
204
|
|
|
48
|
-
|
|
205
|
+
## 🔧 Development
|
|
206
|
+
|
|
207
|
+
### Development Prerequisites
|
|
208
|
+
|
|
209
|
+
**What You Need:**
|
|
210
|
+
- **Go 1.21+** - For building and running MCP-TUI
|
|
211
|
+
- **Node.js 14+** - For running the included test MCP servers
|
|
212
|
+
- **Make** - For simplified build commands
|
|
213
|
+
|
|
214
|
+
**Why These Versions:**
|
|
215
|
+
- Go 1.21+ provides the generics and performance features MCP-TUI relies on
|
|
216
|
+
- Node.js 14+ ensures compatibility with all modern MCP server implementations
|
|
217
|
+
- Make gives you simple commands like `make test` instead of complex go commands
|
|
218
|
+
|
|
219
|
+
### Development Commands That Save Time
|
|
49
220
|
|
|
50
221
|
```bash
|
|
51
|
-
|
|
222
|
+
# 🎆 The Full Confidence Builder
|
|
223
|
+
make all # Lint + test + build = ship with confidence
|
|
224
|
+
|
|
225
|
+
# 🚀 Quick Development
|
|
226
|
+
make dev # Fast build with debug symbols for troubleshooting
|
|
227
|
+
make build # Production build when you're ready
|
|
228
|
+
|
|
229
|
+
# 🧪 Bulletproof Testing
|
|
230
|
+
make test # Fast unit tests for immediate feedback
|
|
231
|
+
make coverage # See exactly what your tests cover
|
|
232
|
+
make test-servers # Test against misbehaving servers (the real world)
|
|
233
|
+
|
|
234
|
+
# 📎 Quality Assurance
|
|
235
|
+
make lint # Catch issues before code review
|
|
236
|
+
make release # Multi-platform builds for distribution
|
|
52
237
|
```
|
|
53
238
|
|
|
54
|
-
|
|
239
|
+
**Why These Commands Matter:**
|
|
240
|
+
- `make all` ensures you never ship broken code
|
|
241
|
+
- `make test-servers` catches edge cases that break in production
|
|
242
|
+
- `make coverage` shows you exactly what needs more testing
|
|
243
|
+
- `make dev` gives you debug symbols for faster troubleshooting
|
|
244
|
+
|
|
245
|
+
### Project Layout
|
|
55
246
|
|
|
56
|
-
|
|
247
|
+
The project follows Go standards and best practices:
|
|
57
248
|
|
|
58
|
-
|
|
249
|
+
- **`internal/`** - Private application code, organized by domain
|
|
250
|
+
- **`cmd/`** - Application entry points
|
|
251
|
+
- **`pkg/`** - Public packages (currently none)
|
|
252
|
+
- **Platform-specific code** - Uses build tags (`//go:build !windows`)
|
|
253
|
+
- **Interfaces first** - Define contracts before implementations
|
|
254
|
+
- **Structured errors** - Custom error types with codes and context
|
|
59
255
|
|
|
60
|
-
|
|
61
|
-
2. Enter command: `npx`
|
|
62
|
-
3. Enter args: `@modelcontextprotocol/server-everything stdio`
|
|
63
|
-
4. Press Enter to connect
|
|
256
|
+
## 🧪 Testing
|
|
64
257
|
|
|
65
|
-
|
|
66
|
-
- **echo**: Simple text echo
|
|
67
|
-
- **add**: Number addition (demonstrates type conversion)
|
|
68
|
-
- **longRunningOperation**: Configurable delay (tests progress tracking)
|
|
69
|
-
- **sampleLLM**: LLM sampling demonstration
|
|
70
|
-
- **printEnv**: Shows environment variables
|
|
71
|
-
- **getTinyImage**: Returns an image
|
|
72
|
-
- **annotatedMessage**: Demonstrates content annotations
|
|
258
|
+
### Test Infrastructure
|
|
73
259
|
|
|
74
|
-
|
|
260
|
+
The project includes comprehensive testing:
|
|
75
261
|
|
|
76
|
-
|
|
262
|
+
- **Unit tests** - Individual component testing
|
|
263
|
+
- **Integration tests** - End-to-end MCP server interactions
|
|
264
|
+
- **Error scenario testing** - Problematic servers for edge cases
|
|
77
265
|
|
|
78
|
-
|
|
266
|
+
### Test Servers
|
|
79
267
|
|
|
80
|
-
|
|
81
|
-
- `--type`: Server type (stdio, sse, or http)
|
|
82
|
-
- `--cmd`: Command for stdio servers
|
|
83
|
-
- `--args`: Arguments for stdio command (comma-separated)
|
|
84
|
-
- `--url`: URL for SSE or HTTP servers
|
|
85
|
-
- `--json`: Output results in JSON format
|
|
268
|
+
Intentionally problematic MCP servers for testing:
|
|
86
269
|
|
|
87
|
-
|
|
270
|
+
- **`invalid-json-server.js`** - Sends malformed JSON responses
|
|
271
|
+
- **`crash-server.js`** - Crashes at various points during communication
|
|
272
|
+
- **`timeout-server.js`** - Never responds or responds extremely slowly
|
|
273
|
+
- **`protocol-violator-server.js`** - Violates MCP protocol requirements
|
|
274
|
+
- **`oversized-server.js`** - Sends extremely large messages (MB-sized)
|
|
275
|
+
- **`out-of-order-server.js`** - Sends responses out of order or with wrong IDs
|
|
88
276
|
|
|
89
|
-
List available tools:
|
|
90
277
|
```bash
|
|
91
|
-
|
|
278
|
+
# Test all problematic servers
|
|
279
|
+
make test-servers
|
|
280
|
+
|
|
281
|
+
# Test specific failure scenario
|
|
282
|
+
./mcp-tui --cmd node --args "test-servers/crash-server.js" tool list
|
|
92
283
|
```
|
|
93
284
|
|
|
94
|
-
|
|
285
|
+
## 📋 Commands Reference
|
|
286
|
+
|
|
287
|
+
### Command Line Arguments
|
|
288
|
+
|
|
289
|
+
**Passing Multiple Arguments:**
|
|
95
290
|
```bash
|
|
96
|
-
|
|
291
|
+
# Use multiple --args flags for multiple arguments
|
|
292
|
+
mcp-tui --cmd ./server --args arg1 --args arg2 --args arg3
|
|
293
|
+
|
|
294
|
+
# For arguments with spaces, quote each argument
|
|
295
|
+
mcp-tui --cmd ./server --args "arg with spaces" --args "another arg"
|
|
296
|
+
|
|
297
|
+
# Example with npm/npx
|
|
298
|
+
mcp-tui --cmd npx --args "@modelcontextprotocol/server-everything" --args "stdio"
|
|
299
|
+
|
|
300
|
+
# Real example with multiple flags
|
|
301
|
+
mcp-tui --cmd ./brum --args "--mcp" --args "--verbose"
|
|
97
302
|
```
|
|
98
303
|
|
|
99
|
-
|
|
304
|
+
### Tool Operations
|
|
100
305
|
```bash
|
|
101
|
-
mcp-tui
|
|
102
|
-
mcp-tui
|
|
306
|
+
mcp-tui tool list # List all available tools
|
|
307
|
+
mcp-tui tool describe <name> # Get detailed tool information
|
|
308
|
+
mcp-tui tool call <name> key=value # Execute a tool with arguments
|
|
103
309
|
```
|
|
104
310
|
|
|
105
|
-
|
|
311
|
+
### Resource Operations
|
|
312
|
+
```bash
|
|
313
|
+
mcp-tui resource list # List all available resources
|
|
314
|
+
mcp-tui resource read <uri> # Read a resource by URI
|
|
315
|
+
```
|
|
106
316
|
|
|
107
|
-
|
|
317
|
+
### Prompt Operations
|
|
108
318
|
```bash
|
|
109
|
-
mcp-tui
|
|
319
|
+
mcp-tui prompt list # List all available prompts
|
|
320
|
+
mcp-tui prompt get <name> [args...] # Get a prompt with arguments
|
|
110
321
|
```
|
|
111
322
|
|
|
112
|
-
|
|
323
|
+
### Global Options
|
|
113
324
|
```bash
|
|
114
|
-
|
|
325
|
+
--cmd string # Command to run MCP server (for STDIO)
|
|
326
|
+
--args strings # Arguments for server command (use multiple flags)
|
|
327
|
+
--url string # URL for SSE/HTTP servers
|
|
328
|
+
--type string # Transport type (stdio, sse, http)
|
|
329
|
+
--timeout duration # Connection timeout (default 30s)
|
|
330
|
+
--debug # Enable debug mode with detailed logging
|
|
331
|
+
--log-level string # Log level (debug, info, warn, error)
|
|
332
|
+
--json # Output results in JSON format
|
|
115
333
|
```
|
|
116
334
|
|
|
117
|
-
|
|
335
|
+
## 🔍 Error Handling & Debugging
|
|
118
336
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
337
|
+
### Structured Error System
|
|
338
|
+
|
|
339
|
+
MCP-TUI uses a comprehensive error handling system:
|
|
340
|
+
|
|
341
|
+
```go
|
|
342
|
+
// Error codes for different failure types
|
|
343
|
+
type ErrorCode string
|
|
344
|
+
|
|
345
|
+
const (
|
|
346
|
+
ErrorCodeConnectionFailed = "CONNECTION_FAILED"
|
|
347
|
+
ErrorCodeServerCrash = "SERVER_CRASH"
|
|
348
|
+
ErrorCodeInvalidJSON = "INVALID_JSON"
|
|
349
|
+
ErrorCodeProtocolViolation = "PROTOCOL_VIOLATION"
|
|
350
|
+
// ... and many more
|
|
351
|
+
)
|
|
122
352
|
```
|
|
123
353
|
|
|
124
|
-
|
|
354
|
+
### Debug Mode
|
|
355
|
+
|
|
356
|
+
Enable comprehensive debugging:
|
|
125
357
|
```bash
|
|
126
|
-
mcp-tui --
|
|
358
|
+
mcp-tui --debug --log-level debug --cmd your-server
|
|
127
359
|
```
|
|
128
360
|
|
|
129
|
-
|
|
361
|
+
This provides:
|
|
362
|
+
- **Detailed connection logs** - Transport-level communication
|
|
363
|
+
- **Protocol message tracing** - JSON-RPC message flow
|
|
364
|
+
- **Error context and stack traces** - Full error details
|
|
365
|
+
- **Performance metrics** - Timing and resource usage
|
|
366
|
+
- **Component-specific logging** - Structured logs by system component
|
|
367
|
+
|
|
368
|
+
## ⌨️ Keyboard Shortcuts
|
|
369
|
+
|
|
370
|
+
### Global Shortcuts
|
|
371
|
+
- **Ctrl+L** - Open debug log panel from any screen
|
|
372
|
+
- **Ctrl+C / q** - Quit the application
|
|
373
|
+
- **Tab / Shift+Tab** - Navigate between UI elements
|
|
374
|
+
- **Enter** - Select/execute current item
|
|
375
|
+
|
|
376
|
+
### Main Screen
|
|
377
|
+
- **↑↓ / j/k** - Navigate through lists
|
|
378
|
+
- **1-9** - Quick select tools by number
|
|
379
|
+
- **PgUp/PgDn** - Page through long lists
|
|
380
|
+
- **Home/End** - Jump to start/end of list
|
|
381
|
+
- **r** - Refresh current tab
|
|
382
|
+
- **Tab** - Switch between tabs (Tools/Resources/Prompts/Events)
|
|
383
|
+
|
|
384
|
+
### Tool Execution Screen
|
|
385
|
+
- **Tab** - Navigate between form fields
|
|
386
|
+
- **Enter** - Execute tool (when on button)
|
|
387
|
+
- **Ctrl+V** - Paste into current field
|
|
388
|
+
- **Ctrl+C** - Copy result to clipboard (after execution)
|
|
389
|
+
- **b / Alt+←** - Go back to tool list
|
|
390
|
+
- **Esc** - Cancel and go back
|
|
391
|
+
|
|
392
|
+
### Debug Log Panel
|
|
393
|
+
- **↑↓** - Navigate log entries
|
|
394
|
+
- **Enter** - View detailed JSON for MCP messages
|
|
395
|
+
- **c/y** - Copy current log entry
|
|
396
|
+
- **r** - Refresh logs
|
|
397
|
+
- **x** - Clear all logs
|
|
398
|
+
- **b / Alt+←** - Return to previous screen
|
|
399
|
+
|
|
400
|
+
### Clipboard Support
|
|
401
|
+
MCP-TUI supports clipboard operations for easy data transfer:
|
|
402
|
+
- **Copy results**: Press Ctrl+C after tool execution to copy the result
|
|
403
|
+
- **Paste inputs**: Press Ctrl+V in any input field to paste from clipboard
|
|
404
|
+
- **Copy logs**: Press c or y in the debug panel to copy log entries
|
|
405
|
+
|
|
406
|
+
**Note**: Text selection with mouse is not supported in the TUI. Use the built-in copy commands instead.
|
|
407
|
+
|
|
408
|
+
### Common Error Scenarios
|
|
409
|
+
|
|
410
|
+
**Connection Issues:**
|
|
411
|
+
```bash
|
|
412
|
+
# Server command not found
|
|
413
|
+
Error: CONNECTION_FAILED: failed to start server process
|
|
414
|
+
|
|
415
|
+
# Server crashes during initialization
|
|
416
|
+
Error: SERVER_CRASH: server process exited unexpectedly (exit code: 1)
|
|
417
|
+
|
|
418
|
+
# Connection timeout
|
|
419
|
+
Error: CONNECTION_TIMEOUT: server did not respond within 30s
|
|
420
|
+
```
|
|
130
421
|
|
|
131
|
-
|
|
422
|
+
**Protocol Issues:**
|
|
132
423
|
```bash
|
|
133
|
-
#
|
|
134
|
-
|
|
424
|
+
# Server sends invalid JSON
|
|
425
|
+
Error: INVALID_JSON: failed to parse server response
|
|
426
|
+
|
|
427
|
+
# Missing required MCP fields
|
|
428
|
+
Error: PROTOCOL_VIOLATION: missing required field 'protocolVersion'
|
|
135
429
|
|
|
136
|
-
#
|
|
137
|
-
|
|
430
|
+
# Server not responding to requests
|
|
431
|
+
Error: SERVER_NOT_RESPONDING: no response to initialize request
|
|
138
432
|
```
|
|
139
433
|
|
|
140
|
-
##
|
|
434
|
+
## 🎯 Type System & Validation
|
|
141
435
|
|
|
142
|
-
|
|
143
|
-
- **sse**: Connect via Server-Sent Events
|
|
144
|
-
- **http**: Connect via HTTP streaming
|
|
436
|
+
### Automatic Type Conversion
|
|
145
437
|
|
|
146
|
-
|
|
438
|
+
CLI arguments are automatically converted to proper JSON schema types:
|
|
147
439
|
|
|
148
|
-
|
|
149
|
-
|
|
440
|
+
```bash
|
|
441
|
+
# String values
|
|
442
|
+
mcp-tui tool call echo message="Hello World"
|
|
150
443
|
|
|
151
|
-
|
|
444
|
+
# Numeric values
|
|
445
|
+
mcp-tui tool call add a=5 b=3.14
|
|
152
446
|
|
|
153
|
-
|
|
154
|
-
-
|
|
155
|
-
- [cobra](https://github.com/spf13/cobra) - CLI framework
|
|
156
|
-
- [mcp-go](https://github.com/mark3labs/mcp-go) - MCP protocol implementation
|
|
447
|
+
# Boolean values
|
|
448
|
+
mcp-tui tool call configure enabled=true debug=false
|
|
157
449
|
|
|
158
|
-
|
|
450
|
+
# JSON objects/arrays
|
|
451
|
+
mcp-tui tool call process_data 'items=["a","b","c"]' 'config={"timeout":30}'
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
### Schema Validation
|
|
455
|
+
|
|
456
|
+
- **Input validation** against tool schemas
|
|
457
|
+
- **Type coercion** with fallback to string
|
|
458
|
+
- **Error reporting** for invalid arguments
|
|
459
|
+
- **Help generation** from schema descriptions
|
|
159
460
|
|
|
160
|
-
|
|
161
|
-
- **Arrow Keys/j/k**: Navigate menus
|
|
162
|
-
- **Enter**: Select/Execute
|
|
163
|
-
- **q/Ctrl+C**: Quit
|
|
164
|
-
- **Backspace**: Edit input fields
|
|
461
|
+
## 🤝 Contributing
|
|
165
462
|
|
|
166
|
-
|
|
463
|
+
We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for:
|
|
167
464
|
|
|
168
|
-
|
|
465
|
+
- **Development environment setup**
|
|
466
|
+
- **Coding standards and guidelines**
|
|
467
|
+
- **Testing requirements**
|
|
468
|
+
- **Pull request process**
|
|
469
|
+
- **Architecture decisions**
|
|
169
470
|
|
|
170
|
-
|
|
171
|
-
|
|
471
|
+
### Quick Start for Contributors
|
|
472
|
+
|
|
473
|
+
1. **Fork and clone**
|
|
172
474
|
```bash
|
|
173
|
-
git
|
|
174
|
-
|
|
475
|
+
git clone https://github.com/your-username/mcp-tui.git
|
|
476
|
+
cd mcp-tui
|
|
175
477
|
```
|
|
176
|
-
3. The module will be available via `go install github.com/standardbeagle/mcp-tui@latest`
|
|
177
478
|
|
|
178
|
-
|
|
479
|
+
2. **Set up development environment**
|
|
480
|
+
```bash
|
|
481
|
+
make deps
|
|
482
|
+
make test
|
|
483
|
+
```
|
|
179
484
|
|
|
180
|
-
|
|
181
|
-
2. Build binaries for all platforms
|
|
182
|
-
3. Create a GitHub release with the binaries
|
|
183
|
-
4. Publish to npm:
|
|
485
|
+
3. **Make changes and test**
|
|
184
486
|
```bash
|
|
185
|
-
|
|
487
|
+
make all
|
|
488
|
+
make test-servers
|
|
186
489
|
```
|
|
187
490
|
|
|
188
|
-
|
|
491
|
+
4. **Follow coding standards**
|
|
492
|
+
- Use `make lint` for code quality
|
|
493
|
+
- Add tests for new functionality
|
|
494
|
+
- Update documentation for changes
|
|
495
|
+
- Follow the established architecture patterns
|
|
189
496
|
|
|
190
|
-
|
|
497
|
+
## 🔧 Technical Details
|
|
191
498
|
|
|
192
|
-
|
|
193
|
-
# Linux amd64
|
|
194
|
-
GOOS=linux GOARCH=amd64 go build -o dist/mcp-tui_linux_amd64 .
|
|
499
|
+
### Platform Support
|
|
195
500
|
|
|
196
|
-
|
|
197
|
-
|
|
501
|
+
- **Unix/Linux** - Full support with process groups and signal handling
|
|
502
|
+
- **Windows** - Job objects for process management
|
|
503
|
+
- **macOS** - Native signal and process handling
|
|
198
504
|
|
|
199
|
-
|
|
200
|
-
GOOS=darwin GOARCH=arm64 go build -o dist/mcp-tui_darwin_arm64 .
|
|
505
|
+
### Dependencies
|
|
201
506
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
507
|
+
**Core:**
|
|
508
|
+
- `github.com/mark3labs/mcp-go` - MCP protocol implementation
|
|
509
|
+
- `github.com/charmbracelet/bubbletea` - TUI framework
|
|
510
|
+
- `github.com/spf13/cobra` - CLI framework
|
|
511
|
+
|
|
512
|
+
**Development:**
|
|
513
|
+
- `golangci-lint` - Comprehensive code linting
|
|
514
|
+
- Platform-specific build tools
|
|
515
|
+
- Integration test framework
|
|
516
|
+
|
|
517
|
+
### Performance Characteristics
|
|
518
|
+
|
|
519
|
+
- **Memory efficient** - Streaming JSON processing
|
|
520
|
+
- **Responsive UI** - Async operations with progress tracking
|
|
521
|
+
- **Resource cleanup** - Proper process and connection management
|
|
522
|
+
- **Concurrent safe** - Thread-safe components with proper synchronization
|
|
523
|
+
|
|
524
|
+
## 📄 License
|
|
525
|
+
|
|
526
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
527
|
+
|
|
528
|
+
## 🙏 Acknowledgments
|
|
529
|
+
|
|
530
|
+
- [Model Context Protocol](https://modelcontextprotocol.io/) specification
|
|
531
|
+
- [Bubbletea](https://github.com/charmbracelet/bubbletea) TUI framework
|
|
532
|
+
- [Cobra](https://github.com/spf13/cobra) CLI framework
|
|
533
|
+
- [mark3labs/mcp-go](https://github.com/mark3labs/mcp-go) MCP implementation
|
|
205
534
|
|
|
206
|
-
##
|
|
535
|
+
## 📊 Project Status
|
|
207
536
|
|
|
208
|
-
|
|
537
|
+
- ✅ **Core architecture** - Clean, modular design implemented
|
|
538
|
+
- ✅ **Error handling** - Comprehensive error system with structured types
|
|
539
|
+
- ✅ **Platform abstraction** - Cross-platform process and signal management
|
|
540
|
+
- ✅ **Test infrastructure** - Problematic servers for edge case testing
|
|
541
|
+
- ✅ **Development tooling** - Makefile, linting, testing pipeline
|
|
542
|
+
- 🚧 **CLI commands** - Basic structure implemented, needs MCP integration
|
|
543
|
+
- 🚧 **TUI implementation** - Screen architecture in place, needs full UI
|
|
544
|
+
- 📋 **Integration tests** - Framework ready, tests planned
|
|
545
|
+
- 📋 **Performance optimization** - Profiling and optimization planned
|
package/bin/mcp-tui
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@standardbeagle/mcp-tui",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "A Terminal User Interface (TUI) and CLI for Model Context Protocol (MCP) servers",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://github.com/standardbeagle/mcp-tui#readme",
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@modelcontextprotocol/sdk": "^1.13.2",
|
|
33
34
|
"node-fetch": "^3.3.2"
|
|
34
35
|
},
|
|
35
36
|
"files": [
|