suprema-biostar-mcp 1.0.1__py3-none-any.whl

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 (61) hide show
  1. biostar_x_mcp_server/__init__.py +25 -0
  2. biostar_x_mcp_server/__main__.py +15 -0
  3. biostar_x_mcp_server/config.py +87 -0
  4. biostar_x_mcp_server/handlers/__init__.py +35 -0
  5. biostar_x_mcp_server/handlers/access_handler.py +2162 -0
  6. biostar_x_mcp_server/handlers/audit_handler.py +489 -0
  7. biostar_x_mcp_server/handlers/auth_handler.py +216 -0
  8. biostar_x_mcp_server/handlers/base_handler.py +228 -0
  9. biostar_x_mcp_server/handlers/card_handler.py +746 -0
  10. biostar_x_mcp_server/handlers/device_handler.py +4344 -0
  11. biostar_x_mcp_server/handlers/door_handler.py +3969 -0
  12. biostar_x_mcp_server/handlers/event_handler.py +1331 -0
  13. biostar_x_mcp_server/handlers/file_handler.py +212 -0
  14. biostar_x_mcp_server/handlers/help_web_handler.py +379 -0
  15. biostar_x_mcp_server/handlers/log_handler.py +1051 -0
  16. biostar_x_mcp_server/handlers/navigation_handler.py +109 -0
  17. biostar_x_mcp_server/handlers/occupancy_handler.py +541 -0
  18. biostar_x_mcp_server/handlers/user_handler.py +3568 -0
  19. biostar_x_mcp_server/schemas/__init__.py +21 -0
  20. biostar_x_mcp_server/schemas/access.py +158 -0
  21. biostar_x_mcp_server/schemas/audit.py +73 -0
  22. biostar_x_mcp_server/schemas/auth.py +24 -0
  23. biostar_x_mcp_server/schemas/cards.py +128 -0
  24. biostar_x_mcp_server/schemas/devices.py +496 -0
  25. biostar_x_mcp_server/schemas/doors.py +306 -0
  26. biostar_x_mcp_server/schemas/events.py +104 -0
  27. biostar_x_mcp_server/schemas/files.py +7 -0
  28. biostar_x_mcp_server/schemas/help.py +29 -0
  29. biostar_x_mcp_server/schemas/logs.py +33 -0
  30. biostar_x_mcp_server/schemas/occupancy.py +19 -0
  31. biostar_x_mcp_server/schemas/tool_response.py +29 -0
  32. biostar_x_mcp_server/schemas/users.py +166 -0
  33. biostar_x_mcp_server/server.py +335 -0
  34. biostar_x_mcp_server/session.py +221 -0
  35. biostar_x_mcp_server/tool_manager.py +172 -0
  36. biostar_x_mcp_server/tools/__init__.py +45 -0
  37. biostar_x_mcp_server/tools/access.py +510 -0
  38. biostar_x_mcp_server/tools/audit.py +227 -0
  39. biostar_x_mcp_server/tools/auth.py +59 -0
  40. biostar_x_mcp_server/tools/cards.py +269 -0
  41. biostar_x_mcp_server/tools/categories.py +197 -0
  42. biostar_x_mcp_server/tools/devices.py +1552 -0
  43. biostar_x_mcp_server/tools/doors.py +865 -0
  44. biostar_x_mcp_server/tools/events.py +305 -0
  45. biostar_x_mcp_server/tools/files.py +28 -0
  46. biostar_x_mcp_server/tools/help.py +80 -0
  47. biostar_x_mcp_server/tools/logs.py +123 -0
  48. biostar_x_mcp_server/tools/navigation.py +89 -0
  49. biostar_x_mcp_server/tools/occupancy.py +91 -0
  50. biostar_x_mcp_server/tools/users.py +1113 -0
  51. biostar_x_mcp_server/utils/__init__.py +31 -0
  52. biostar_x_mcp_server/utils/category_mapper.py +206 -0
  53. biostar_x_mcp_server/utils/decorators.py +101 -0
  54. biostar_x_mcp_server/utils/language_detector.py +51 -0
  55. biostar_x_mcp_server/utils/search.py +42 -0
  56. biostar_x_mcp_server/utils/timezone.py +122 -0
  57. suprema_biostar_mcp-1.0.1.dist-info/METADATA +163 -0
  58. suprema_biostar_mcp-1.0.1.dist-info/RECORD +61 -0
  59. suprema_biostar_mcp-1.0.1.dist-info/WHEEL +4 -0
  60. suprema_biostar_mcp-1.0.1.dist-info/entry_points.txt +2 -0
  61. suprema_biostar_mcp-1.0.1.dist-info/licenses/LICENSE +21 -0
@@ -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
+ ]