MCPHost is a CLI host application used to enable large language models (LLMs) to interact with external tools through the Model Context Protocol (MCP). It acts as the "host" role in the MCP client-server architecture, managing connections and interactions, while clients maintain one-to-one connections with MCP servers, and servers provide context, tools, and capabilities to LLMs.
Main capabilities:
- Supports multiple model providers: Anthropic Claude, OpenAI, Google Gemini, Ollama, and any OpenAI-compatible API endpoint.
- Supports multiple concurrent MCP servers with dynamic discovery and integration of tools.
- Provides an interactive conversation mode, a non-interactive mode (for scripts and automation), and a YAML-based executable script mode.
- Supports tool filtering (allowedTools whitelist and excludedTools blacklist, which are mutually exclusive).
- Supports environment variable substitution, with ${env://VAR} and ${env://VAR:-default} syntax usable in configuration files and scripts.
- Supports OAuth authentication (an alternative for Anthropic).
- Provides a Hooks system that can execute custom commands before and after tool execution, when a user submits a prompt, and at other points.
- Built-in servers: filesystem (secure filesystem access), bash (execute bash commands), todo (task tracking), http (fetch web content and convert formats).
- Provides a Go SDK for programmatic access without starting an operating system process.
Usage:
- Installation requirements: Go 1.23 or later; the corresponding API key or a local Ollama installation depending on the chosen provider; at least one MCP-compatible tool server.
- Configuration file: MCPHost automatically creates a configuration file in the user's home directory, searching in the order .mcphost.yml or .mcphost.json (preferred), then .mcp.yml or .mcp.json (backward compatibility). A custom location can also be specified via the --config flag.
- The configuration supports three server types: local (local command, using stdio transport), remote (remote HTTP, using StreamableHTTP transport), builtin (runs in-process, using the inprocess transport).
- Interactive mode: run mcphost directly to start an interactive conversation.
- Script mode: run YAML-based executable scripts, supporting variable substitution and direct execution via shebang.
- Non-interactive mode: for scripts and automation.
- The system prompt can be customized via the --system-prompt flag, supporting either direct text or a file path.
- Supports --tls-skip-verify to skip TLS certificate verification (only for development or trusted self-signed certificate scenarios; insecure in production environments).
Use cases:
- Development and automation tasks that require an LLM to call external tools (such as filesystem, bash, HTTP requests).
- Building MCP-based AI agent workflows.
- Implementing repeatable automation processes via script mode.
- Integrating MCP capabilities into your own programs using the Go SDK.
Limitations and caveats:
- The project is no longer actively maintained; the repository has been archived and will no longer receive updates or bug fixes. The official recommendation is for all users to migrate to the successor project Kit.
- The Hooks system executes arbitrary commands, which poses security risks; only use hooks from trusted sources and review the commands.
- --tls-skip-verify disables TLS certificate verification and should only be used in development or trusted self-signed certificate scenarios.
- Some models or providers may require additional API keys or local environment configuration.
- Details such as billing, pricing, and specific platform support are not provided in the materials.