summitai-mcp 0.1.0__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.
@@ -0,0 +1,31 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.so
5
+ .Python
6
+ build/
7
+ dist/
8
+ *.egg-info/
9
+ .eggs/
10
+ *.egg
11
+ .venv/
12
+ venv/
13
+ ENV/
14
+ env/
15
+ .env
16
+ .env.*
17
+ !.env.example
18
+ *.log
19
+ .pytest_cache/
20
+ .mypy_cache/
21
+ .ruff_cache/
22
+ .coverage
23
+ htmlcov/
24
+ .tox/
25
+ .nox/
26
+ .idea/
27
+ .vscode/
28
+ *.swp
29
+ *.swo
30
+ *.DS_Store
31
+ Thumbs.db
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ All notable changes to `summitai-mcp` will be documented in this file.
4
+
5
+ ## [0.1.0] — 2026-09-03
6
+
7
+ ### Added
8
+ - Initial release
9
+ - **Incident Management**: create, update (all statuses), get, list
10
+ - **Service Request**: create, update, get, list, get catalog, approve, get by user
11
+ - **CMDB**: create/update CI, get CI, link relations, get master data
12
+ - **Problem Management**: create/update, get problem record
13
+ - **Change Management**: create/update, get change record
14
+ - **Work Orders**: create (for IM and SR), get details
15
+ - **Attachments**: upload via base64
16
+ - **Users**: search, create/update user master
17
+ - Dual auth: APIKEY (recommended) and Username/Password (legacy)
18
+ - stdio transport for Claude Desktop, Cursor, and Antigravity compatibility
19
+ - Full env-var configuration (SUMMITAI_BASE_URL, SUMMITAI_API_KEY, etc.)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Symphony Team
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,228 @@
1
+ Metadata-Version: 2.5
2
+ Name: summitai-mcp
3
+ Version: 0.1.0
4
+ Summary: MCP server for SymphonyAI SummitAI/Apex ITSM platform — Incident, Service Request, CMDB, Problem, Change, Work Order, Attachments, and User management
5
+ Project-URL: Homepage, https://github.com/your-org/summitai-mcp
6
+ Project-URL: Documentation, https://github.com/your-org/summitai-mcp#readme
7
+ Project-URL: Bug Tracker, https://github.com/your-org/summitai-mcp/issues
8
+ Author: Symphony Team
9
+ License: MIT
10
+ License-File: LICENSE
11
+ Keywords: apex,cmdb,incident-management,itsm,mcp,service-request,summitai,symphonyai
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: System Administrators
15
+ Classifier: License :: OSI Approved :: MIT License
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 :: Software Development :: Libraries :: Python Modules
21
+ Classifier: Topic :: System :: Systems Administration
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: httpx>=0.27.0
24
+ Requires-Dist: mcp<2.0.0,>=1.0.0
25
+ Requires-Dist: pydantic-settings>=2.0.0
26
+ Requires-Dist: pydantic>=2.0.0
27
+ Description-Content-Type: text/markdown
28
+
29
+ # summitai-mcp
30
+
31
+ **MCP Server for SymphonyAI SummitAI/Apex ITSM**
32
+
33
+ Connect any MCP-compatible AI assistant (Claude, Cursor, Antigravity, etc.) directly to your SymphonyAI SummitAI instance. Create tickets, search records, manage CIs, approve requests — all through natural language.
34
+
35
+ ---
36
+
37
+ ## Quick Start
38
+
39
+ ### Option 1: Run directly with uvx (no install needed)
40
+ ```json
41
+ {
42
+ "mcpServers": {
43
+ "summitai": {
44
+ "command": "uvx",
45
+ "args": ["summitai-mcp"],
46
+ "env": {
47
+ "SUMMITAI_BASE_URL": "https://your-instance.symphonysummit.com",
48
+ "SUMMITAI_API_KEY": "your-api-key-here"
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ### Option 2: Install then run
56
+ ```bash
57
+ pip install summitai-mcp
58
+ summitai-mcp
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Configuration (Environment Variables)
64
+
65
+ | Variable | Required | Description |
66
+ |---|---|---|
67
+ | `SUMMITAI_BASE_URL` | ✅ Yes | Your SummitAI instance URL, e.g. `https://yourcompany.symphonysummit.com` |
68
+ | `SUMMITAI_API_KEY` | ✅ Recommended | API key from **Admin → Users → [your user] → Access tab → Login Type = API Key** |
69
+ | `SUMMITAI_USERNAME` | Alt | Username — use if API key not available |
70
+ | `SUMMITAI_PASSWORD` | Alt | Password — paired with USERNAME |
71
+ | `SUMMITAI_ORG_ID` | No | Tenant/Org ID (default: `1`) |
72
+ | `SUMMITAI_PROXY_ID` | No | Proxy ID (default: `0`) |
73
+ | `SUMMITAI_LOG_LEVEL` | No | `DEBUG`, `INFO`, `WARNING` (default: `WARNING`) |
74
+
75
+ > **Note**: Set `SUMMITAI_API_KEY` **or** both `SUMMITAI_USERNAME` + `SUMMITAI_PASSWORD`. API Key is the recommended auth method since SummitAI Sierra HF01+.
76
+
77
+ ---
78
+
79
+ ## Tools Reference
80
+
81
+ ### 🔴 Incident Management
82
+ | Tool | Description |
83
+ |---|---|
84
+ | `create_incident` | Log a new Incident (New status) |
85
+ | `update_incident` | Update status, assign, resolve, or close an Incident |
86
+ | `get_incident` | Get full Incident details + change history |
87
+ | `list_incidents` | Search/filter Incidents by status, workgroup, date range |
88
+
89
+ ### 🟡 Service Request
90
+ | Tool | Description |
91
+ |---|---|
92
+ | `create_service_request` | Create SR from a Service Catalog item |
93
+ | `update_service_request` | Update SR status, assignment, or remarks |
94
+ | `get_service_request` | Get SR details + change history |
95
+ | `list_service_requests` | Search/filter SRs |
96
+ | `get_service_catalog` | Get catalog item details and custom fields |
97
+ | `approve_service_request` | Approve or reject an SR |
98
+ | `get_my_service_requests` | Get all SRs for a specific user |
99
+
100
+ ### 🟢 CMDB
101
+ | Tool | Description |
102
+ |---|---|
103
+ | `create_or_update_ci` | Create or update a Configuration Item |
104
+ | `get_ci` | Search and retrieve CI details |
105
+ | `link_ci_relation` | Create relationships between CIs |
106
+ | `get_cmdb_masters` | Get CI types, statuses, locations lookup data |
107
+
108
+ ### 🟠 Problem Management
109
+ | Tool | Description |
110
+ |---|---|
111
+ | `create_or_update_problem` | Create or update a Problem Record |
112
+ | `get_problem` | Get Problem Record details |
113
+
114
+ ### 🔵 Change Management
115
+ | Tool | Description |
116
+ |---|---|
117
+ | `create_or_update_change` | Create or update a Change Record |
118
+ | `get_change_record` | Get Change Record details |
119
+
120
+ ### ⚙️ Work Orders
121
+ | Tool | Description |
122
+ |---|---|
123
+ | `create_work_order` | Create a Work Order for an IM or SR ticket |
124
+ | `get_work_order` | Get Work Order details |
125
+
126
+ ### 📎 Attachments
127
+ | Tool | Description |
128
+ |---|---|
129
+ | `upload_attachment` | Attach a file (base64) to any ITSM record |
130
+
131
+ ### 👤 Users & Admin
132
+ | Tool | Description |
133
+ |---|---|
134
+ | `search_users` | Search users by email, employee ID, or name |
135
+ | `create_or_update_user` | Create or update a user account |
136
+
137
+ ---
138
+
139
+ ## Setup for Claude Desktop
140
+
141
+ Edit `%APPDATA%\Claude\claude_desktop_config.json`:
142
+
143
+ ```json
144
+ {
145
+ "mcpServers": {
146
+ "summitai": {
147
+ "command": "uvx",
148
+ "args": ["summitai-mcp"],
149
+ "env": {
150
+ "SUMMITAI_BASE_URL": "https://your-instance.symphonysummit.com",
151
+ "SUMMITAI_API_KEY": "your-api-key"
152
+ }
153
+ }
154
+ }
155
+ }
156
+ ```
157
+
158
+ ## Setup for Antigravity (AGY)
159
+
160
+ Edit your MCP config:
161
+
162
+ ```json
163
+ {
164
+ "mcpServers": {
165
+ "summitai": {
166
+ "command": "uvx",
167
+ "args": ["summitai-mcp"],
168
+ "env": {
169
+ "SUMMITAI_BASE_URL": "https://your-instance.symphonysummit.com",
170
+ "SUMMITAI_API_KEY": "your-api-key"
171
+ }
172
+ }
173
+ }
174
+ }
175
+ ```
176
+
177
+ ---
178
+
179
+ ## How to Get Your API Key
180
+
181
+ 1. Log into your SummitAI/Apex instance as Admin
182
+ 2. Go to **Admin → Basic → Users**
183
+ 3. Find your user → click **Access** tab
184
+ 4. Set **Login Type** to **API Key**
185
+ 5. Copy the generated key
186
+
187
+ ---
188
+
189
+ ## API Reference
190
+
191
+ All tools connect to the single SummitAI REST endpoint:
192
+ ```
193
+ POST {SUMMITAI_BASE_URL}/REST/Summit_RESTWCF.svc/RESTService/CommonWS_JsonObjCall
194
+ ```
195
+
196
+ Each tool sets the `ServiceName` field to route to the correct operation. Authentication is injected automatically from your environment variables.
197
+
198
+ ---
199
+
200
+ ## Development
201
+
202
+ ```bash
203
+ # Clone and install dev dependencies
204
+ git clone https://github.com/your-org/summitai-mcp
205
+ cd summitai-mcp
206
+ uv sync
207
+
208
+ # Test with MCP Inspector (visual tool tester)
209
+ uv run mcp dev src/summitai_mcp/server.py
210
+
211
+ # Run tests
212
+ uv run pytest tests/
213
+ ```
214
+
215
+ ---
216
+
217
+ ## Publishing to PyPI
218
+
219
+ ```bash
220
+ uv build
221
+ uvx twine upload dist/*
222
+ ```
223
+
224
+ ---
225
+
226
+ ## License
227
+
228
+ MIT
@@ -0,0 +1,200 @@
1
+ # summitai-mcp
2
+
3
+ **MCP Server for SymphonyAI SummitAI/Apex ITSM**
4
+
5
+ Connect any MCP-compatible AI assistant (Claude, Cursor, Antigravity, etc.) directly to your SymphonyAI SummitAI instance. Create tickets, search records, manage CIs, approve requests — all through natural language.
6
+
7
+ ---
8
+
9
+ ## Quick Start
10
+
11
+ ### Option 1: Run directly with uvx (no install needed)
12
+ ```json
13
+ {
14
+ "mcpServers": {
15
+ "summitai": {
16
+ "command": "uvx",
17
+ "args": ["summitai-mcp"],
18
+ "env": {
19
+ "SUMMITAI_BASE_URL": "https://your-instance.symphonysummit.com",
20
+ "SUMMITAI_API_KEY": "your-api-key-here"
21
+ }
22
+ }
23
+ }
24
+ }
25
+ ```
26
+
27
+ ### Option 2: Install then run
28
+ ```bash
29
+ pip install summitai-mcp
30
+ summitai-mcp
31
+ ```
32
+
33
+ ---
34
+
35
+ ## Configuration (Environment Variables)
36
+
37
+ | Variable | Required | Description |
38
+ |---|---|---|
39
+ | `SUMMITAI_BASE_URL` | ✅ Yes | Your SummitAI instance URL, e.g. `https://yourcompany.symphonysummit.com` |
40
+ | `SUMMITAI_API_KEY` | ✅ Recommended | API key from **Admin → Users → [your user] → Access tab → Login Type = API Key** |
41
+ | `SUMMITAI_USERNAME` | Alt | Username — use if API key not available |
42
+ | `SUMMITAI_PASSWORD` | Alt | Password — paired with USERNAME |
43
+ | `SUMMITAI_ORG_ID` | No | Tenant/Org ID (default: `1`) |
44
+ | `SUMMITAI_PROXY_ID` | No | Proxy ID (default: `0`) |
45
+ | `SUMMITAI_LOG_LEVEL` | No | `DEBUG`, `INFO`, `WARNING` (default: `WARNING`) |
46
+
47
+ > **Note**: Set `SUMMITAI_API_KEY` **or** both `SUMMITAI_USERNAME` + `SUMMITAI_PASSWORD`. API Key is the recommended auth method since SummitAI Sierra HF01+.
48
+
49
+ ---
50
+
51
+ ## Tools Reference
52
+
53
+ ### 🔴 Incident Management
54
+ | Tool | Description |
55
+ |---|---|
56
+ | `create_incident` | Log a new Incident (New status) |
57
+ | `update_incident` | Update status, assign, resolve, or close an Incident |
58
+ | `get_incident` | Get full Incident details + change history |
59
+ | `list_incidents` | Search/filter Incidents by status, workgroup, date range |
60
+
61
+ ### 🟡 Service Request
62
+ | Tool | Description |
63
+ |---|---|
64
+ | `create_service_request` | Create SR from a Service Catalog item |
65
+ | `update_service_request` | Update SR status, assignment, or remarks |
66
+ | `get_service_request` | Get SR details + change history |
67
+ | `list_service_requests` | Search/filter SRs |
68
+ | `get_service_catalog` | Get catalog item details and custom fields |
69
+ | `approve_service_request` | Approve or reject an SR |
70
+ | `get_my_service_requests` | Get all SRs for a specific user |
71
+
72
+ ### 🟢 CMDB
73
+ | Tool | Description |
74
+ |---|---|
75
+ | `create_or_update_ci` | Create or update a Configuration Item |
76
+ | `get_ci` | Search and retrieve CI details |
77
+ | `link_ci_relation` | Create relationships between CIs |
78
+ | `get_cmdb_masters` | Get CI types, statuses, locations lookup data |
79
+
80
+ ### 🟠 Problem Management
81
+ | Tool | Description |
82
+ |---|---|
83
+ | `create_or_update_problem` | Create or update a Problem Record |
84
+ | `get_problem` | Get Problem Record details |
85
+
86
+ ### 🔵 Change Management
87
+ | Tool | Description |
88
+ |---|---|
89
+ | `create_or_update_change` | Create or update a Change Record |
90
+ | `get_change_record` | Get Change Record details |
91
+
92
+ ### ⚙️ Work Orders
93
+ | Tool | Description |
94
+ |---|---|
95
+ | `create_work_order` | Create a Work Order for an IM or SR ticket |
96
+ | `get_work_order` | Get Work Order details |
97
+
98
+ ### 📎 Attachments
99
+ | Tool | Description |
100
+ |---|---|
101
+ | `upload_attachment` | Attach a file (base64) to any ITSM record |
102
+
103
+ ### 👤 Users & Admin
104
+ | Tool | Description |
105
+ |---|---|
106
+ | `search_users` | Search users by email, employee ID, or name |
107
+ | `create_or_update_user` | Create or update a user account |
108
+
109
+ ---
110
+
111
+ ## Setup for Claude Desktop
112
+
113
+ Edit `%APPDATA%\Claude\claude_desktop_config.json`:
114
+
115
+ ```json
116
+ {
117
+ "mcpServers": {
118
+ "summitai": {
119
+ "command": "uvx",
120
+ "args": ["summitai-mcp"],
121
+ "env": {
122
+ "SUMMITAI_BASE_URL": "https://your-instance.symphonysummit.com",
123
+ "SUMMITAI_API_KEY": "your-api-key"
124
+ }
125
+ }
126
+ }
127
+ }
128
+ ```
129
+
130
+ ## Setup for Antigravity (AGY)
131
+
132
+ Edit your MCP config:
133
+
134
+ ```json
135
+ {
136
+ "mcpServers": {
137
+ "summitai": {
138
+ "command": "uvx",
139
+ "args": ["summitai-mcp"],
140
+ "env": {
141
+ "SUMMITAI_BASE_URL": "https://your-instance.symphonysummit.com",
142
+ "SUMMITAI_API_KEY": "your-api-key"
143
+ }
144
+ }
145
+ }
146
+ }
147
+ ```
148
+
149
+ ---
150
+
151
+ ## How to Get Your API Key
152
+
153
+ 1. Log into your SummitAI/Apex instance as Admin
154
+ 2. Go to **Admin → Basic → Users**
155
+ 3. Find your user → click **Access** tab
156
+ 4. Set **Login Type** to **API Key**
157
+ 5. Copy the generated key
158
+
159
+ ---
160
+
161
+ ## API Reference
162
+
163
+ All tools connect to the single SummitAI REST endpoint:
164
+ ```
165
+ POST {SUMMITAI_BASE_URL}/REST/Summit_RESTWCF.svc/RESTService/CommonWS_JsonObjCall
166
+ ```
167
+
168
+ Each tool sets the `ServiceName` field to route to the correct operation. Authentication is injected automatically from your environment variables.
169
+
170
+ ---
171
+
172
+ ## Development
173
+
174
+ ```bash
175
+ # Clone and install dev dependencies
176
+ git clone https://github.com/your-org/summitai-mcp
177
+ cd summitai-mcp
178
+ uv sync
179
+
180
+ # Test with MCP Inspector (visual tool tester)
181
+ uv run mcp dev src/summitai_mcp/server.py
182
+
183
+ # Run tests
184
+ uv run pytest tests/
185
+ ```
186
+
187
+ ---
188
+
189
+ ## Publishing to PyPI
190
+
191
+ ```bash
192
+ uv build
193
+ uvx twine upload dist/*
194
+ ```
195
+
196
+ ---
197
+
198
+ ## License
199
+
200
+ MIT
@@ -0,0 +1,52 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "summitai-mcp"
7
+ version = "0.1.0"
8
+ description = "MCP server for SymphonyAI SummitAI/Apex ITSM platform — Incident, Service Request, CMDB, Problem, Change, Work Order, Attachments, and User management"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [
13
+ { name = "Symphony Team" },
14
+ ]
15
+ keywords = ["mcp", "symphonyai", "summitai", "itsm", "apex", "incident-management", "service-request", "cmdb"]
16
+ classifiers = [
17
+ "Development Status :: 4 - Beta",
18
+ "Intended Audience :: Developers",
19
+ "Intended Audience :: System Administrators",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Topic :: System :: Systems Administration",
26
+ "Topic :: Software Development :: Libraries :: Python Modules",
27
+ ]
28
+ dependencies = [
29
+ "mcp>=1.0.0,<2.0.0",
30
+ "httpx>=0.27.0",
31
+ "pydantic>=2.0.0",
32
+ "pydantic-settings>=2.0.0",
33
+ ]
34
+
35
+ [project.scripts]
36
+ summitai-mcp = "summitai_mcp.__main__:main"
37
+
38
+ [project.urls]
39
+ Homepage = "https://github.com/your-org/summitai-mcp"
40
+ Documentation = "https://github.com/your-org/summitai-mcp#readme"
41
+ "Bug Tracker" = "https://github.com/your-org/summitai-mcp/issues"
42
+
43
+ [tool.hatch.build.targets.wheel]
44
+ packages = ["src/summitai_mcp"]
45
+
46
+ [tool.hatch.build.targets.sdist]
47
+ include = [
48
+ "src/",
49
+ "README.md",
50
+ "CHANGELOG.md",
51
+ "LICENSE",
52
+ ]
@@ -0,0 +1,6 @@
1
+ """SummitAI MCP Server — SymphonyAI ITSM integration for AI assistants."""
2
+
3
+ __version__ = "0.1.0"
4
+ __all__ = ["create_server"]
5
+
6
+ from .server import create_server
@@ -0,0 +1,103 @@
1
+ """
2
+ SummitAI MCP Server — entry point.
3
+
4
+ Reads configuration from environment variables and launches the MCP server
5
+ over stdio transport (compatible with Claude Desktop, Cursor, Antigravity, etc.)
6
+
7
+ Environment variables:
8
+ SUMMITAI_BASE_URL (required) Base URL of your SummitAI instance
9
+ e.g. https://your-company.symphonysummit.com
10
+ SUMMITAI_API_KEY (recommended) API key from Admin > Users > Access tab
11
+ SUMMITAI_USERNAME (legacy) Username — use if API key not available
12
+ SUMMITAI_PASSWORD (legacy) Password — paired with SUMMITAI_USERNAME
13
+ SUMMITAI_ORG_ID Org/Tenant ID (default: 1)
14
+ SUMMITAI_PROXY_ID Proxy ID (default: 0)
15
+ SUMMITAI_LOG_LEVEL Logging level: DEBUG, INFO, WARNING (default: WARNING)
16
+ """
17
+ from __future__ import annotations
18
+
19
+ import asyncio
20
+ import logging
21
+ import os
22
+ import sys
23
+
24
+
25
+ def _configure_logging() -> None:
26
+ """Configure logging to stderr only (stdout is reserved for MCP stdio)."""
27
+ level = os.environ.get("SUMMITAI_LOG_LEVEL", "WARNING").upper()
28
+ logging.basicConfig(
29
+ stream=sys.stderr,
30
+ level=getattr(logging, level, logging.WARNING),
31
+ format="%(asctime)s [%(levelname)s] %(name)s: %(message)s",
32
+ )
33
+
34
+
35
+ def main() -> None:
36
+ """Entry point for uvx / pip-installed CLI invocation."""
37
+ _configure_logging()
38
+
39
+ mock_mode = os.environ.get("SUMMITAI_MOCK", "").strip().lower() in ("true", "1", "yes")
40
+
41
+ if mock_mode:
42
+ print(
43
+ "⚠️ MOCK MODE ENABLED (SUMMITAI_MOCK=true)\n"
44
+ " All responses are fake. Set a real SUMMITAI_API_KEY to connect to live data.",
45
+ file=sys.stderr,
46
+ )
47
+ from .mock_client import MockSummitAIClient
48
+ from .server import create_server
49
+ client = MockSummitAIClient()
50
+ mcp = create_server(client)
51
+ mcp.run(transport="stdio")
52
+ return
53
+
54
+ # Validate required config before importing heavy deps
55
+ base_url = os.environ.get("SUMMITAI_BASE_URL", "").strip()
56
+ api_key = os.environ.get("SUMMITAI_API_KEY", "").strip() or None
57
+ username = os.environ.get("SUMMITAI_USERNAME", "").strip() or None
58
+ password = os.environ.get("SUMMITAI_PASSWORD", "").strip() or None
59
+ org_id = int(os.environ.get("SUMMITAI_ORG_ID", "1"))
60
+ proxy_id = int(os.environ.get("SUMMITAI_PROXY_ID", "0"))
61
+
62
+ if not base_url:
63
+ print(
64
+ "ERROR: SUMMITAI_BASE_URL environment variable is required.\n"
65
+ "Example: export SUMMITAI_BASE_URL=https://your-instance.symphonysummit.com\n\n"
66
+ "Tip: Run in mock/demo mode (no API key needed):\n"
67
+ " set SUMMITAI_MOCK=true",
68
+ file=sys.stderr,
69
+ )
70
+ sys.exit(1)
71
+
72
+ if not api_key and not (username and password):
73
+ print(
74
+ "ERROR: Authentication required.\n"
75
+ "Set SUMMITAI_API_KEY (recommended), OR both SUMMITAI_USERNAME and SUMMITAI_PASSWORD.\n\n"
76
+ "Tip: Run in mock/demo mode (no API key needed):\n"
77
+ " set SUMMITAI_MOCK=true",
78
+ file=sys.stderr,
79
+ )
80
+ sys.exit(1)
81
+
82
+ # Import here so errors above show cleanly
83
+ from .client import SummitAIClient
84
+ from .server import create_server
85
+
86
+ client = SummitAIClient(
87
+ base_url=base_url,
88
+ api_key=api_key,
89
+ username=username,
90
+ password=password,
91
+ org_id=org_id,
92
+ proxy_id=proxy_id,
93
+ )
94
+
95
+ mcp = create_server(client)
96
+
97
+ # Run with stdio transport (the MCP standard for local AI tools)
98
+ mcp.run(transport="stdio")
99
+
100
+
101
+
102
+ if __name__ == "__main__":
103
+ main()