mcp-valve-2.0.1 is not a library.
mcp-valve
A unified MCP (Model Context Protocol) client that works with any MCP server through configurable profiles.
Design Philosophy
This tool is a thin wrapper around the MCP protocol.
- Tools are called by providing JSON arguments that conform to the
inputSchemafromtools/list - No validation or field name conversion occurs - the MCP server's schema is the source of truth
- If
tools/listshows a field namedX, useXexactly as-is in your JSON - Daemon mode is required for all tool operations - this ensures consistent state management
Installation
# Or build from source:
Quick Start
# List configured servers
# Start daemon (REQUIRED before any tool operations)
# List tools from a server
# Call a tool
# Read args from stdin
|
# Check daemon status
# Stop daemon when done
Configuration
Config file is searched in the following order:
--config <path>CLI flagMCP_VALVE_CONFIGenvironment variable$XDG_CONFIG_HOME/mcp-valve/servers.json~/.config/mcp-valve/servers.json~/.claude/scripts/mcp-servers.json(legacy)
Example config:
Profile Options
| Field | Type | Description |
|---|---|---|
command |
string[] |
Command and initial args to start the server |
default_args |
string[] |
Default arguments (overridden by --server-args) |
supports_daemon |
bool |
Enable daemon mode (required for tool operations) |
description |
string |
Human-readable description |
env |
object |
Environment variables to set |
Template Variables
Arguments support template expansion:
| Variable | Expands To |
|---|---|
{profile_dir} |
.mcp-profile/<server-name> |
{pid} |
Current process ID |
{cwd} |
Current working directory |
Commands
| Command | Description |
|---|---|
list-servers |
Show all configured servers |
start-daemon |
Start persistent daemon (required first) |
list-tools |
List available tools from server |
call <tool> |
Call a tool with JSON arguments |
shell |
Interactive REPL mode |
daemon-status |
Check daemon status |
stop-daemon |
Stop running daemon |
Daemon Mode
Daemon mode is required for all tool operations (call, list-tools, shell). This ensures:
- Consistent state management across operations
- Better performance for repeated calls
- Clear project context (daemon is tied to directory)
# Start daemon in your project directory
# Output:
# Project: /path/to/your/project
# Profile: .mcp-profile/playwright
# Starting MCP daemon for 'playwright'...
# Daemon started (PID: 12345)
# Socket: /tmp/.mcp/playwright-12345.sock
# All operations now work
# Check status
# Output:
# Project: /path/to/your/project
# Server: playwright
# Profile: .mcp-profile/playwright
# Daemon is running
# PID: 12345
# Socket: /tmp/.mcp/playwright-12345.sock
# Stop daemon
Directory matters: Daemon state is stored in .mcp-profile/ in the current working directory. Different directories = separate daemon instances.
Error: Daemon Not Running
If you try to call a tool without starting the daemon:
Error: Daemon is not running for project '/path/to/project'
Start daemon with:
cd /path/to/project
mcp-valve --server playwright start-daemon
Technical Details
- Protocol: MCP 2025-06-18 (JSON-RPC 2.0)
- Transport: Unix socket (daemon mode)
- Platform: Unix-like systems (uses nix crate for process management)
Dependencies
clap- CLI parsingserde/serde_json- JSON serializationanyhow- Error handlingnix- Unix system calls (umask, setsid, signals)
License
MIT