Skip to main content

mcphee

CI PyPI version Python 3.11+

mcphee is an interactive CLI client for Model Context Protocol (MCP) servers. Connect to any MCP server — local (stdio) or remote (SSE / Streamable HTTP) — and explore its tools, resources, and prompts in a rich interactive REPL.


Features

  • Universal transport support — stdio, SSE, and Streamable HTTP
  • Interactive REPL — Vi mode (default) or Emacs mode with full line editing
  • Tab completion — fuzzy-match tool names, resource URIs, prompt names, and their parameters
  • Auto-suggestions — fish-shell style history suggestions as you type
  • Persistent history — across sessions, XDG-compliant location
  • Named profiles — save connection configs in ~/.config/mcphee/profiles.toml
  • Rich output — syntax-highlighted JSON, tables, and panels; toggle to raw JSON with #json
  • Meta-commands — #refresh, #export, #timeout, #payload, #debug, #loglevel, and more

Installation

Prerequisite: install uv

mcphee is installed with uv, Astral's Python package and tool manager. uv also downloads a suitable Python (3.11+) automatically if you don't have one, so you don't need to install Python first.

macOS / Linux:

curl -LsSf https://astral.sh/uv/install.sh | sh

Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Or with a package manager: brew install uv (macOS) or winget install --id=astral-sh.uv -e (Windows).

Then open a new terminal and check it works:

uv --version

uv tool install puts commands such as mcphee in ~/.local/bin (Windows: %USERPROFILE%\.local\bin). If mcphee is "command not found" after installing, add that directory to your PATH with:

uv tool update-shell

and open a new terminal.

# From PyPI
uv tool install mcphee

# From GitHub (latest main)
uv tool install git+https://github.com/dgwartney/mcphee

# Specific tag or commit
uv tool install "git+https://github.com/dgwartney/mcphee@v0.2.0"

# From a local clone
uv tool install .

After installation the mcphee command is available globally without activating a virtual environment. Upgrade with:

uv tool upgrade mcphee

pip

pip install mcphee

Quick Start

Try it immediately with the bundled example server (no setup):

mcphee connect --demo

TUTORIAL.md walks through it step by step. To connect to your own servers:

# Connect to a local stdio MCP server
mcphee connect --stdio 'npx -y @modelcontextprotocol/server-filesystem /tmp'

# Connect via SSE with an API key header
mcphee connect --sse http://localhost:8080/sse --header x-api-key=secret

# Connect via Streamable HTTP
mcphee connect --http http://localhost:8080/mcp

# Connect using a saved profile
mcphee connect --profile myserver

Once connected you'll enter the interactive REPL:

╭─ mcphee ──────────────────────────────────────────────────────╮
│ Connected via http                                            │
│ http://localhost:8080/mcp                                     │
│ Type help for commands or exit to quit.                       │
╰───────────────────────────────────────────────────────────────╯
> list tools
> call read_file path=/tmp/notes.txt
> list resources
> read file:///tmp/notes.txt
> list prompts
> prompt summarize text="hello world"
> exit

REPL Command Reference

Command Syntax Description
list tools list tools List all available tools
list resources list resources List all available resources
list prompts list prompts List all available prompts
call call <tool> [key=value ...] Invoke a tool with arguments
read read <uri> Read a resource by URI
prompt prompt <name> [key=value ...] Get a prompt with arguments
help help Show command reference
exit / quit exit Disconnect and exit

Argument syntax

Tool and prompt arguments are passed as key=value pairs:

> call read_file path=/tmp/foo.txt
> call search query="hello world" limit=10
> prompt summarize text="Some long text here" language=en

Values are automatically typed: true/false to bool, integers to int, JSON arrays/objects to parsed.


Meta-Command Reference

Meta-commands begin with # and control the REPL session:

Command Syntax Description
#clear #clear Clear the terminal screen
#refresh #refresh Re-fetch tools/resources/prompts, rebuild completions
#json #json Toggle JSON vs Rich pretty output
#history #history [N] Show last N commands (default 20)
#export #export [path] Export last result to a JSON file
#timeout #timeout [seconds] Show or set request timeout
#payload #payload on | off Show raw request and response payloads for every call
#debug #debug Toggle debug mode: echo outgoing arguments, set log level DEBUG/WARNING
#loglevel #loglevel [LEVEL] Show or set log level (debug/info/warning/error/critical)
#help #help Show meta-command reference

Profile Management

Save connection configs so you don't have to retype them:

# Add a profile interactively
mcphee profile add myserver

# List all profiles
mcphee profile list

# Remove a profile
mcphee profile remove myserver

Profile TOML schema (~/.config/mcphee/profiles.toml):

[profiles.lumen]
mode = "http"
url = "http://localhost:8080/mcp"
[profiles.lumen.headers]
x-api-key = "secret"

[profiles.filesystem]
mode = "stdio"
command = "npx -y @modelcontextprotocol/server-filesystem /tmp"

[profiles.weather]
mode = "sse"
url = "http://weather-api.internal/sse"

Configuration Paths (XDG)

mcphee follows the XDG Base Directory Specification:

Data Path
Profiles $XDG_CONFIG_HOME/mcphee/profiles.toml (default: ~/.config/mcphee/profiles.toml)
History $XDG_DATA_HOME/mcphee/history (default: ~/.local/share/mcphee/history)

Key Bindings

The REPL uses Vi mode by default. Use --emacs to switch to Emacs mode.

Mode Keys Action
Vi normal h l w b 0 $ Move cursor
Vi normal x dd u Delete / undo
Vi normal / Search forward
Emacs Ctrl+A / Ctrl+E Start / end of line
Emacs Ctrl+F Forward one character
Emacs Ctrl+W / Ctrl+K Delete previous word / delete to end of line
Both Up / Down arrows History recall
Both Ctrl+R Reverse history search
Vi insert Esc Switch to normal mode

License

MIT

Metadata

Release files for mcphee 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcphee 0.2.0
File Size Uploaded Provenance
mcphee-0.2.0.tar.gz 26.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mcphee 0.2.0
File Interpreter ABI Platform
mcphee-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 56.3 kB

Release files / mcphee-0.2.0.tar.gz

Download URL mcphee-0.2.0.tar.gz
Size 26.8 kB
Tags Source
SHA-256 checksum
How to use checksums
963c6e763adbc2a3b0d993b263a34eaa76f316b18ce9423afe6a2f1abf5e85e1
BLAKE2b-256 checksum
How to use checksums
e0dbca82f1ff20f54f94b959263405e255a6875bc9b1b3773e9f0f34696b86e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Release files / mcphee-0.2.0-py3-none-any.whl

Download URL mcphee-0.2.0-py3-none-any.whl
Size 29.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37dd822e1a2e3f9daf414f41cfda7025c6c65050ff898ed3d96f7ac2d14f6af6
BLAKE2b-256 checksum
How to use checksums
b0cae6e49159cd94efd6a66bf324f260ead5298266dc83c96fe16089d3d911b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

Security for mcphee 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mcphee-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page