Skip to main content
Glama
8b-is
by 8b-is
MCP_EXPLORER_README.mdโ€ข7.68 kB
# MCP Explorer ๐ŸŽฎ **Interactive MCP Tool Explorer for Humans** Learn what AI tools do by actually using them! MCP Explorer is a universal client that connects to any MCP (Model Context Protocol) server and lets you interactively explore and use the available tools. ## ๐ŸŒŸ Features - **Universal MCP Client**: Works with ANY MCP server, not just Smart Tree - **Interactive Exploration**: Learn by doing with guided mode - **Tool Lanes**: Organized by EXPLORE โ†’ ANALYZE โ†’ ACT workflow - **Beautiful Output**: Rich terminal interface with colors and tables - **Parameter Help**: Interactive parameter input with descriptions - **History Tracking**: See what you've done - **Beginner Friendly**: Guided mode helps you get started ## ๐Ÿš€ Quick Start ### Install Dependencies (Optional but Recommended) ```bash pip install -r requirements-explorer.txt ``` ### Run with Smart Tree ```bash # If Smart Tree is installed python mcp_explorer.py --command "st --mcp" # Or just use the default python mcp_explorer.py ``` ### Run with Any MCP Server ```bash # Generic MCP server python mcp_explorer.py --command "your-mcp-server --mcp" # With arguments python mcp_explorer.py --command "server --arg1 value --mcp" ``` ### Use with Claude Desktop Config ```bash # Use existing Claude Desktop config python mcp_explorer.py --config ~/.config/claude/config.json --server smart-tree ``` ## ๐ŸŽฏ Interactive Commands Once connected, you'll see the `mcp>` prompt. Available commands: | Command | Description | Example | |---------|-------------|---------| | `tools [lane]` | List all tools (optionally by lane) | `tools explore` | | `info <tool>` | Show detailed tool information | `info search_in_files` | | `call <tool>` | Call a tool interactively | `call quick_tree` | | `lanes` | Show tools organized by lanes | `lanes` | | `guided` | Start guided exploration | `guided` | | `history` | Show command history | `history` | | `help` | Show help | `help` | | `quit` | Exit the explorer | `quit` | ## ๐Ÿ” Understanding Tool Lanes MCP tools are organized into three lanes representing a natural workflow: ### ๐Ÿ” EXPLORE Lane Start here! Discovery and overview tools. - `quick_tree` - Fast directory overview - `get_statistics` - Project statistics - `server_info` - Server capabilities ### ๐Ÿงช ANALYZE Lane Dive deeper! Search and analysis tools. - `search_in_files` - Find content in files - `find_files` - Locate files by pattern - `semantic_analysis` - Understand code structure ### โšก ACT Lane Make changes! Modification tools. - `smart_edit` - Edit files efficiently - `track_file_operation` - Track changes - `insert_function` - Add code ## ๐Ÿ“š Example Session ``` $ python mcp_explorer.py ๐Ÿš€ Connecting to MCP server... โœ… Connected to: Smart Tree v4.0.0 ๐Ÿ“ฆ Discovered 42 tools ๐ŸŽฎ Interactive MCP Explorer Type 'help' for commands, 'quit' to exit mcp> guided ๐ŸŽฏ Guided Exploration Mode Let me guide you through the tools step by step! Step 1: Choose your exploration path 1. ๐Ÿ” EXPLORE - Start with overview and discovery 2. ๐Ÿงช ANALYZE - Deep dive into code and content 3. โšก ACT - Make changes and modifications Your choice (1-3): 1 Great choice! Let's start exploring. Step 2: Available EXPLORE tools: 1. ๐Ÿ” quick_tree Lightning-fast 3-level directory overview... 2. ๐Ÿ” get_statistics Get comprehensive statistics about a directory... Step 3: I recommend starting with 'quick_tree' Would you like to try it? (y/n): y ๐Ÿ“ Parameters for quick_tree: path (Path to the directory): . depth (Maximum depth) [optional] [default: 3]: ๐Ÿ”„ Calling quick_tree... โ•ญโ”€ Result โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ { โ”‚ โ”‚ "tree": "๐Ÿ“ smart-tree\nโ”œโ”€โ”€ src\n..." โ”‚ โ”‚ "stats": { โ”‚ โ”‚ "files": 127, โ”‚ โ”‚ "directories": 23 โ”‚ โ”‚ } โ”‚ โ”‚ } โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ mcp> call search_in_files ๐Ÿ“ Parameters for search_in_files: path (Path to search in): src keyword (Keyword or phrase to search for): TODO include_content (Include actual line content) [optional] [default: true]: max_matches_per_file (Maximum matches per file) [optional] [default: 20]: 5 ๐Ÿ”„ Calling search_in_files... โ•ญโ”€ Result โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ { โ”‚ โ”‚ "files_with_matches": 3, โ”‚ โ”‚ "results": [ โ”‚ โ”‚ { โ”‚ โ”‚ "path": "/src/main.rs", โ”‚ โ”‚ "matches": 2, โ”‚ โ”‚ "lines": [ โ”‚ โ”‚ { โ”‚ โ”‚ "line_number": 42, โ”‚ โ”‚ "content": "// TODO: Fix", โ”‚ โ”‚ "column": 3 โ”‚ โ”‚ } โ”‚ โ”‚ ] โ”‚ โ”‚ } โ”‚ โ”‚ ] โ”‚ โ”‚ } โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ mcp> quit ๐Ÿ‘‹ Goodbye! ``` ## ๐ŸŽ“ Learning Path 1. **Start with `guided`** - Let the explorer guide you 2. **Explore with `tools explore`** - See overview tools 3. **Get details with `info <tool>`** - Understand what each tool does 4. **Try tools with `call <tool>`** - See them in action 5. **Graduate to ANALYZE and ACT lanes** - As you get comfortable ## ๐Ÿ› ๏ธ Advanced Usage ### Verbose Mode See detailed request/response communication: ```bash python mcp_explorer.py --command "st --mcp" --verbose ``` ### Using with Docker ```bash # If your MCP server runs in Docker python mcp_explorer.py --command "docker run -i my-mcp-server" ``` ### Scripting You can also use the explorer programmatically: ```python from mcp_explorer import MCPExplorer explorer = MCPExplorer(["st", "--mcp"]) if explorer.initialize(): # Call tools programmatically explorer.call_tool("quick_tree", {"path": ".", "depth": 2}) ``` ## ๐Ÿค Why Use MCP Explorer? - **Understand AI Tools**: See what tools AI assistants use - **Learn by Doing**: Interactive exploration beats documentation - **Test Your Tools**: If you're building an MCP server, test it here - **Debug Issues**: See exact requests and responses - **Educational**: Perfect for learning about MCP protocol ## ๐Ÿ› Troubleshooting ### "Failed to connect to MCP server" - Make sure the MCP server is installed - Check the command is correct - Try with `--verbose` to see details ### "Tool not found" - Use `tools` to see available tools - Tool names are case-sensitive ### No colors/formatting - Install `rich`: `pip install rich` - Colors work best in modern terminals ## ๐ŸŽ‰ Tips 1. **Start with EXPLORE tools** - They're read-only and safe 2. **Use `info` liberally** - Understand before calling 3. **Try `guided` mode** - Great for first-time users 4. **Check `history`** - See what you've done 5. **Experiment freely** - EXPLORE and ANALYZE tools are safe ## ๐Ÿ“„ License Part of the Smart Tree project. Created with ๐Ÿ’œ by Aye & Hue. --- *"Learning by doing is the best way to understand AI tools!"* - Aye ๐Ÿšข

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/8b-is/smart-tree'

If you have feedback or need assistance with the MCP directory API, please join our Discord server