Swiss Army Knife for MCP Servers
@f
A command-line interface for interacting with MCP (Model Context Protocol) servers using both stdio and HTTP transport.
概要
What is Swiss Army Knife for MCP Servers?
Swiss Army Knife for MCP Servers is a comprehensive command-line interface for interacting with Model Context Protocol (MCP) servers. It allows developers to discover, call, and manage tools, resources, and prompts from any MCP-compatible server, and supports multiple transport methods and output formats.
How to use Swiss Army Knife for MCP Servers?
Install via Homebrew on macOS (brew tap f/mcptools && brew install mcp) or from source on Windows/Linux with go install github.com/f/mcptools/cmd/mcptools@latest. Use commands like mcp tools, mcp call, mcp shell, and mcp web to interact with MCP servers.
Key features of Swiss Army Knife for MCP Servers
- List available tools, resources, and prompts from MCP servers.
- Call tools, read resources, and get prompts.
- Interactive shell and web interface for exploring servers.
- Create mock servers, proxy requests to shell scripts.
- Scaffold new MCP projects with TypeScript support.
- Guard and restrict access to specific tools and resources.
- Supports Stdio, HTTP SSE, and Streamable HTTP transports.
- Output formats: table, JSON, and pretty-printed JSON.
Use cases of Swiss Army Knife for MCP Servers
- Debugging an MCP server by listing its available tools and resources.
- Scripting tool calls in CI/CD pipelines or automation workflows.
- Testing client applications against a mock MCP server.
- Building a custom proxy that forwards tool calls to shell scripts.
- Scaffolding a new MCP server project with TypeScript.
FAQ from Swiss Army Knife for MCP Servers
How do I install Swiss Army Knife for MCP Servers?
On macOS, use Homebrew: brew tap f/mcptools && brew install mcp. On Windows and Linux, install from source: go install github.com/f/mcptools/cmd/mcptools@latest. The binary is installed as mcp (or mcpt / mcptools to avoid conflicts).
What transports does it support?
It supports three transport methods: Stdio (stdin/stdout), HTTP SSE (legacy, for URLs ending with /sse), and Streamable HTTP (recommended, auto-detected from HTTP/HTTPS URLs).
What output formats are available?
Three output formats: table (default, colorized man-page style), json (compact JSON), and pretty (indented JSON).
Can I use Swiss Army Knife for MCP Servers on Windows?
Yes. Install from source using Go on Windows, macOS, and GNU/Linux.
How do I start the web interface?
Use the mcp web command followed by the server command or URL, e.g., mcp web npx -y @modelcontextprotocol/server-filesystem ~ or mcp web https://ne.tools. The default port is 41999; use --port to change it.