Coverage for src/infra/mcp.py: 100%

1"""MCP server configuration for Claude Agent SDK.

2

3 This module provides the single source of truth for MCP server configuration.

4 All MCP-related configuration should be imported from this module.

5"""

6

7 from __future__ import annotations

8

9 from typing import TYPE_CHECKING, Any

10

11 if TYPE_CHECKING:

12 from pathlib import Path

13

14# Tools disabled for mala agents to reduce token waste

15 MALA_DISALLOWED_TOOLS: list[str] = ["TodoWrite"]

16

17

18 def get_mcp_servers(

19 repo_path: Path,

20) -> dict[str, Any]:

21 """Get MCP servers configuration for agents.

22

23 Args:

24 repo_path: Path to the repository.

25

26 Returns:

27 Empty dictionary (no MCP servers configured).

28 """

29 return {}

30

31

32 def get_disallowed_tools() -> list[str]:

33 """Get list of disallowed tools.

34

35 Always includes MALA_DISALLOWED_TOOLS (tools disabled for mala agents).

36

37 Returns:

38 List of tool names that should be disallowed.

39 """

40 return list(MALA_DISALLOWED_TOOLS)