File tree 3 files changed +23
-6
lines changed
3 files changed +23
-6
lines changed Original file line number Diff line number Diff line change 1
1
from mcp .server .fastmcp import FastMCP
2
2
3
+ from mcp_toolbox .config import Config
4
+
3
5
mcp = FastMCP ("email" )
6
+ config = Config ()
7
+
4
8
5
9
# Import tools to register them with the MCP server
6
- import mcp_toolbox .command_line .tools # noqa: E402
7
- import mcp_toolbox .figma .tools # noqa: E402
8
- import mcp_toolbox .file_ops .tools # noqa: E402, F401
10
+ if config .enable_commond_tools :
11
+ import mcp_toolbox .command_line .tools
12
+ if config .enable_file_ops_tools :
13
+ import mcp_toolbox .file_ops .tools
14
+ import mcp_toolbox .figma .tools # noqa: E402, F401
9
15
10
16
11
17
# TODO: Add prompt for toolbox's tools
Original file line number Diff line number Diff line change 2
2
3
3
from pydantic_settings import BaseSettings
4
4
5
- HOME = Path ("~/.zerolab/mcp-toolbox" ).expanduser ()
6
-
7
5
8
6
class Config (BaseSettings ):
9
7
figma_api_key : str | None = None
10
8
11
- cache_dir : str = (HOME / "cache" ).expanduser ().resolve ().absolute ().as_posix ()
9
+ enable_commond_tools : bool = True
10
+ enable_file_ops_tools : bool = True
11
+ tool_home : str = Path ("~/.zerolab/mcp-toolbox" ).expanduser ().as_posix ()
12
+
13
+ @property
14
+ def cache_dir (self ) -> str :
15
+ return (Path (self .tool_home ) / "cache" ).expanduser ().resolve ().absolute ().as_posix ()
12
16
13
17
14
18
if __name__ == "__main__" :
Original file line number Diff line number Diff line change @@ -120,3 +120,10 @@ skip_empty = true
120
120
[tool .coverage .run ]
121
121
branch = true
122
122
source = [" mcp_toolbox" ]
123
+
124
+
125
+ [tool .deptry ]
126
+ exclude = [" mcp_toolbox/app.py" , " .venv" , " tests" ]
127
+
128
+ [tool .deptry .per_rule_ignores ]
129
+ DEP002 = [" mcp" ]
You can’t perform that action at this time.
0 commit comments