| 1 | <p align="center"> |
| 2 | <img src="./.github/resources/logo.png" alt="MCP Tools" height="150"> |
| 3 | </p> |
| 4 | |
| 5 | <p align="center"> |
| 6 | <h1 align="center">Swiss Army Knife for MCP Servers</h1> |
| 7 | <p align="center"> |
| 8 | A comprehensive command-line interface for interacting with MCP (Model Context Protocol) servers. |
| 9 | <br> |
| 10 | Discover, call, and manage tools, resources, and prompts from any MCP-compatible server. |
| 11 | <br> |
| 12 | Supports multiple transport methods, output formats, and includes powerful mock and proxy server capabilities. |
| 13 | </p> |
| 14 | </p> |
| 15 | |
| 16 | [](https://blog.fka.dev/blog/2025-03-27-mcp-inspector-vs-mcp-tools/) |
| 17 | |
| 18 | ## Table of Contents |
| 19 | |
| 20 | - [Overview](#overview) |
| 21 | - [Difference Between the MCP Inspector and MCP Tools](https://blog.fka.dev/blog/2025-03-27-mcp-inspector-vs-mcp-tools/) |
| 22 | - [Installation](#installation) |
| 23 | - [Using Homebrew](#using-homebrew) |
| 24 | - [From Source](#from-source) |
| 25 | - [Getting Started](#getting-started) |
| 26 | - [Features](#features) |
| 27 | - [Transport Options](#transport-options) |
| 28 | - [Output Formats](#output-formats) |
| 29 | - [Commands](#commands) |
| 30 | - [Interactive Shell](#interactive-shell) |
| 31 | - [Web Interface](#web-interface) |
| 32 | - [Project Scaffolding](#project-scaffolding) |
| 33 | - [Server Aliases](#server-aliases) |
| 34 | - [LLM Apps Config Management](#llm-apps-config-management) |
| 35 | - [Server Modes](#server-modes) |
| 36 | - [Mock Server Mode](#mock-server-mode) |
| 37 | - [Proxy Mode](#proxy-mode) |
| 38 | - [Guard Mode](#guard-mode) |
| 39 | - [Examples](#examples) |
| 40 | - [Basic Usage](#basic-usage) |
| 41 | - [Script Integration](#script-integration) |
| 42 | - [Debugging](#debugging) |
| 43 | - [Contributing](#contributing) |
| 44 | - [Roadmap](#roadmap) |
| 45 | - [License](#license) |
| 46 | |
| 47 | ## Overview |
| 48 | |
| 49 | MCP Tools provides a versatile CLI for working with Model Context Protocol (MCP) servers. It enables you to: |
| 50 | |
| 51 | - Discover and call tools provided by MCP servers |
| 52 | - Access and utilize resources exposed by MCP servers |
| 53 | - Create mock servers for testing client applications |
| 54 | - Proxy MCP requests to shell scripts for easy extensibility |
| 55 | - Create interactive shells for exploring and using MCP servers |
| 56 | - Scaffold new MCP projects with TypeScript support |
| 57 | - Format output in various styles (JSON, pretty-printed, table) |
| 58 | - Guard and restrict access to specific tools and resources |
| 59 | - Support all transport methods (HTTP, stdio) |
| 60 | |
| 61 | <p align="center"> |
| 62 | <img src=".github/resources/screenshot.png" alt="MCP Tools Screenshot" width="700"> |
| 63 | </p> |
| 64 | |
| 65 | ## Installation |
| 66 | |
| 67 | ### Using Homebrew (for macOS) |
| 68 | |
| 69 | ```bash |
| 70 | brew tap f/mcptools |
| 71 | brew install mcp |
| 72 | ``` |
| 73 | |
| 74 | > ❕ The binary is installed as `mcp` but can also be accessed as `mcpt` to avoid conflicts with other tools that might use the `mcp` command name. |
| 75 | |
| 76 | ### From Source (for Windows and GNU/Linux) |
| 77 | |
| 78 | ```bash |
| 79 | go install github.com/f/mcptools/cmd/mcptools@latest |
| 80 | ``` |
| 81 | |
| 82 | > ❕ The binary will be installed as `mcptools` when but can be aliased to `mcpt` for convenience. |
| 83 | > |
| 84 | > <img width="500" alt="Screenshot 2025-05-05 at 22 21 29" src="https://github.com/user-attachments/assets/eaba88c1-8833-4525-bb19-9ab0ec2ff27e" /> |
| 85 | > |
| 86 | > <sub>Windows 11 Running Example</sub> |
| 87 | |
| 88 | ## Getting Started |
| 89 | |
| 90 | The simplest way to start using MCP Tools is to connect to an MCP server and list available tools: |
| 91 | |
| 92 | ```bash |
| 93 | # List all available tools from a filesystem server |
| 94 | mcp tools npx -y @modelcontextprotocol/server-filesystem ~ |
| 95 | |
| 96 | # Call a specific tool |
| 97 | mcp call read_file --params '{"path":"README.md"}' npx -y @modelcontextprotocol/server-filesystem ~ |
| 98 | |
| 99 | # Open an interactive shell |
| 100 | mcp shell npx -y @modelcontextprotocol/server-filesystem ~ |
| 101 | ``` |
| 102 | |
| 103 | ## Features |
| 104 | |
| 105 | MCP Tools supports a wide range of features for interacting with MCP servers: |
| 106 | |
| 107 | ``` |
| 108 | Usage: |
| 109 | mcp [command] |
| 110 | |
| 111 | Available Commands: |
| 112 | version Print the version information |
| 113 | tools List available tools on the MCP server |
| 114 | resources List available resources on the MCP server |
| 115 | prompts List available prompts on the MCP server |
| 116 | call Call a tool, resource, or prompt on the MCP server |
| 117 | get-prompt Get a prompt on the MCP |