# MCP Server Installation Convention
This document describes a standardized approach for organizing MCP (Model Context Protocol) server binaries on your system.
## Directory Structure
```
~/.mcp/
├── bin/ # Server binaries
│ ├── op-mcp
│ ├── datadog-mcp
│ └── playwright-mcp
└── config/ # Optional: shared MCP configurations
```
## Setup
Create the directory structure:
```bash
mkdir -p ~/.mcp/bin
```
## Installing an MCP Server
After building or downloading an MCP server binary:
```bash
# Copy or symlink the binary
cp /path/to/built/server ~/.mcp/bin/
# or
ln -s /path/to/built/server ~/.mcp/bin/server-name
```
### Example: 1Password MCP
```bash
# Build
cd /path/to/op-mcp
cargo build --release
# Install
cp target/release/op-mcp ~/.mcp/bin/
```
## Claude Code Configuration
Reference servers using absolute paths in your config:
### User-level (`~/.claude/settings.json`)
```json
{
"mcpServers": {
"1password": {
"command": "~/.mcp/bin/op-mcp"
},
"datadog": {
"command": "~/.mcp/bin/datadog-mcp"
}
}
}
```
> **Note**: Claude Code expands `~` in paths. Use absolute paths if tilde expansion isn't supported.
### Project-level (`.mcp.json`)
```json
{
"mcpServers": {
"1password": {
"command": "~/.mcp/bin/op-mcp"
}
}
}
```
## Optional: Add to PATH
If you want to run MCP servers directly from the command line (for testing):
```bash
# Add to ~/.zshrc or ~/.bashrc
export PATH="$HOME/.mcp/bin:$PATH"
```
## Benefits
- **Organized**: All MCP servers in one predictable location
- **User-owned**: No sudo required
- **Portable**: Easy to backup (`~/.mcp/`)
- **Clean**: Doesn't pollute system directories or general-purpose bin folders
- **Consistent**: Similar pattern to `~/.cargo/bin/`, `~/.npm/`, etc.
## Listing Installed Servers
```bash
ls -la ~/.mcp/bin/
```
## Uninstalling a Server
```bash
rm ~/.mcp/bin/server-name
```