@coding-agent-fabric/plugin-mcp
v0.1.3
Published
Plugin for managing Model Context Protocol (MCP) servers
Maintainers
Readme
@coding-agent-fabric/plugin-mcp
Plugin for managing Model Context Protocol (MCP) servers.
Overview
This plugin enables installation and management of MCP server configurations for various coding agents. MCP servers provide additional context and capabilities to AI coding assistants.
Supported Agents
claude-codecursorcodex
Server Types
- stdio: Servers that communicate via standard input/output
- sse: Servers that use Server-Sent Events
- http: Servers that use HTTP protocol
MCP Configuration Format
MCP servers are configured in JSON format:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/files"],
"env": {
"NODE_ENV": "production"
}
},
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
},
"remote-server": {
"url": "https://mcp-server.example.com"
}
}
}Configuration Paths
Claude Code
- Global:
~/.claude/settings.json - Project:
./.claude/settings.json
Cursor
- Global:
~/.cursor/mcp.json - Project:
./.cursor/mcp.json
Codex
- Global:
~/.codex/mcp.json - Project:
./.codex/mcp.json
Usage
# Install an MCP server
caf install local:./path/to/mcp-config --type mcp --agent claude-code
# List installed MCP servers
caf list --type mcp
# Remove an MCP server
caf remove server-name --type mcp --agent claude-codeExample Configurations
Filesystem Server (stdio)
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/projects"],
"env": {
"NODE_ENV": "production"
}
}
}
}GitHub Server (stdio with auth)
{
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_TOKEN": "${GITHUB_TOKEN}"
}
}
}
}Remote Server (SSE)
{
"mcpServers": {
"remote": {
"url": "https://mcp.example.com/sse"
}
}
}Database Server (stdio with connection)
{
"mcpServers": {
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres"],
"env": {
"DATABASE_URL": "postgresql://user:pass@localhost/db"
}
}
}
}Environment Variables
Environment variables in MCP configurations can use shell-style variable substitution:
${VAR_NAME}: Substitutes the value of the environment variable- Variables are resolved at runtime by the agent
Best Practices
- Use environment variables for sensitive data like API tokens
- Restrict filesystem access to only necessary directories
- Test servers locally before deploying globally
- Document server purposes in configuration comments (if supported)
- Version control project configs but exclude sensitive global configs
