atxtechbro / atxtechbro/dotfiles

Implement profile-based MCP server configuration

Open
#280 2 comments 0 reactions 0 assignees View on GitHub
configuration enhancement mcp-server
Dominant language
Shell
Stars
27
Forks
2
PR merge metrics
No merged PRs in 30d

Description

## Overview
Implement a profile-based MCP server configuration system that allows different MCP servers to be enabled or disabled based on the current environment profile.

## Background
Currently, our MCP server configuration is static, with all servers defined in a single `mcp.json` file. This causes issues when:
1. Some MCP servers are only useful in specific environments (e.g., Atlassian at work but not at home)
2. Failed MCP server initializations show up as errors (e.g., "11/12 MCP servers loaded")
3. Credentials and tokens need to be maintained for services that aren't used in certain environments

## Implementation Plan

1. **Create Profile Configuration Structure**
- Implement a profile system with environment-specific MCP configurations
- Create default profiles: `work`, `personal`, `minimal`
- Store profiles in `~/.config/mcp-profiles/` directory

2. **Profile Selection Mechanism**
- Add a profile selection mechanism in `.bashrc`/`.zshrc`
- Support environment variable `MCP_PROFILE` to select the active profile
- Add hostname-based auto-detection for common environments

3. **MCP Server Configuration Generator**
- Create a script that generates the final `mcp.json` based on the active profile
- Support merging common configurations with profile-specific ones
- Include validation to ensure the generated configuration is valid

4. **Profile Management Commands**
- Add shell functions to manage profiles:
```bash
mcp-profile-list # List available profiles
mcp-profile-set # Set active profile
mcp-profile-edit # Edit a profile configuration
mcp-profile-create # Create a new profile
```

5. **Documentation**
- Update README.md with profile system documentation
- Add examples for common profile configurations
- Document the profile selection mechanism

## Example Profile Configuration

```json
// ~/.config/mcp-profiles/work.json
{
"name": "work",
"description": "Work environment with Atlassian and GitHub",
"enabledServers": [
"github",
"atlassian",
"filesystem",
"git",
"brave-search"
],
"disabledServers": [
"gdrive",
"slack"
],
"serverOverrides": {
"atlassian": {
"env": {
"JIRA_INSTANCE": "company.atlassian.net"
}
}
}
}
```

```json
// ~/.config/mcp-profiles/personal.json
{
"name": "personal",
"description": "Personal environment without work tools",
"enabledServers": [
"github",
"filesystem",
"git",
"brave-search",
"gdrive"
],
"disabledServers": [
"atlassian",
"slack"
]
}
```

## Expected Benefits
- Clean MCP server initialization with only relevant servers
- Environment-specific configurations without manual editing
- Easy switching between different environments
- Reduced credential management overhead
- Better organization of MCP server configurations

## Related Issues
This builds on the ideas mentioned in previous discussions about conditional MCP configuration and addresses the need for environment-specific setups.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting the existing mcp.json configuration and the .bashrc/.zshrc entry points described in the issue. Define the profile files under ~/.config/mcp-profiles/, the generator and shell management commands, then update README.md with examples. Done means profiles can be selected or detected, produce a validated configuration, and are documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, shell, zsh
Domain
cli, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.