f/

f/MCPTools

๐Ÿ”จ A command-line development tool for inspecting and interacting with MCP servers with extra features like mocks and proxies.

#development#command-line#MCP
Publisherf/MCPTools
Submitted date4/19/2025

Overview: MCP Tools - Swiss Army Knife for MCP Servers

Title

MCP Tools โ€“ A comprehensive command-line interface (CLI) for interacting with Model Context Protocol (MCP) servers, enabling discovery, management, and execution of tools, resources, and prompts.

How to Use

MCP Tools provides a versatile CLI with commands for:

  • Listing available tools, resources, and prompts (mcp tools, mcp resources, mcp prompts)
  • Calling tools with parameters (mcp call)
  • Reading resources (mcp read-resource)
  • Starting an interactive shell (mcp shell)
  • Running a web interface (mcp web)
  • Creating mock servers (mcp mock)
  • Proxying requests (mcp proxy)
  • Managing server aliases (mcp alias)

Installation

  • Homebrew:
    brew tap f/mcptools brew install mcp
  • From Source:
    go install github.com/f/mcptools/cmd/mcptools@latest

Basic Usage

# List tools from a filesystem server mcp tools npx -y @modelcontextprotocol/server-filesystem ~ # Call a tool mcp call read_file --params '{"path":"README.md"}' # Start an interactive shell mcp shell npx -y @modelcontextprotocol/server-filesystem ~

Key Features

  • Multiple Transport Methods: Supports stdio (JSON-RPC 2.0) and HTTP SSE for connecting to MCP servers.
  • Output Formats: JSON, pretty-printed JSON, and man-page-style table format (default).
  • Interactive Shell & Web UI: Explore and execute MCP tools interactively.
  • Mock & Proxy Servers:
    • Mock mode: Simulate MCP servers for testing.
    • Proxy mode: Forward MCP requests to shell scripts.
    • Guard mode: Restrict access to specific tools/resources.
  • Project Scaffolding: Generate new MCP projects with TypeScript support (mcp new).
  • LLM Apps Config Management: Manage server configurations (mcp configs).

Use Cases

  1. Debugging & Testing โ€“ Use mock servers to test client applications.
  2. Script Automation โ€“ Call MCP tools from scripts (mcp call).
  3. Interactive Exploration โ€“ Use mcp shell to interactively test MCP servers.
  4. API Development โ€“ Proxy MCP requests to custom scripts (mcp proxy).
  5. Security & Access Control โ€“ Restrict tool access with guard mode.
  6. Project Setup โ€“ Scaffold new MCP projects (mcp new).

Example Workflows

  • Basic Tool Execution:
    mcp call list_dir --params '{"path":"/home"}'
  • Script Integration:
    mcp call grep_search --params '{"pattern":"error"}' | jq .results
  • Debugging with Mock Server:
    mcp mock --tools-dir ./mock-tools

For more details, check the blog post comparing MCP Tools with MCP Inspector.


MCP Tools simplifies MCP server interactions, making it an essential utility for developers working with Model Context Protocol. ๐Ÿš€

Visit More

View All