Skip to content

Fix AuthConfig AttributeError and tool discovery tag parsing#295

Merged
privateip merged 4 commits intoitential:develfrom
AutomateIP:fix/config-and-tool-discovery
Jan 14, 2026
Merged

Fix AuthConfig AttributeError and tool discovery tag parsing#295
privateip merged 4 commits intoitential:develfrom
AutomateIP:fix/config-and-tool-discovery

Conversation

@AutomateIP
Copy link
Contributor

Summary: Fix Configuration Access and Tool Discovery

This PR addresses several critical issues identified during server initialization and tool discovery, primarily stemming from the migration to a structured dataclass-based configuration system.

Key Fixes:

1. Configuration Compatibility for Authentication

  • File: src/itential_mcp/server/auth.py
  • Issue: The authentication provider builder was attempting to call .get() on an AuthConfig dataclass, resulting in an AttributeError.
  • Fix: Utilized the auth_to_dict converter to transform the dataclass into a dictionary before processing, maintaining compatibility with existing provider logic.

2. Corrected Middleware Configuration Access

  • File: src/itential_mcp/middleware/serialization.py
  • Issue: An invalid attribute path cfg.server_response_format was used, which caused an AttributeError during middleware initialization.
  • Fix: Updated the access path to the correct structured location: cfg.server.response_format.

3. Robust Tool Discovery for Fully Qualified Modules

  • File: src/itential_mcp/utilities/tool.py
  • Issue: The tool discovery mechanism was strictly comparing module names, which failed when tools were imported via their fully qualified package names (e.g., itential_mcp.tools.adapters vs adapters).
  • Fix: Enhanced the module name check to accept both simple and fully qualified module names, ensuring all static tools are correctly registered.

4. Support for Comma-Separated Tag Filtering

  • File: src/itential_mcp/server/server.py
  • Issue: Comma-separated strings for include_tags and exclude_tags (from config/env) were passed directly to FastMCP, which expects a list. This often resulted in all tools being filtered out.
  • Fix: Added a helper to parse comma-separated tag strings into lists before initializing the FastMCP server.

Impact:

These changes ensure the MCP server can start successfully with authentication enabled and correctly populates the available tools list in clients like Claude Desktop.

@AutomateIP AutomateIP requested a review from a team as a code owner January 12, 2026 22:24
@AutomateIP
Copy link
Contributor Author

@privateip Karan reported an issue opening itential-mcp on Claude Desktop. This is an attempt to address it. The fix is a bit involved.

Please review carefully.

@privateip
Copy link
Member

@AutomateIP can you rebase this PR against the latest please

@AutomateIP AutomateIP force-pushed the fix/config-and-tool-discovery branch from 1786caf to 02fd7da Compare January 13, 2026 21:07
@AutomateIP
Copy link
Contributor Author

@AutomateIP can you rebase this PR against the latest please

done

@privateip privateip merged commit 653f9ca into itential:devel Jan 14, 2026
4 checks passed
privateip added a commit to privateip/itential-mcp that referenced this pull request Jan 16, 2026
- Add AuthConfig attribute access fix (itential#297)
- Add tool discovery tag parsing fix (itential#295)
privateip added a commit that referenced this pull request Jan 16, 2026
- Add AuthConfig attribute access fix (#297)
- Add tool discovery tag parsing fix (#295)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants