lightbulb-mcp 0.4.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.
- lightbulb_mcp-0.4.0/.gitignore +161 -0
- lightbulb_mcp-0.4.0/LICENSE +190 -0
- lightbulb_mcp-0.4.0/MCP.md +125 -0
- lightbulb_mcp-0.4.0/PKG-INFO +230 -0
- lightbulb_mcp-0.4.0/README.md +200 -0
- lightbulb_mcp-0.4.0/lightbulb/__init__.py +67 -0
- lightbulb_mcp-0.4.0/lightbulb/__main__.py +4 -0
- lightbulb_mcp-0.4.0/lightbulb/_version.py +3 -0
- lightbulb_mcp-0.4.0/lightbulb/async_client.py +566 -0
- lightbulb_mcp-0.4.0/lightbulb/auth.py +657 -0
- lightbulb_mcp-0.4.0/lightbulb/cli.py +328 -0
- lightbulb_mcp-0.4.0/lightbulb/client.py +2617 -0
- lightbulb_mcp-0.4.0/lightbulb/connectors.py +283 -0
- lightbulb_mcp-0.4.0/lightbulb/errors.py +190 -0
- lightbulb_mcp-0.4.0/lightbulb/mcp_server.py +3135 -0
- lightbulb_mcp-0.4.0/lightbulb/py.typed +0 -0
- lightbulb_mcp-0.4.0/lightbulb/setup.py +700 -0
- lightbulb_mcp-0.4.0/lightbulb/stripe.py +261 -0
- lightbulb_mcp-0.4.0/lightbulb/token_cache.py +181 -0
- lightbulb_mcp-0.4.0/lightbulb/tools/__init__.py +1 -0
- lightbulb_mcp-0.4.0/lightbulb/validators.py +166 -0
- lightbulb_mcp-0.4.0/lightbulb/xero.py +182 -0
- lightbulb_mcp-0.4.0/pyproject.toml +52 -0
- lightbulb_mcp-0.4.0/tests/__init__.py +0 -0
- lightbulb_mcp-0.4.0/tests/test_async_client.py +327 -0
- lightbulb_mcp-0.4.0/tests/test_auth.py +442 -0
- lightbulb_mcp-0.4.0/tests/test_cli.py +300 -0
- lightbulb_mcp-0.4.0/tests/test_client.py +339 -0
- lightbulb_mcp-0.4.0/tests/test_coding_workspace_integration_smoke.py +326 -0
- lightbulb_mcp-0.4.0/tests/test_connectors.py +271 -0
- lightbulb_mcp-0.4.0/tests/test_device_flow.py +227 -0
- lightbulb_mcp-0.4.0/tests/test_integration_smoke.py +130 -0
- lightbulb_mcp-0.4.0/tests/test_mcp_server.py +301 -0
- lightbulb_mcp-0.4.0/tests/test_security.py +597 -0
- lightbulb_mcp-0.4.0/tests/test_setup.py +392 -0
- lightbulb_mcp-0.4.0/tests/test_streaming.py +195 -0
- lightbulb_mcp-0.4.0/tests/test_stripe.py +146 -0
- lightbulb_mcp-0.4.0/tests/test_workspace_ops.py +210 -0
- lightbulb_mcp-0.4.0/tests/test_xero.py +147 -0
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Java
|
|
2
|
+
*.class
|
|
3
|
+
*.log
|
|
4
|
+
*.jar
|
|
5
|
+
*.war
|
|
6
|
+
*.ear
|
|
7
|
+
target/
|
|
8
|
+
.mvn/
|
|
9
|
+
mvnw
|
|
10
|
+
mvnw.cmd
|
|
11
|
+
.m2/
|
|
12
|
+
data/
|
|
13
|
+
# Node
|
|
14
|
+
node_modules/
|
|
15
|
+
npm-debug.log*
|
|
16
|
+
yarn-debug.log*
|
|
17
|
+
yarn-error.log*
|
|
18
|
+
dist/
|
|
19
|
+
build/
|
|
20
|
+
.vite/
|
|
21
|
+
|
|
22
|
+
# Python
|
|
23
|
+
__pycache__/
|
|
24
|
+
*.py[cod]
|
|
25
|
+
*$py.class
|
|
26
|
+
*.so
|
|
27
|
+
.Python
|
|
28
|
+
env/
|
|
29
|
+
venv/
|
|
30
|
+
ENV/
|
|
31
|
+
.venv
|
|
32
|
+
*.egg-info/
|
|
33
|
+
dist/
|
|
34
|
+
build/
|
|
35
|
+
|
|
36
|
+
# IDE
|
|
37
|
+
.idea/
|
|
38
|
+
.vscode/
|
|
39
|
+
.cursor/
|
|
40
|
+
*.swp
|
|
41
|
+
*.swo
|
|
42
|
+
*~
|
|
43
|
+
.DS_Store
|
|
44
|
+
|
|
45
|
+
# Environment
|
|
46
|
+
.env
|
|
47
|
+
.env.local
|
|
48
|
+
.env.production
|
|
49
|
+
.restart-cache/
|
|
50
|
+
|
|
51
|
+
# Database
|
|
52
|
+
*.db
|
|
53
|
+
*.sqlite
|
|
54
|
+
|
|
55
|
+
# Hugging Face models cache
|
|
56
|
+
models/
|
|
57
|
+
*.bin
|
|
58
|
+
*.safetensors
|
|
59
|
+
!fastapi-microservice/models/
|
|
60
|
+
!fastapi-microservice/models/*.py
|
|
61
|
+
!voice-gateway/app/models/
|
|
62
|
+
!voice-gateway/app/models/*.py
|
|
63
|
+
!memory-service/app/models/
|
|
64
|
+
!memory-service/app/models/*.py
|
|
65
|
+
|
|
66
|
+
# Local dev uploads
|
|
67
|
+
rag-service/assets/uploads/
|
|
68
|
+
springboot-server/assets/
|
|
69
|
+
|
|
70
|
+
# Local artifacts and ledgers
|
|
71
|
+
/artifacts/
|
|
72
|
+
agent-workers/artifacts/artifact-*.json
|
|
73
|
+
agent-workers/artifacts/autocompany-ops/
|
|
74
|
+
agent-workers/artifacts/*-sys-*.json
|
|
75
|
+
agent-workers/artifacts/reqspec-*.json
|
|
76
|
+
agent-workers/artifacts/slo-spec-*.json
|
|
77
|
+
agent-workers/artifacts/threat-model-*.json
|
|
78
|
+
agent-workers/artifacts/production_eval_smoke_*.json
|
|
79
|
+
!react-frontend/src/components/artifacts/
|
|
80
|
+
system_ledger/
|
|
81
|
+
ledger/
|
|
82
|
+
*.db-wal
|
|
83
|
+
# Python virtual environments
|
|
84
|
+
venv/
|
|
85
|
+
env/
|
|
86
|
+
ENV/
|
|
87
|
+
.venv/
|
|
88
|
+
fastapi-microservice/venv/
|
|
89
|
+
fastapi-microservice/.venv/
|
|
90
|
+
*.pdf
|
|
91
|
+
.venv_meta/
|
|
92
|
+
.venv-test/
|
|
93
|
+
|
|
94
|
+
login.json
|
|
95
|
+
# Windows reserved device names
|
|
96
|
+
nul
|
|
97
|
+
NUL
|
|
98
|
+
# Code graph / local DB artifacts
|
|
99
|
+
.codegraph/
|
|
100
|
+
**/*.db
|
|
101
|
+
**/*.db-wal
|
|
102
|
+
**/*.db-shm
|
|
103
|
+
**/*.sqlite
|
|
104
|
+
**/*.sqlite-wal
|
|
105
|
+
**/*.sqlite-shm
|
|
106
|
+
*.pkl
|
|
107
|
+
tokenizer.json
|
|
108
|
+
|
|
109
|
+
# AWS / deployment secrets
|
|
110
|
+
*.pem
|
|
111
|
+
.env.production
|
|
112
|
+
.env.backup.*
|
|
113
|
+
.access-credentials
|
|
114
|
+
aws-credentials*
|
|
115
|
+
|
|
116
|
+
# Deployment artifacts
|
|
117
|
+
storage/
|
|
118
|
+
/backups/
|
|
119
|
+
adapters/sft-merged-*/
|
|
120
|
+
adapters/opsd-*/
|
|
121
|
+
|
|
122
|
+
# Local scratch / API test captures
|
|
123
|
+
tmp/
|
|
124
|
+
qa-artifacts/
|
|
125
|
+
.tmp.cookies*.txt
|
|
126
|
+
.tmp_*
|
|
127
|
+
.npm-cache/
|
|
128
|
+
*_cookies.txt
|
|
129
|
+
tmp-*.json
|
|
130
|
+
DOCUMENTS-UI.png
|
|
131
|
+
documents_page_idea.png
|
|
132
|
+
tmp_*
|
|
133
|
+
assets/uploads/document-intake/
|
|
134
|
+
assets/uploads/ocr/
|
|
135
|
+
ocr-service/assets/uploads/ocr/
|
|
136
|
+
automl-service/temp_data/*.csv
|
|
137
|
+
gepa_outputs_e2e/
|
|
138
|
+
.codex-prompts/
|
|
139
|
+
codex-scripts/
|
|
140
|
+
|
|
141
|
+
# Security — local credentials and MCP configs must never be committed
|
|
142
|
+
.claude/settings.local.json
|
|
143
|
+
.mcp.json
|
|
144
|
+
tiklog.txt
|
|
145
|
+
.bootstrap-admin-credentials
|
|
146
|
+
springboot-server/cp-user.txt
|
|
147
|
+
tmp-*
|
|
148
|
+
react-frontend/tmp-*
|
|
149
|
+
tmp-playwright-artifacts/
|
|
150
|
+
react-frontend/test-results/
|
|
151
|
+
.tmp/
|
|
152
|
+
|
|
153
|
+
# Local Google Cloud / ADC setup for OCR development
|
|
154
|
+
.tools/google-cloud-cli.tar.gz
|
|
155
|
+
.tools/google-cloud-sdk/
|
|
156
|
+
.tools/gcloud-config/
|
|
157
|
+
.tools/gcloud-pydeps/
|
|
158
|
+
.tools/gcloud-venv/
|
|
159
|
+
|
|
160
|
+
# local backups taken before destructive ops
|
|
161
|
+
.backups/
|
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Support. While redistributing the Work or
|
|
166
|
+
Derivative Works thereof, You may choose to offer, and charge a
|
|
167
|
+
fee for, acceptance of support, warranty, indemnity, or other
|
|
168
|
+
liability obligations and/or rights consistent with this License.
|
|
169
|
+
However, in accepting such obligations, You may act only on Your
|
|
170
|
+
own behalf and on Your sole responsibility, not on behalf of any
|
|
171
|
+
other Contributor, and only if You agree to indemnify, defend, and
|
|
172
|
+
hold each Contributor harmless for any liability incurred by, or
|
|
173
|
+
claims asserted against, such Contributor by reason of your
|
|
174
|
+
accepting any such warranty or support.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Lightbulb Partners
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# Lightbulb MCP server
|
|
2
|
+
|
|
3
|
+
The MCP server exposes the Lightbulb platform as tools for AI hosts (Claude Code, Codex CLI, Cursor, etc.). Every call runs as the **authenticated user** through Spring Boot: tenant isolation, company isolation, RBAC, and rate limits match the web app—there is no elevated “MCP service role.”
|
|
4
|
+
|
|
5
|
+
Companion CLI documentation: [README.md](README.md).
|
|
6
|
+
|
|
7
|
+
## Run
|
|
8
|
+
|
|
9
|
+
After `pip install lightbulb-mcp`:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
lightbulb-mcp
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Equivalent:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
python -m lightbulb.mcp_server
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The host should spawn this command with **stdio** transport (default MCP). Example `.mcp.json` fragment:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"lightbulb": {
|
|
27
|
+
"command": "lightbulb-mcp",
|
|
28
|
+
"env": {
|
|
29
|
+
"LIGHTBULB_URL": "https://agents.lightbulbpartners.com"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Use `command` + `args` if `lightbulb-mcp` is not on `PATH`:
|
|
37
|
+
|
|
38
|
+
```json
|
|
39
|
+
"command": "python",
|
|
40
|
+
"args": ["-m", "lightbulb.mcp_server"]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Authentication
|
|
44
|
+
|
|
45
|
+
The server resolves credentials in an order similar to the CLI:
|
|
46
|
+
|
|
47
|
+
1. **`LIGHTBULB_JWT`** + **`LIGHTBULB_TENANT_ID`** (optional `LIGHTBULB_COMPANY_ID`) — e.g. token from a browser session.
|
|
48
|
+
2. **`LIGHTBULB_API_KEY`** + **`LIGHTBULB_TENANT_ID`** + **`LIGHTBULB_USER_ID`** — localhost / integration bootstrap.
|
|
49
|
+
3. **Cached device-flow token** under `~/.lightbulb/tokens/` (shared with `lightbulb` CLI).
|
|
50
|
+
4. **`LIGHTBULB_EMAIL`** + **`LIGHTBULB_PASSWORD`** — password login at startup (users with MFA must use device flow or JWT).
|
|
51
|
+
|
|
52
|
+
| Variable | Purpose |
|
|
53
|
+
|----------|---------|
|
|
54
|
+
| `LIGHTBULB_URL` | Platform URL (default `https://agents.lightbulbpartners.com`) |
|
|
55
|
+
| `LIGHTBULB_JWT` | Bearer JWT |
|
|
56
|
+
| `LIGHTBULB_TENANT_ID` | Tenant UUID (required with JWT) |
|
|
57
|
+
| `LIGHTBULB_COMPANY_ID` | Optional company scope |
|
|
58
|
+
| `LIGHTBULB_EMAIL` / `LIGHTBULB_PASSWORD` | Startup login (avoid for MFA-only accounts) |
|
|
59
|
+
| `LIGHTBULB_API_KEY` / `LIGHTBULB_USER_ID` | Local integration |
|
|
60
|
+
|
|
61
|
+
**HTTPS:** For non-loopback hostnames the SDK enforces HTTPS on the HTTP client unless the URL is explicitly local (`localhost`, `127.0.0.1`, etc.—parsed by hostname, not substring).
|
|
62
|
+
|
|
63
|
+
## Behaviour & scope
|
|
64
|
+
|
|
65
|
+
- **RBAC:** Tools map to platform endpoints the user is allowed to call; denied actions surface as errors (typically permission / validation), not silent success.
|
|
66
|
+
- **Company context:** Instructions remind admin users to select company when required (same as product behaviour).
|
|
67
|
+
- **Rate limits:** Platform rate limits apply per user/session like normal API usage.
|
|
68
|
+
- **Retries:** The MCP layer may retry on behalf of the host where documented in code (e.g. auth refresh paths); tools themselves do not bypass server-side throttling.
|
|
69
|
+
|
|
70
|
+
## Tool surface
|
|
71
|
+
|
|
72
|
+
The server registers a large set of tools (on the order of **150+**): domain `dispatch_domain_agent`, documents, page/document builders, code workspaces, voice/HITL, AOC, HR live, RAG, connectors (`invoke_tool`), CRM tasks, memory graph, approvals, notifications, domain workspace helpers, Xero/Stripe-oriented flows where exposed, etc.
|
|
73
|
+
|
|
74
|
+
Domain names and actions should follow `agent-workers/agents/domain_registry.py` on the platform; the MCP system prompt summarizes common domains.
|
|
75
|
+
|
|
76
|
+
### Software delivery loop tools
|
|
77
|
+
|
|
78
|
+
Claude Code, Codex, Cursor, and other MCP hosts can use these tools as the
|
|
79
|
+
preferred bridge into Lightbulb's software/user-feedback/deployment loop:
|
|
80
|
+
|
|
81
|
+
- `software_delivery_context` — read the current IT/Ops, coding workspace,
|
|
82
|
+
GitHub/Jira/Slack/Notion, memory, approval, CloudOps, and deployment context
|
|
83
|
+
before editing code.
|
|
84
|
+
- `software_delivery_loop` — route a user-feedback or engineering request into
|
|
85
|
+
the governed loop: SDLC context, CodingAgent, repo binding, PR, container
|
|
86
|
+
release, CloudOps, deployment gates, and HITL.
|
|
87
|
+
- `software_spot_weld_fix` — request a bounded urgent code/prod/cloud fix. It
|
|
88
|
+
defaults to preview mode, opens a PR, keeps deploy disabled, and marks
|
|
89
|
+
production/cloud work as approval-gated.
|
|
90
|
+
|
|
91
|
+
The MCP layer does not grant elevated privileges. All three tools run as the
|
|
92
|
+
authenticated user and rely on the same tenant/company/RBAC and approval gates
|
|
93
|
+
as the web application.
|
|
94
|
+
|
|
95
|
+
## Troubleshooting
|
|
96
|
+
|
|
97
|
+
| Symptom | Things to check |
|
|
98
|
+
|---------|------------------|
|
|
99
|
+
| **401 / AuthenticationError** | JWT expired → run `lightbulb setup` or refresh env JWT; MFA users should prefer device flow / cached token / JWT, not raw password. |
|
|
100
|
+
| **403** | Missing RBAC permission for that endpoint; confirm role in admin UI. |
|
|
101
|
+
| **HTTPS errors** | Use `https://` for production hosts; for local dev use `http://localhost:...`. |
|
|
102
|
+
| **Module not found (`mcp`)** | Reinstall: `pip install --upgrade lightbulb-mcp`. |
|
|
103
|
+
| **Stale config** | `lightbulb` / `lightbulb setup` status shows whether MCP entries exist for each host editor. |
|
|
104
|
+
|
|
105
|
+
## Security posture (MCP)
|
|
106
|
+
|
|
107
|
+
- Secrets live in **host env** or OS token cache—never commit `.mcp.json` with passwords or JWTs.
|
|
108
|
+
- Token cache files are user-private and written atomically (see SDK README).
|
|
109
|
+
- Error paths avoid echoing full HTTP bodies to logs/tracebacks where the SDK controls messaging.
|
|
110
|
+
|
|
111
|
+
## Version history (MCP-facing)
|
|
112
|
+
|
|
113
|
+
### 0.4.0
|
|
114
|
+
|
|
115
|
+
- Same transport and env vars; underlying HTTP client aligns with SDK security fixes (URLs, localhost detection, error sanitization).
|
|
116
|
+
- Tool count and names unchanged from 0.3.x series unless platform endpoints moved (regenerate from server package when upgrading).
|
|
117
|
+
|
|
118
|
+
### 0.3.0
|
|
119
|
+
|
|
120
|
+
- Major expansion of tool families (voice, HR live, code workspace collaboration/runtimes, AOC, memory graph, CRM tasks, approvals, notifications, domain workspaces, Xero helpers, page/document automation, etc.).
|
|
121
|
+
- `lightbulb-mcp` console script added for portable configs.
|
|
122
|
+
|
|
123
|
+
### 0.2.0
|
|
124
|
+
|
|
125
|
+
- Broad domain registry alignment and Xero-oriented tooling alongside existing Stripe/workflows surface.
|