Skip to main content

Minimal MCP client CLI

Project description

remote-mcp-cli

A simple command-line tool for interacting with remote MCP servers - no installation or configuration required! Just run uvx remote-mcp-cli <server-url> <command> from your terminal.

remote-mcp-cli provides a minimal CLI for remote MCP (Model Context Protocol) servers. It supports both modern Streamable HTTP transport and legacy REST endpoints for maximum compatibility.

Quick Start

Use with uvx (Recommended)

The easiest way to use this tool is with uvx - no installation needed:

# List tools from any remote MCP server
uvx remote-mcp-cli https://mcp.deepwiki.com/mcp list

# Call a tool with JSON arguments
uvx remote-mcp-cli https://mcp.deepwiki.com/mcp call read_wiki_structure '{"repoName":"openai/openai-python"}'

# Use with authentication headers
uvx remote-mcp-cli https://api.ref.tools/mcp --header "x-ref-api-key: YOURKEY" list

Traditional Installation

You can also install traditionally with uv:

uv pip install remote-mcp-cli

Remote vs Local MCP Servers

Remote MCP servers run as web services and are the modern direction for MCP:

  • Accessible anywhere: Just need the HTTPS URL
  • No local setup: No configuration files or local processes
  • Auto-updating: Server improvements are immediately available
  • Scalable: Can handle multiple users simultaneously
  • Examples: https://mcp.deepwiki.com/mcp, https://api.ref.tools/mcp

Local MCP servers run on your computer:

  • Local execution: Run as subprocesses via stdio transport
  • Manual setup: Require claude_desktop_config.json configuration
  • Manual updates: Need to download and install updates yourself
  • Single user: Typically only one AI application can use them at a time

This CLI is specifically designed for remote MCP servers that use HTTP transport rather than local servers that use stdio.

Features

  • Modern MCP Support: Full support for MCP Streamable HTTP transport (2025-06-18 spec)
  • Tool Schema Display: Shows parameter names, types, and required fields when listing tools
  • Multiple Transport Support: Automatically falls back between Streamable HTTP and legacy REST
  • Session Management: Handles MCP session IDs for stateful servers
  • Bearer Token Auth: Pass tokens with --bearer or MCP_TOKEN environment variable
  • Custom Headers: Use --header to send additional authentication headers

Usage

Basic Commands

# List available tools with their schemas
uvx remote-mcp-cli <server-url> list

# Call a tool with JSON arguments
uvx remote-mcp-cli <server-url> call <tool-name> <json-args>


# Get help
uvx remote-mcp-cli --help

Examples

List available tools with their schemas:

uvx remote-mcp-cli https://mcp.deepwiki.com/mcp list

Output shows tool descriptions and parameter schemas:

- read_wiki_structure: Get a list of documentation topics for a GitHub repository
  Parameters: *repoName(string)
  (* = required)
- ask_question: Ask any question about a GitHub repository
  Parameters: *repoName(string), *question(string)
  (* = required)

Call a tool (arguments are a JSON string):

uvx remote-mcp-cli https://mcp.deepwiki.com/mcp call read_wiki_structure '{"repoName":"openai/openai-python"}'

Authentication

Environment Variable or --bearer

Set the MCP_TOKEN environment variable or pass a token with --bearer for bearer authentication:

export MCP_TOKEN="your-token-here"
uvx remote-mcp-cli https://secure-mcp-server.com/mcp list

# Or pass the token directly
uvx remote-mcp-cli --bearer "your-token-here" https://secure-mcp-server.com/mcp list

Custom Headers

Use --header for API keys, tokens, or other authentication:

# Single custom header
uvx remote-mcp-cli https://api.ref.tools/mcp --header "x-ref-api-key: YOURKEY" list

# Options can also be placed before the server URL
remote-mcp-cli --header "x-ref-api-key: YOURKEY" https://api.ref.tools/mcp list

# Multiple custom headers
uvx remote-mcp-cli https://secure-server.com/mcp \
  --header "x-api-key: your-api-key" \
  --header "x-client-id: your-client-id" \
  list

# Authentication header (alternative to `--bearer`/`MCP_TOKEN`)
uvx remote-mcp-cli https://server.com/mcp --header "Authorization: Bearer your-token" list

Supported Remote MCP Servers

This CLI works with any remote MCP server, including:

  • DeepWiki MCP Server: https://mcp.deepwiki.com/mcp (Streamable HTTP)
  • Legacy MCP Servers: Servers using /manifest and /call_tool endpoints
  • Custom MCP Servers: Any server implementing MCP HTTP transport

Transport Priority

The CLI automatically tries transports in this order:

  1. Streamable HTTP (modern MCP 2025-06-18 spec)
  2. Legacy REST (older /manifest, /call_tool endpoints)

Development

Building and Publishing

To build and publish the package with uv:

uv build
uv pip install --system twine
uv twine upload dist/*

MCP Protocol Support

This CLI implements:

  • MCP Protocol Version: 2025-06-18
  • JSON-RPC 2.0 message format
  • Streamable HTTP transport with SSE support
  • Session management via Mcp-Session-Id headers
  • Proper initialization handshake
  • Tool discovery and execution

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

remote_mcp_cli-0.4.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

remote_mcp_cli-0.4.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file remote_mcp_cli-0.4.0.tar.gz.

File metadata

  • Download URL: remote_mcp_cli-0.4.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for remote_mcp_cli-0.4.0.tar.gz
Algorithm Hash digest
SHA256 82c214f41b5c9f439d5415c1fa75ee86156d63536c27029daa4e5ea791cfc735
MD5 49f96ab8b1253a55a55e7c0f7ac19ffa
BLAKE2b-256 913eb5564689781f4997ed1bb632952b3ae32bf096009562fb8ef4ae1589d304

See more details on using hashes here.

File details

Details for the file remote_mcp_cli-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: remote_mcp_cli-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for remote_mcp_cli-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c42e4282f4ed707148dfc0394a0f566d694011aedec13d6a1d8d5b659fcdfb3
MD5 9d08d02e5cb18a0798868a2f361facd2
BLAKE2b-256 47ef40e938d24658e43e9d18672ec94418342607d63f7029d53567ab3090f24a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page