A powerful Model Context Protocol (MCP) manager that enhances Large Language Models with:
- Docker Containerization - Run MCP servers in isolated containers with automatic detection
- Dynamic Config Reloading - Update server configurations without restarting
- Multi-Server Aggregation - Combine tools and resources from different servers
- Smart Capability Routing - Direct requests to appropriate backend servers
- Advanced Configuration - Fine-grained control over tool exposure
Posuer acts as a bridge between MCP clients (like Claude Desktop) and multiple MCP servers. Instead of connecting each server individually to your LLM client, Posuer lets you:
- Consolidate multiple servers - Manage all your MCP servers through a single connection point
- Aggregate capabilities - Combine tools, resources, and prompts from different servers
- Simplify configuration - Use a single YAML file to define all your server connections
- Enhance reliability - Monitor server health and handle failures gracefully
┌───────────────┐ ┌──────────────────────────────────────┐
│ │ │ │
│ LLM Client │◄─── MCP/stdio ──►│ Posuer │
│ (Claude, etc) │ │ │
│ │ │ │
└───────────────┘ └──┬─────────────┬─────────────┬───────┘
│ │ │
MCP/stdio MCP/stdio MCP/SSE
│ │ │
▼ ▼ ▼
┌─────────┐ ┌─────────┐ ┌─────────┐
│ ServerA │ │ ServerB │ │ ServerC │
└─────────┘ └─────────┘ └─────────┘
Posuer implements both sides of the MCP protocol:
- It acts as an MCP server to clients like Claude Desktop
- It acts as an MCP client to backend servers
- It intelligently routes messages between them based on capabilities
- Dynamic server management - Configure and manage multiple MCP servers
- Capability aggregation - Combine resources, tools, and prompts from all servers
- Smart routing - Direct requests to the appropriate backend server
- Multiple transport types - Support for both stdio and SSE connections
- Configuration inclusion - Include server configurations from multiple files, including Claude Desktop configs
- Error handling - Graceful handling of server failures
- Logging - Detailed logs for debugging and monitoring
- Go 1.23 or higher
- Access to MCP servers (e.g., filesystem, weather, search, etc.)
# Clone the repository
git clone https://github.com/jkoelker/posuer.git
cd posuer
# Build the binary
make
# The binary will be created in the build directory
ls -la build/posuer
# Run with default configuration (config.yaml)
./build/posuer
# Run with a specific configuration file
./build/posuer -config /path/to/config.yaml
# Show version information
./build/posuer -version
# Run in stdio mode (default)
./build/posuer -stdio
# Run with config file watcher enabled
./build/posuer -config /path/to/config.yaml -watch
Posuer is configured using a YAML file. By default, it looks for config.yaml
in the following locations (in order):
- Path specified by the
-config
flag - User configuration directory (e.g.,
~/.config/posuer/config.yaml
)
Example configuration:
# Posuer configuration file
servers:
# Direct server definition
- name: filesystem
type: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-filesystem"
- "/tmp"
# You can also include other config files
- ~/other-servers.yaml
- ~/.config/Claude/claude_desktop_config.json
# Example of an SSE server (remote)
- name: remote-server
type: sse
url: https://example.com/sse
Posuer provides flexible capability configuration with three formats:
-
Boolean (Enable/Disable entire server)
servers: - name: all-enabled type: stdio command: npx args: - -y - "@modelcontextprotocol/server-memory" enable: true # Enable all capabilities - name: all-disabled type: stdio command: npx args: - -y - "@modelcontextprotocol/server-memory" enable: false # Disable all capabilities (or use disable: true)
-
List (Quick format for tools)
servers: - name: specific-tools type: stdio command: npx args: - -y - "@modelcontextprotocol/server-memory" enable: - create_entities # Only enable these specific tools - read_graph - name: blocked-tools type: stdio command: npx args: - -y - "@modelcontextprotocol/server-filesystem" - "/tmp" disable: - write_file # Disable these specific tools - move_file
-
Map (Advanced capability filtering)
servers: - name: advanced-filtering type: stdio command: npx args: - -y - "@modelcontextprotocol/server-memory" enable: tools: # Enable specific tools - create_entities - read_graph prompts: system_prompt # Enable a single prompt templates: # Enable specific templates - entity_template - graph_template disable: tools: # Disable specific tools (even if in enable list) - delete_entities
The map format supports filtering by different capability types:
tools
: Tool functions the LLM can callprompts
: System prompts the LLM can usetemplates
: Resource templates for dynamic contentresources
: Static resources (files, etc.)
See the default config pkg/config/config.yaml
for more detailed
configuration examples.
Posuer supports dynamic configuration reloading, allowing you to modify your configuration file while the service is running. Changes are detected automatically and applied without requiring a restart.
To enable this feature, use the -watch
flag:
# Run with configuration file watching enabled
./posuer -config /path/to/config.yaml -watch
When the configuration file is modified:
- Posuer detects the change automatically
- The new configuration is loaded and validated
- New servers are added, existing servers are updated, and removed servers are shut down
- All changes are applied without disrupting active connections
This feature is useful for:
- Adding new MCP servers on the fly
- Removing or disabling servers without restarting Posuer
- Testing different configurations during development
- Rotating API keys or updating endpoints in production
The file watcher includes debouncing to prevent excessive reloads during rapid edits.
servers
: Array of server configurations or file paths to include- For direct server definitions:
name
: Server name (used for namespacing capabilities)type
: Server connection type ("stdio" or "sse")command
: The command to run (for stdio)args
: Command line argumentsenv
: Environment variablesurl
: Server URL (for sse type)enable
: Enable specific capabilities (see format options below)disable
: Disable specific capabilities (see format options below)container
: Container configuration (see container options below)
- For file inclusions, simply provide the file path as a string
- For direct server definitions:
Posuer supports running MCP servers in containers for improved isolation and dependency management. Container configuration can be specified in three formats:
-
Simple format: Just specify the image name as a string
servers: - name: filesystem type: stdio command: npx args: - -y - "@modelcontextprotocol/server-filesystem" - "/tmp" container: "node:18-alpine"
-
Full configuration: Specify a map with all container options
servers: - name: database type: stdio command: npx args: - -y - "@modelcontextprotocol/server-sqlite" container: image: node:18-alpine volumes: "/data": "/app/data" env: DB_PATH: "/app/data/database.sqlite" network: host workdir: "/app" args: - "--cap-add=SYS_ADMIN"
-
Explicitly disabled: Set to false to disable container isolation including automatic detection
servers: - name: no-container type: stdio command: npx # Would normally use a container automatically args: - -y - "@modelcontextprotocol/server-filesystem" - "/tmp" container: false # Explicitly disable container usage
Container configuration options:
image
: The container image to use (required)volumes
: Map of host paths to container pathsenv
: Environment variables to pass to the containernetwork
: Network mode (host, bridge, etc.)user
: User to run as in the containerworkdir
: Working directory in the containerargs
: Additional arguments to pass to the container runtime
Posuer can automatically detect certain commands and run them in appropriate containers:
npx
commands are automatically run indocker.io/node:alpine
uvx
commands are automatically run inghcr.io/astral-sh/uv:alpine
This automatic detection simplifies configuration when working with common Node.js and Python package managers. For example:
servers:
# This will automatically run in a Node.js container
- name: filesystem
type: stdio
command: npx
args:
- -y
- "@modelcontextprotocol/server-filesystem"
- "/tmp"
# No container configuration needed, it will be auto-detected
# To explicitly disable container detection
- name: local-npm
type: stdio
command: npx
args:
- -y
- some-local-package
container: false # Explicitly disable container detection
Posuer will automatically detect if a container runtime (podman or docker) is available on the system and prefer podman for better rootless container support.
To use Posuer with Claude Desktop:
- Build Posuer as described above
- Create a configuration file with your desired MCP servers
- Update your Claude Desktop configuration to use Posuer as an MCP server:
{
"mcpServers": {
"posuer": {
"command": "/path/to/posuer",
"args": ["-watch"]
}
}
}
- Restart Claude Desktop
# Format code
make fmt
# Run linter
make lint
# Run tests
make test
# Clean build artifacts
make clean
This project is licensed under the MIT License - see the LICENSE file for details.