Skip to content

MCP server fails to start due to database.name interface change #1820

@coderabbitai

Description

@coderabbitai

Problem

The MCP server fails to start with an AttributeError after the database configuration interface change in PR #1606.

Error

2025-12-19 05:20:56,882 mcp_server [ERROR] Failed to start MCP server.
Traceback (most recent call last):
  File "/opt/clp/lib/python3/site-packages/clp_mcp_server/clp_mcp_server.py", line 84, in main
    mcp = create_mcp_server(clp_config)
  File "/opt/clp/lib/python3/site-packages/clp_mcp_server/server/server.py", line 33, in create_mcp_server
    connector = ClpConnector(clp_config)
  File "/opt/clp/lib/python3/site-packages/clp_mcp_server/clp_connector.py", line 35, in __init__
    "db": clp_config.database.name,
  File "/opt/clp/lib/python3/site-packages/pydantic/main.py", line 1026, in __getattr__
    raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'Database' object has no attribute 'name'. Did you mean: 'names'?

Root Cause

In PR #1606, the database configuration was changed from:

  • Old: database.name (single string)
  • New: database.names (dict with ClpDbNameType.CLP and ClpDbNameType.SPIDER keys)

The MCP server code at clp_mcp_server/clp_connector.py:35 still uses the old interface.

Solution

Update the MCP server to use clp_config.database.names[ClpDbNameType.CLP] instead of clp_config.database.name.

References

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions