suprema-biostar-mcp 1.0.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (62) hide show
  1. suprema_biostar_mcp-1.0.1/.env.example +37 -0
  2. suprema_biostar_mcp-1.0.1/LICENSE +21 -0
  3. suprema_biostar_mcp-1.0.1/PKG-INFO +163 -0
  4. suprema_biostar_mcp-1.0.1/README.md +127 -0
  5. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/__init__.py +25 -0
  6. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/__main__.py +15 -0
  7. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/config.py +87 -0
  8. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/__init__.py +35 -0
  9. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/access_handler.py +2162 -0
  10. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/audit_handler.py +489 -0
  11. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/auth_handler.py +216 -0
  12. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/base_handler.py +228 -0
  13. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/card_handler.py +746 -0
  14. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/device_handler.py +4344 -0
  15. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/door_handler.py +3969 -0
  16. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/event_handler.py +1331 -0
  17. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/file_handler.py +212 -0
  18. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/help_web_handler.py +379 -0
  19. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/log_handler.py +1051 -0
  20. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/navigation_handler.py +109 -0
  21. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/occupancy_handler.py +541 -0
  22. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/handlers/user_handler.py +3568 -0
  23. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/__init__.py +21 -0
  24. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/access.py +158 -0
  25. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/audit.py +73 -0
  26. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/auth.py +24 -0
  27. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/cards.py +128 -0
  28. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/devices.py +496 -0
  29. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/doors.py +306 -0
  30. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/events.py +104 -0
  31. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/files.py +7 -0
  32. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/help.py +29 -0
  33. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/logs.py +33 -0
  34. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/occupancy.py +19 -0
  35. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/tool_response.py +29 -0
  36. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/schemas/users.py +166 -0
  37. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/server.py +335 -0
  38. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/session.py +221 -0
  39. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tool_manager.py +172 -0
  40. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/__init__.py +45 -0
  41. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/access.py +510 -0
  42. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/audit.py +227 -0
  43. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/auth.py +59 -0
  44. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/cards.py +269 -0
  45. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/categories.py +197 -0
  46. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/devices.py +1552 -0
  47. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/doors.py +865 -0
  48. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/events.py +305 -0
  49. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/files.py +28 -0
  50. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/help.py +80 -0
  51. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/logs.py +123 -0
  52. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/navigation.py +89 -0
  53. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/occupancy.py +91 -0
  54. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/tools/users.py +1113 -0
  55. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/utils/__init__.py +31 -0
  56. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/utils/category_mapper.py +206 -0
  57. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/utils/decorators.py +101 -0
  58. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/utils/language_detector.py +51 -0
  59. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/utils/search.py +42 -0
  60. suprema_biostar_mcp-1.0.1/biostar_x_mcp_server/utils/timezone.py +122 -0
  61. suprema_biostar_mcp-1.0.1/pyproject.toml +76 -0
  62. suprema_biostar_mcp-1.0.1/requirements.txt +19 -0
@@ -0,0 +1,37 @@
1
+ # BioStar X MCP Server Configuration
2
+ # Copy this file to .env and fill in your values
3
+
4
+ # ===========================================
5
+ # REQUIRED: BioStar X Server Configuration
6
+ # ===========================================
7
+ BIOSTAR_URL=https://your-biostar-server.com
8
+ BIOSTAR_USERNAME=admin
9
+ BIOSTAR_PASSWORD=your_password
10
+
11
+ # ===========================================
12
+ # OPTIONAL: API Settings
13
+ # ===========================================
14
+ # API request timeout in seconds (default: 30)
15
+ API_TIMEOUT=30
16
+
17
+ # Verify SSL certificates (default: true)
18
+ # Set to false for self-signed certificates
19
+ VERIFY_SSL=true
20
+
21
+ # Session refresh interval in seconds (default: 3600)
22
+ SESSION_REFRESH_INTERVAL=3600
23
+
24
+ # ===========================================
25
+ # OPTIONAL: Documentation Settings
26
+ # ===========================================
27
+ # Base URL for BioStar X documentation (default: https://docs.supremainc.com)
28
+ DOCS_BASE_URL=https://docs.supremainc.com
29
+
30
+ # Documentation cache TTL in seconds (default: 3600)
31
+ DOCS_CACHE_TTL=3600
32
+
33
+ # ===========================================
34
+ # OPTIONAL: Debug Settings
35
+ # ===========================================
36
+ # Enable debug mode (default: false)
37
+ DEBUG=false
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Suprema Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,163 @@
1
+ Metadata-Version: 2.4
2
+ Name: suprema-biostar-mcp
3
+ Version: 1.0.1
4
+ Summary: MCP Server for Suprema BioStar X - Access Control System Integration for AI Assistants
5
+ Project-URL: Homepage, https://www.supremainc.com
6
+ Project-URL: Documentation, https://docs.supremainc.com/en/platform/biostar_x
7
+ Project-URL: Repository, https://github.com/anthropics/mcp-servers
8
+ Author-email: "Suprema Inc." <support@supremainc.com>
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: access-control,ai-assistant,biostar,claude,mcp,security,suprema
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Operating System :: OS Independent
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Topic :: Security
21
+ Classifier: Topic :: System :: Systems Administration
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: httpx>=0.24.0
24
+ Requires-Dist: mcp>=1.0.0
25
+ Requires-Dist: openpyxl>=3.1.0
26
+ Requires-Dist: psutil>=5.9.0
27
+ Requires-Dist: pydantic>=2.0.0
28
+ Requires-Dist: python-dotenv>=1.0.0
29
+ Requires-Dist: pyyaml>=6.0.1
30
+ Provides-Extra: dev
31
+ Requires-Dist: black>=23.0.0; extra == 'dev'
32
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
33
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
34
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
35
+ Description-Content-Type: text/markdown
36
+
37
+ # Suprema BioStar MCP Server
38
+
39
+ MCP (Model Context Protocol) server for **Suprema BioStar X** - Next-generation access control platform integration for AI assistants.
40
+
41
+ > **🚀 One-Click Installation**: `uvx suprema-biostar-mcp`
42
+
43
+ ## Features
44
+
45
+ - **129+ Tools**: Full BioStar X API coverage (users, doors, devices, access control, events, and more)
46
+ - **Lightweight**: No heavy ML dependencies (~50MB vs 900MB)
47
+ - **Live Documentation**: Real-time docs from docs.supremainc.com
48
+ - **Multi-language**: Korean and English support
49
+ - **Easy Setup**: Works with Claude Desktop, Claude Code, and any MCP client
50
+
51
+ ## Quick Start
52
+
53
+ ### 1. Add to Claude Desktop
54
+
55
+ Edit your Claude Desktop config file:
56
+
57
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
58
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
59
+
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "suprema-biostar": {
64
+ "command": "uvx",
65
+ "args": ["suprema-biostar-mcp"],
66
+ "env": {
67
+ "BIOSTAR_URL": "https://your-biostar-server.com",
68
+ "BIOSTAR_USERNAME": "admin",
69
+ "BIOSTAR_PASSWORD": "your-password"
70
+ }
71
+ }
72
+ }
73
+ }
74
+ ```
75
+
76
+ ### 2. Restart Claude Desktop
77
+
78
+ That's it! 🎉
79
+
80
+ ## Configuration
81
+
82
+ | Environment Variable | Required | Description |
83
+ |---------------------|----------|-------------|
84
+ | `BIOSTAR_URL` | ✅ | BioStar X server URL (e.g., `https://192.168.1.100`) |
85
+ | `BIOSTAR_USERNAME` | ✅ | Login username |
86
+ | `BIOSTAR_PASSWORD` | ✅ | Login password |
87
+ | `VERIFY_SSL` | ❌ | SSL verification (default: `true`) |
88
+ | `API_TIMEOUT` | ❌ | API timeout in seconds (default: `30`) |
89
+
90
+ ### Changing Credentials
91
+
92
+ 1. Edit `claude_desktop_config.json`
93
+ 2. Update the `env` values
94
+ 3. Restart Claude Desktop
95
+
96
+ ## Available Tools (129+)
97
+
98
+ | Category | Tools | Description |
99
+ |----------|-------|-------------|
100
+ | **auth** | 4 | Login, logout, session management |
101
+ | **users** | 23 | User CRUD, groups, CSV import/export |
102
+ | **doors** | 22 | Door control, groups, APB settings |
103
+ | **access** | 13 | Access groups and levels |
104
+ | **devices** | 38 | Device management, network config |
105
+ | **cards** | 5 | Card creation (CSN, Wiegand, QR) |
106
+ | **events** | 6 | Event search, logs, export |
107
+ | **audit** | 6 | Audit trail tracking |
108
+ | **occupancy** | 2 | Occupancy analysis |
109
+ | **logs** | 5 | Server log analysis |
110
+ | **files** | 1 | File reading (CSV, PDF) |
111
+ | **navigation** | 1 | UI navigation |
112
+ | **help** | 3 | Documentation search |
113
+
114
+ ## Example Usage
115
+
116
+ Once connected to Claude:
117
+
118
+ ```
119
+ "List all users"
120
+ "Create a user named John Smith"
121
+ "Open the main entrance door"
122
+ "Show access events from today"
123
+ "How do I configure anti-passback?"
124
+ ```
125
+
126
+ ## Alternative Installation
127
+
128
+ ### Using pip
129
+
130
+ ```bash
131
+ pip install suprema-biostar-mcp
132
+ suprema-biostar-mcp
133
+ ```
134
+
135
+ ### From source
136
+
137
+ ```bash
138
+ git clone https://github.com/supremainc/suprema-biostar-mcp.git
139
+ cd suprema-biostar-mcp
140
+ pip install -e .
141
+ python -m biostar_x_mcp_server
142
+ ```
143
+
144
+ ## Requirements
145
+
146
+ - Python 3.10+
147
+ - BioStar X server with API access
148
+ - Network connectivity to BioStar server
149
+ - [uv](https://docs.astral.sh/uv/) for `uvx` command (recommended)
150
+
151
+ ## Documentation
152
+
153
+ - **BioStar X Docs**: https://docs.supremainc.com/en/platform/biostar_x
154
+ - **MCP Protocol**: https://modelcontextprotocol.io
155
+
156
+ ## Support
157
+
158
+ - **Suprema Support**: https://www.supremainc.com/support
159
+ - **Documentation**: https://docs.supremainc.com
160
+
161
+ ---
162
+
163
+ Made with ❤️ by [Suprema Inc.](https://www.supremainc.com)
@@ -0,0 +1,127 @@
1
+ # Suprema BioStar MCP Server
2
+
3
+ MCP (Model Context Protocol) server for **Suprema BioStar X** - Next-generation access control platform integration for AI assistants.
4
+
5
+ > **🚀 One-Click Installation**: `uvx suprema-biostar-mcp`
6
+
7
+ ## Features
8
+
9
+ - **129+ Tools**: Full BioStar X API coverage (users, doors, devices, access control, events, and more)
10
+ - **Lightweight**: No heavy ML dependencies (~50MB vs 900MB)
11
+ - **Live Documentation**: Real-time docs from docs.supremainc.com
12
+ - **Multi-language**: Korean and English support
13
+ - **Easy Setup**: Works with Claude Desktop, Claude Code, and any MCP client
14
+
15
+ ## Quick Start
16
+
17
+ ### 1. Add to Claude Desktop
18
+
19
+ Edit your Claude Desktop config file:
20
+
21
+ - **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
22
+ - **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "suprema-biostar": {
28
+ "command": "uvx",
29
+ "args": ["suprema-biostar-mcp"],
30
+ "env": {
31
+ "BIOSTAR_URL": "https://your-biostar-server.com",
32
+ "BIOSTAR_USERNAME": "admin",
33
+ "BIOSTAR_PASSWORD": "your-password"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ ### 2. Restart Claude Desktop
41
+
42
+ That's it! 🎉
43
+
44
+ ## Configuration
45
+
46
+ | Environment Variable | Required | Description |
47
+ |---------------------|----------|-------------|
48
+ | `BIOSTAR_URL` | ✅ | BioStar X server URL (e.g., `https://192.168.1.100`) |
49
+ | `BIOSTAR_USERNAME` | ✅ | Login username |
50
+ | `BIOSTAR_PASSWORD` | ✅ | Login password |
51
+ | `VERIFY_SSL` | ❌ | SSL verification (default: `true`) |
52
+ | `API_TIMEOUT` | ❌ | API timeout in seconds (default: `30`) |
53
+
54
+ ### Changing Credentials
55
+
56
+ 1. Edit `claude_desktop_config.json`
57
+ 2. Update the `env` values
58
+ 3. Restart Claude Desktop
59
+
60
+ ## Available Tools (129+)
61
+
62
+ | Category | Tools | Description |
63
+ |----------|-------|-------------|
64
+ | **auth** | 4 | Login, logout, session management |
65
+ | **users** | 23 | User CRUD, groups, CSV import/export |
66
+ | **doors** | 22 | Door control, groups, APB settings |
67
+ | **access** | 13 | Access groups and levels |
68
+ | **devices** | 38 | Device management, network config |
69
+ | **cards** | 5 | Card creation (CSN, Wiegand, QR) |
70
+ | **events** | 6 | Event search, logs, export |
71
+ | **audit** | 6 | Audit trail tracking |
72
+ | **occupancy** | 2 | Occupancy analysis |
73
+ | **logs** | 5 | Server log analysis |
74
+ | **files** | 1 | File reading (CSV, PDF) |
75
+ | **navigation** | 1 | UI navigation |
76
+ | **help** | 3 | Documentation search |
77
+
78
+ ## Example Usage
79
+
80
+ Once connected to Claude:
81
+
82
+ ```
83
+ "List all users"
84
+ "Create a user named John Smith"
85
+ "Open the main entrance door"
86
+ "Show access events from today"
87
+ "How do I configure anti-passback?"
88
+ ```
89
+
90
+ ## Alternative Installation
91
+
92
+ ### Using pip
93
+
94
+ ```bash
95
+ pip install suprema-biostar-mcp
96
+ suprema-biostar-mcp
97
+ ```
98
+
99
+ ### From source
100
+
101
+ ```bash
102
+ git clone https://github.com/supremainc/suprema-biostar-mcp.git
103
+ cd suprema-biostar-mcp
104
+ pip install -e .
105
+ python -m biostar_x_mcp_server
106
+ ```
107
+
108
+ ## Requirements
109
+
110
+ - Python 3.10+
111
+ - BioStar X server with API access
112
+ - Network connectivity to BioStar server
113
+ - [uv](https://docs.astral.sh/uv/) for `uvx` command (recommended)
114
+
115
+ ## Documentation
116
+
117
+ - **BioStar X Docs**: https://docs.supremainc.com/en/platform/biostar_x
118
+ - **MCP Protocol**: https://modelcontextprotocol.io
119
+
120
+ ## Support
121
+
122
+ - **Suprema Support**: https://www.supremainc.com/support
123
+ - **Documentation**: https://docs.supremainc.com
124
+
125
+ ---
126
+
127
+ Made with ❤️ by [Suprema Inc.](https://www.supremainc.com)
@@ -0,0 +1,25 @@
1
+ """
2
+ BioStar X MCP Server
3
+ Lightweight MCP server for BioStar X integration
4
+
5
+ Features:
6
+ - Full BioStar X API integration (138+ tools)
7
+ - Web-based documentation (no vector DB required)
8
+ - Dynamic tool category loading
9
+ - Session management with auto-refresh
10
+ - Multi-language support (Korean/English)
11
+ """
12
+
13
+ __version__ = "1.0.0"
14
+ __author__ = "Suprema Inc."
15
+
16
+ from .config import Config
17
+ from .session import BioStarSession
18
+ from .tool_manager import ToolManager
19
+
20
+ __all__ = [
21
+ "Config",
22
+ "BioStarSession",
23
+ "ToolManager",
24
+ "__version__"
25
+ ]
@@ -0,0 +1,15 @@
1
+ """
2
+ BioStar X MCP Server - Main Entry Point
3
+ Run with: python -m biostar_x_mcp_server
4
+ """
5
+ import asyncio
6
+ import sys
7
+ from pathlib import Path
8
+
9
+ # Ensure the parent directory is in the path
10
+ sys.path.insert(0, str(Path(__file__).parent.parent))
11
+
12
+ from .server import main
13
+
14
+ if __name__ == "__main__":
15
+ asyncio.run(main())
@@ -0,0 +1,87 @@
1
+ """
2
+ BioStar X MCP Server Configuration
3
+ Lightweight configuration without vector DB dependencies
4
+ """
5
+ import os
6
+ from typing import Optional
7
+ from pydantic import BaseModel, Field
8
+ from dotenv import load_dotenv
9
+
10
+ load_dotenv()
11
+
12
+
13
+ class Config(BaseModel):
14
+ """Configuration for BioStar X MCP Server (Lightweight)."""
15
+
16
+ # BioStar X API settings
17
+ biostar_url: str = Field(
18
+ default_factory=lambda: os.getenv("BIOSTAR_URL", "https://localhost"),
19
+ description="BioStar X server URL"
20
+ )
21
+ biostar_username: str = Field(
22
+ default_factory=lambda: os.getenv("BIOSTAR_USERNAME", ""),
23
+ description="BioStar X username"
24
+ )
25
+ biostar_password: str = Field(
26
+ default_factory=lambda: os.getenv("BIOSTAR_PASSWORD", ""),
27
+ description="BioStar X password"
28
+ )
29
+
30
+ # API settings
31
+ api_timeout: int = Field(
32
+ default_factory=lambda: int(os.getenv("API_TIMEOUT", "30")),
33
+ description="API request timeout in seconds"
34
+ )
35
+ verify_ssl: bool = Field(
36
+ default_factory=lambda: os.getenv("VERIFY_SSL", "true").lower() == "true",
37
+ description="Verify SSL certificates"
38
+ )
39
+
40
+ # Session settings
41
+ session_refresh_interval: int = Field(
42
+ default_factory=lambda: int(os.getenv("SESSION_REFRESH_INTERVAL", "3600")),
43
+ description="Session refresh interval in seconds"
44
+ )
45
+
46
+ # Server settings
47
+ debug: bool = Field(
48
+ default_factory=lambda: os.getenv("DEBUG", "false").lower() == "true",
49
+ description="Enable debug mode"
50
+ )
51
+
52
+ # Tool loading settings
53
+ default_categories: list[str] = Field(
54
+ default=["auth"],
55
+ description="Categories to load by default"
56
+ )
57
+ max_active_categories: int = Field(
58
+ default=15,
59
+ description="Maximum number of active tool categories"
60
+ )
61
+
62
+ # Documentation settings (Web-based help)
63
+ docs_base_url: str = Field(
64
+ default_factory=lambda: os.getenv("DOCS_BASE_URL", "https://docs.supremainc.com"),
65
+ description="Base URL for BioStar X documentation"
66
+ )
67
+ docs_cache_ttl: int = Field(
68
+ default_factory=lambda: int(os.getenv("DOCS_CACHE_TTL", "3600")),
69
+ description="Documentation cache TTL in seconds"
70
+ )
71
+
72
+ class Config:
73
+ env_file = ".env"
74
+ env_file_encoding = "utf-8"
75
+
76
+ def validate_required(self) -> list[str]:
77
+ """Validate required configuration and return list of errors."""
78
+ errors = []
79
+
80
+ if not self.biostar_url:
81
+ errors.append("BIOSTAR_URL is required")
82
+ if not self.biostar_username:
83
+ errors.append("BIOSTAR_USERNAME is required")
84
+ if not self.biostar_password:
85
+ errors.append("BIOSTAR_PASSWORD is required")
86
+
87
+ return errors
@@ -0,0 +1,35 @@
1
+ """
2
+ BioStar X MCP Server Handlers
3
+ All API handlers for BioStar X integration
4
+ """
5
+ from .base_handler import BaseHandler
6
+ from .auth_handler import AuthHandler
7
+ from .user_handler import UserHandler
8
+ from .door_handler import DoorHandler
9
+ from .access_handler import AccessHandler
10
+ from .device_handler import DeviceHandler
11
+ from .event_handler import EventHandler
12
+ from .audit_handler import AuditHandler
13
+ from .card_handler import CardsHandler
14
+ from .navigation_handler import NavigationHandler
15
+ from .file_handler import FileHandler
16
+ from .log_handler import LogHandler
17
+ from .occupancy_handler import OccupancyHandler
18
+ from .help_web_handler import HelpWebHandler
19
+
20
+ __all__ = [
21
+ "BaseHandler",
22
+ "AuthHandler",
23
+ "UserHandler",
24
+ "DoorHandler",
25
+ "AccessHandler",
26
+ "DeviceHandler",
27
+ "EventHandler",
28
+ "AuditHandler",
29
+ "CardsHandler",
30
+ "NavigationHandler",
31
+ "FileHandler",
32
+ "LogHandler",
33
+ "OccupancyHandler",
34
+ "HelpWebHandler"
35
+ ]