Multiple DATABASE connectors on one MCP server: tools/list silently exposes only the first connector's tools, and execute_query always routes to the first database
Los mantenedores suelen responder en 1 día
Ya se ha fusionado un pull request relacionado.
- #1309 de @helpcodeai — fusionado
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Start with mcp-server.service.ts around lines 109–112, where connectors are ordered, and trace how the MCP endpoint builds tools/list and routes execute_query. The issue also points to the GraphQL and OData prefixing in connectors.controller.ts as an example to compare. Done means all three database tools are exposed per assigned connector and each executes against its own database; add or run endpoint tests for multiple connectors to verify this.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
Assigning two or more DATABASE connectors to the same MCP server silently drops all but the first connector's auto-generated tools from tools/list, and every call to the shared tool names (execute_query, get_database_schema, get_example_queries) is executed against the first-registered connector's database. The other databases are not just unlisted — they are completely unreachable through the per-server MCP endpoint, with no error or warning anywhere in the UI.
Multi-connector assignment is a core feature of AnythingMCP (mcp_server_connectors), so a legitimate server configuration serves the wrong (or incomplete) data silently.
Reproduced on self-hosted v0.29.0 (18aa018), and I verified the same code paths are unchanged on current main (6d1d895c, post-0.51.0), so this is not fixed yet.
Steps to Reproduce
- Create two or more DATABASE connectors in one workspace (reproduced with:
mysql-domeos-betaMySQL,service-mesh-rwMySQL,context-forge-pgPostgreSQL). - Assign all of them to one MCP server.
- Call
tools/liston/mcp/{serverId}with a validX-API-Key:
{"jsonrpc":"2.0","id":1,"method":"tools/list"}
- Result: 4 tools —
execute_query,get_database_schema,get_example_queries(all with the first connector's flavor; MySQL in my case) pluskg_how_to_obtain. Expected 9 DB tools (3 per connector). - Call
execute_querywith any SQL — it is always executed against the first-registered connector's database (registration order isorderBy: { id: 'asc' }inmcp-server.service.ts:109-112).
GET /api/mcp-servers/{id} confirms all 3 connectors are assigned (_count.connectors: 3), while /mcp/{id} serves only one connector's tools.
Expected Behavior
- All 9 database tools are exposed (3 per connector), and each routes to its own connector's database.
- Since the SDK requires unique tool names per
McpServerinstance, the natural design (already used elsewhere in the codebase — GraphQL and OData builtins prefix tools with the connector slug, e.g.buildGraphqlBuiltinTools({ prefix: slugifyForPrefix(dto.name) })inconnectors.controller.ts) is to namespace DATABASE builtins per connector, e.g.context_forge_pg_execute_queryor similar. - At minimum, assigning a second DATABASE connector should surface a visible warning, since silent tool dropping is hard to notice.
Actual Behavior
tools/listreturns 4 tools instead of 9+1; six tools silently vanish.- All calls to the shared names route to the first-registered connector — the other databases' data is unreachable, and
execute_queryreturns plausible data from the wrong database, which is worse than an error: nothing suggests anything is missing. - The only trace is a rate-limited (once/hour) backend warn log:
Duplicate tool name "execute_query" on server <id> — skipping the extra copy (check for duplicate connector assignments).
Connector Type
Database
Deployment Method
Docker Compose
Version
No response
Relevant Logs
WARN [McpEndpointController] Duplicate tool name "execute_query" on server <mcpServerId> — skipping the extra copy (check for duplicate connector assignments).
WARN [McpEndpointController] Duplicate tool name "get_database_schema" on server <mcpServerId> — skipping the extra copy (check for duplicate connector assignments).
WARN [McpEndpointController] Duplicate tool name "get_example_queries" on server <mcpServerId> — skipping the extra copy (check for duplicate connector assignments).
Environment
- AnythingMCP v0.29.0, self-hosted
- Connectors: 3× DATABASE (2× MySQL, 1× PostgreSQL)
- MCP client: raw Streamable HTTP with
X-API-Key
- Lenguaje dominante
- TypeScript
- Estrellas
- 856
- Forks
- 82
- Merge medio
- 7 h 49 min
- PR fusionados (30 d)
- 302
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de HelpCode-ai/anythingmcp
-
enhancement good first issue hacktoberfest help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
HelpCode-ai/anythingmcp#982 · 10 comentarios ·
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
HelpCode-ai/anythingmcp#1284 ·
Los mantenedores suelen responder en 1 día
-
Translate the rest of the admin UI (DE, IT)Posiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
HelpCode-ai/anythingmcp#1271 ·
Los mantenedores suelen responder en 1 día
-
DATABASE connectors keep a connection-string password in plaintext and return it to the browserPosiblemente ocupada @Riteesh-2k6 la tomó hace 4 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
HelpCode-ai/anythingmcp#1245 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
🎃 New adapter: SonarQube (code quality, Server or Cloud)Posiblemente ocupada @aj-codespy la tomó hace 2 días. Abiertoenhancement hacktoberfest help wanted
Dificultad 3/5 Medio día Aptitud para principiantes 85/100
HelpCode-ai/anythingmcp#1240 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
Todos los issues de HelpCode-ai/anythingmcp
Issues similares
-
area:plugins area:security area:skills bug has repro
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anthropics/claude-code#105911 ·
Los mantenedores suelen responder en 1 día
-
openspec-apply-change skill: when blocked, may select a ready artifact unrelated to missingArtifactsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Fission-AI/OpenSpec#2165 ·
Los mantenedores suelen responder en 1 día
-
🐞 bug 🧐 unconfirmed
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Tencent/tdesign-vue-next#7032 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
gnosis/gnosis_vpn#661 ·
Los mantenedores suelen responder en 1 día
-
content-freshness: staleOwnedContent doc comments still say 'complete receipt' (follow-up to #7912)Abiertotriage:bug-verified
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Los mantenedores suelen responder en 1 día