Skip to content

[CHORE][REFACTOR]: Retire legacy mcpgateway.validators references #2633

@crivetimihai

Description

@crivetimihai

Overview

Clean up legacy mcpgateway.validators compatibility references so docs/tests point to the canonical mcpgateway.common.validators, and decide whether to retire the shim.


Current State

  • mcpgateway/validators.py re-exports SecurityValidator for backward compatibility.
  • docs/docs/architecture/security-features.md references mcpgateway/validators.py (non-canonical path).
  • tests/security/test_input_validation.py includes a coverage comment with --cov=mcpgateway.validators.
  • No in-repo imports of mcpgateway.validators found via search.

Proposed Implementation

  1. Update docs mention to mcpgateway.common.validators.
  2. Update/remove the --cov=mcpgateway.validators comment in tests/security/test_input_validation.py.
  3. Confirm external consumers and then either:
    • remove mcpgateway/validators.py, or
    • keep it with a deprecation note + removal timeline.

Acceptance Criteria

  • No references to mcpgateway/validators.py or mcpgateway.validators remain in the repo.
  • SecurityValidator usage continues via mcpgateway.common.validators.
  • Decision recorded on shim removal vs. deprecation.

Metadata

Metadata

Assignees

Labels

COULDP3: Nice-to-have features with minimal impact if left out; included if time permitschoreLinting, formatting, dependency hygiene, or project maintenance choresdocumentationImprovements or additions to documentationpythonPython / backend development (FastAPI)testingTesting (unit, e2e, manual, automated, etc)

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions