| 1 | // Curated registry of common MCP (Model Context Protocol) servers that |
| 2 | // agents can be equipped with from the chat builder. Each entry is a |
| 3 | // template — the user supplies the secrets/config; ClonAgent merges them |
| 4 | // into the agent's mcp.json which Claude Code loads on launch. |
| 5 | // |
| 6 | // Structure of an MCP server entry: |
| 7 | // { |
| 8 | // name: machine name (string, used as key in mcp.json) |
| 9 | // label: human label |
| 10 | // category: 'git' | 'docs' | 'comms' | 'data' | 'cloud' | 'ops' | 'custom' |
| 11 | // description: 1-line description |
| 12 | // command: CLI command to spawn the server |
| 13 | // args: argv array (with optional ${VAR} placeholders) |
| 14 | // env: env vars expected (with optional ${VAR} placeholders) |
| 15 | // fields: [{key, label, secret, required, placeholder}] — UI form |
| 16 | // docs: URL to docs (optional) |
| 17 | // } |
| 18 | const REGISTRY = [ |
| 19 | // ── Git / Code ───────────────────────────────────────────────────────── |
| 20 | { |
| 21 | name: 'github', |
| 22 | label: 'GitHub', |
| 23 | category: 'git', |
| 24 | description: 'Issues, PRs, commits, code search, CI runs.', |
| 25 | command: 'docker', |
| 26 | args: ['run', '-i', '--rm', '-e', 'GITHUB_PERSONAL_ACCESS_TOKEN', 'ghcr.io/github/github-mcp-server'], |
| 27 | env: { GITHUB_PERSONAL_ACCESS_TOKEN: '${GITHUB_TOKEN}' }, |
| 28 | fields: [ |
| 29 | { key: 'GITHUB_TOKEN', label: 'GitHub PAT', secret: true, required: true, |
| 30 | placeholder: 'ghp_…', help: 'Crea en https://github.com/settings/tokens (scopes: repo, read:org)' }, |
| 31 | ], |
| 32 | docs: 'https://github.com/github/github-mcp-server', |
| 33 | }, |
| 34 | { |
| 35 | name: 'gitlab', |
| 36 | label: 'GitLab', |
| 37 | category: 'git', |
| 38 | description: 'Repos, MRs, issues, pipelines en GitLab.', |
| 39 | command: 'npx', |
| 40 | args: ['-y', '@modelcontextprotocol/server-gitlab'], |
| 41 | env: { GITLAB_PERSONAL_ACCESS_TOKEN: '${GITLAB_TOKEN}', GITLAB_API_URL: '${GITLAB_URL}' }, |
| 42 | fields: [ |
| 43 | { key: 'GITLAB_TOKEN', label: 'GitLab PAT', secret: true, required: true }, |
| 44 | { key: 'GITLAB_URL', label: 'GitLab URL', placeholder: 'https://gitlab.com/api/v4' }, |
| 45 | ], |
| 46 | }, |
| 47 | { |
| 48 | name: 'bitbucket', |
| 49 | label: 'Bitbucket', |
| 50 | category: 'git', |
| 51 | description: 'Bitbucket Cloud / Server (repos, PRs, issues).', |
| 52 | command: 'npx', |
| 53 | args: ['-y', 'mcp-bitbucket'], |
| 54 | env: { BITBUCKET_USERNAME: '${BB_USER}', BITBUCKET_APP_PASSWORD: '${BB_APP_PASSWORD}' }, |
| 55 | fields: [ |
| 56 | { key: 'BB_USER', label: 'Bitbucket username', required: true }, |
| 57 | { key: 'BB_APP_PASSWORD', label: 'App password', secret: true, required: true, |
| 58 | help: 'Genera en https://bitbucket.org/account/settings/app-passwords/' }, |
| 59 | ], |
| 60 | }, |
| 61 | { |
| 62 | name: 'gitea', |
| 63 | label: 'Gitea', |
| 64 | category: 'git', |
| 65 | description: 'Self-hosted Gitea (repos, issues, PRs).', |
| 66 | command: 'npx', |
| 67 | args: ['-y', 'mcp-gitea'], |
| 68 | env: { GITEA_URL: '${GITEA_URL}', GITEA_TOKEN: '${GITEA_TOKEN}' }, |
| 69 | fields: [ |
| 70 | { key: 'GITEA_URL', label: 'Gitea URL', placeholder: 'https://gitea.utopiaia.com' }, |
| 71 | { key: 'GITEA_TOKEN', label: 'Token', secret: true, required: true }, |
| 72 | ], |
| 73 | }, |
| 74 | |
| 75 | // ── Comms ────────────────────────────────────────────────────────────── |
| 76 | { |
| 77 | name: 'slack', |
| 78 | label: 'Slack', |
| 79 | category: 'comms', |
| 80 | description: 'Leer/enviar mensajes, listar canales y usuarios.', |
| 81 | command: 'npx', |
| 82 | args: ['-y', '@modelcontextprotocol/server-slack'], |
| 83 | env: { SLACK_BOT_TOKEN: '${SLACK_BOT_TOKEN}', SLACK_TEAM_ID: '${SLACK_TEAM_ID}' }, |
| 84 | fields: [ |
| 85 | { key: 'SLACK_BOT_TOKEN', label: 'Bot token (xoxb-…)', secret: true, required: true }, |
| 86 | { key: 'SLACK_TEAM_ID', label: 'Team ID', required: true }, |
| 87 | ], |
| 88 | }, |
| 89 | { |
| 90 | name: 'teams', |
| 91 | label: 'Microsoft Teams', |
| 92 | category: 'comms', |
| 93 | description: 'Mensajes y canales de MS Teams via Graph API.', |
| 94 | command: 'npx', |
| 95 | args: ['-y', 'mcp-teams'], |
| 96 | env: { MS_TENANT_ID: '${MS_TENANT}', MS_CLIENT_ID: '${MS_CLIENT_ID}', MS_CLIENT_SECRET: '${MS_CLIENT_SECRET}' }, |
| 97 | fields: [ |
| 98 | { key: 'MS_TENANT', label: 'Tenant ID', required: true }, |
| 99 | { key: 'MS_CLIENT_ID', label: 'App client ID', required: true }, |
| 100 | { key: 'MS_CLIENT_SECRET', label: 'Client secret', secret: true, required: true }, |
| 101 | ], |
| 102 | }, |
| 103 | |
| 104 | // ── Project tracking ──────────────────────────────────────────────────── |
| 105 | { |
| 106 | name: 'jira', |
| 107 | label: 'Jira', |
| 108 | category: 'docs', |
| 109 | description: 'Issues, sprints, comentarios, transiciones.', |
| 110 | command: 'npx', |
| 111 | args: ['-y', 'mcp-atlassian'], |
| 112 | env: { |
| 113 | ATLASSIAN_HOST: '${JIRA_HOST}', |
| 114 | ATLASSIAN_EMAIL: '${JIRA_EMAIL}', |
| 115 | ATLASSIAN_API_TOKEN: '${JIRA_TOKEN}', |
| 116 | }, |
| 117 | fields: [ |
| 118 | { key: 'JIRA_HOST', label: 'Host', placeholder: 'tuempresa.atlassian.net', required: true }, |
| 119 | { key: 'JIRA_EMAIL', label: 'Email', required: true }, |
| 120 | { key: 'JIRA_TOKEN', label: 'API token', secret: true, required: true, |
| 121 | help: 'https://id.atlassian.com/manage-profile/security/api-tokens' }, |
| 122 | ], |
| 123 | }, |
| 124 | { |
| 125 | name: 'azure-devops', |
| 126 | label: 'Azure DevOps', |
| 127 | category: 'docs', |
| 128 | description: 'Repos, work items, builds, pipelines en Azure DevOps.', |
| 129 | command: 'npx', |
| 130 | args: ['-y', 'mcp-azure-devops'], |
| 131 | env: { AZDO_ORG_URL: '${AZDO_ORG}', AZDO_PAT: '${AZDO_PAT}' }, |
| 132 | fields: [ |
| 133 | { key: 'AZDO_ORG', label: 'Org URL', placeholder: 'https://dev.azure.com/tuorg', required: true }, |
| 134 | { key: 'AZDO_PAT', label: 'Personal Access Token', secret: true, required: true }, |
| 135 | ], |
| 136 | }, |
| 137 | { |
| 138 | name: 'linear', |
| 139 | label: 'Linear', |
| 140 | category: 'docs', |
| 141 | description: 'Issues y proyectos en Linear.', |
| 142 | command: 'npx', |
| 143 | args: ['-y', 'mcp-linear'], |
| 144 | env: { LINEAR_API_KEY: '${LINEAR_KEY}' }, |
| 145 | fields: [ |
| 146 | { key: 'LINEAR_KEY', label: 'API key', secret: true, required: true }, |
| 147 | ], |
| 148 | }, |
| 149 | { |
| 150 | name: 'notion', |
| 151 | label: 'Notion', |
| 152 | category: 'docs', |
| 153 | description: 'Lectura/escritura de páginas y databases en Notion.', |
| 154 | command: 'npx', |
| 155 | args: ['-y', '@modelcontextprotocol/server-notion'], |
| 156 | env: { NOTION_API_KEY: '${NOTION_KEY}' }, |
| 157 | fields: [ |
| 158 | { key: 'NOTION_KEY', label: 'Internal integration token', secret: true, required: true }, |
| 159 | ], |
| 160 | }, |
| 161 | |
| 162 | // ── Data ──────────────────────────────────────────────────────────────── |
| 163 | { |
| 164 | name: 'postgres', |
| 165 | label: 'PostgreSQL', |
| 166 | category: 'data', |
| 167 | description: 'Consulta SQL read-only sobre una base de datos PostgreSQL.', |
| 168 | command: 'npx', |
| 169 | args: ['-y', '@modelcontextprotocol/server-postgres', '${PG_URL}'], |
| 170 | env: {}, |
| 171 | fields: [ |
| 172 | { key: 'PG_URL', label: 'Connection URL', secret: true, required: true, |
| 173 | placeholder: 'postgresql://user:pass@host:5432/db' }, |
| 174 | ], |
| 175 | }, |
| 176 | { |
| 177 | name: 'sqlite', |
| 178 | label: 'SQLite', |
| 179 | category: 'data', |
| 180 | description: 'Lectura de bases de datos SQLite locales.', |
| 181 | command: 'npx', |
| 182 | args: ['-y', '@modelcontextprotocol/server-sqlite', '${DB_PATH}'], |
| 183 | env: {}, |
| 184 | fields: [ |
| 185 | { key: 'DB_PATH', label: 'Path al .db', placeholder: '/path/to/data.db', required: true }, |
| 186 | ], |
| 187 | }, |
| 188 | { |
| 189 | name: 'elasticsearch', |
| 190 | label: 'Elasticsearch / OpenSearch', |
| 191 | category: 'data', |
| 192 | description: 'Búsqueda en índices ES / OpenSearch (read-only).', |
| 193 | command: 'npx', |
| 194 | args: ['-y', '@elastic/mcp-server-elasticsearch'], |
| 195 | env: { ELASTICSEARCH_URL: '${ES_URL}', ELASTICSEARCH_API_KEY: '${ES_KEY}' }, |
| 196 | fields: [ |
| 197 | { key: 'ES_URL', label: 'URL', placeholder: 'http://localhost:9200', required: true }, |
| 198 | { key: 'ES_KEY', label: 'API key (opcional)', secret: true }, |
| 199 | ], |
| 200 | }, |
| 201 | |
| 202 | // ── Cloud / Ops ───────────────────────────────────────────────────────── |
| 203 | { |
| 204 | name: 'kubernetes', |
| 205 | label: 'Kubernetes', |
| 206 | category: 'ops', |
| 207 | description: 'Pods, events, logs, describe (lectura).', |
| 208 | command: 'docker', |
| 209 | args: ['run', '-i', '--rm', '-v', '${KUBECONFIG}:/root/.kube/config', 'ghcr.io/manusa/kubernetes-mcp-server:latest'], |
| 210 | env: {}, |
| 211 | fields: [ |
| 212 | { key: 'KUBECONFIG', label: 'Path al kubeconfig', placeholder: '~/.kube/config', required: true }, |
| 213 | ], |
| 214 | }, |
| 215 | { |
| 216 | name: 'aws', |
| 217 | label: 'AWS', |
| 218 | category: 'cloud', |
| 219 | description: 'API de AWS (S3, EC2, CloudWatch…) usando credenciales locales.', |
| 220 | command: 'npx', |
| 221 | args: ['-y', 'mcp-aws'], |
| 222 | env: { AWS_PROFILE: '${AWS_PROFILE}', AWS_REGION: '${AWS_REGION}' }, |
| 223 | fields: [ |
| 224 | { key: 'AWS_PROFILE', label: 'AWS profile', placeholder: 'default' }, |
| 225 | { key: 'AWS_REGION', label: 'Región', placeholder: 'eu-west-1' }, |
| 226 | ], |
| 227 | }, |
| 228 | |
| 229 | // ── Filesystem ────────────────────────────────────────────────────────── |
| 230 | { |
| 231 | name: 'filesystem', |
| 232 | label: 'Filesystem', |
| 233 | category: 'data', |
| 234 | description: 'Acceso a una carpeta local (lectura/escritura).', |
| 235 | command: 'npx', |
| 236 | args: ['-y', '@modelcontextprotocol/server-filesystem', '${ROOT_PATH}'], |
| 237 | env: {}, |
| 238 | fields: [ |
| 239 | { key: 'ROOT_PATH', label: 'Carpeta raíz', placeholder: '/home/ubuntu/projects', required: true }, |
| 240 | ], |
| 241 | }, |
| 242 | |
| 243 | // ── Web search ────────────────────────────────────────────────────────── |
| 244 | { |
| 245 | name: 'brave-search', |
| 246 | label: 'Brave Search', |
| 247 | category: 'docs', |
| 248 | description: 'Búsqueda web vía Brave Search API.', |
| 249 | command: 'npx', |
| 250 | args: ['-y', '@modelcontextprotocol/server-brave-search'], |
| 251 | env: { BRAVE_API_KEY: '${BRAVE_KEY}' }, |
| 252 | fields: [ |
| 253 | { key: 'BRAVE_KEY', label: 'API key', secret: true, required: true }, |
| 254 | ], |
| 255 | }, |
| 256 | ]; |
| 257 | |
| 258 | function listRegistry() { |
| 259 | return REGISTRY.map(({ command, args, env, ...meta }) => meta); |
| 260 | } |
| 261 | |
| 262 | function getEntry(name) { |
| 263 | return REGISTRY.find(e => e.name === name) || null; |
| 264 | } |
| 265 | |
| 266 | function buildServerConfig(name, values = {}) { |
| 267 | const e = getEntry(name); |
| 268 | if (!e) throw new Error(`unknown MCP server '${name}'`); |
| 269 | function expand(s) { |
| 270 | if (typeof s !== 'string') return s; |
| 271 | return s.replace(/\$\{(\w+)\}/g, (_, k) => values[k] ?? ''); |
| 272 | } |
| 273 | return { |
| 274 | command: e.command, |
| 275 | args: (e.args || []).map(expand), |
| 276 | env: Object.fromEntries(Object.entries(e.env || {}).map(([k, v]) => [k, expand(v)])), |
| 277 | }; |
| 278 | } |
| 279 | |
| 280 | module.exports = { listRegistry, getEntry, buildServerConfig }; |