iflow-mcp_thirdweb-dev-thirdweb-mcp 0.1.24__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.
- iflow_mcp_thirdweb_dev_thirdweb_mcp-0.1.24/.gitignore +208 -0
- iflow_mcp_thirdweb_dev_thirdweb_mcp-0.1.24/LICENSE +201 -0
- iflow_mcp_thirdweb_dev_thirdweb_mcp-0.1.24/PKG-INFO +184 -0
- iflow_mcp_thirdweb_dev_thirdweb_mcp-0.1.24/README.md +171 -0
- iflow_mcp_thirdweb_dev_thirdweb_mcp-0.1.24/pyproject.toml +53 -0
- iflow_mcp_thirdweb_dev_thirdweb_mcp-0.1.24/src/__init__.py +3 -0
- iflow_mcp_thirdweb_dev_thirdweb_mcp-0.1.24/src/_version.py +1 -0
- iflow_mcp_thirdweb_dev_thirdweb_mcp-0.1.24/src/mcp.py +125 -0
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
.DS_Store
|
|
2
|
+
node_modules
|
|
3
|
+
.turbo
|
|
4
|
+
*.log
|
|
5
|
+
.next
|
|
6
|
+
dist
|
|
7
|
+
dist-ssr
|
|
8
|
+
*.local
|
|
9
|
+
.env
|
|
10
|
+
.cache
|
|
11
|
+
server/dist
|
|
12
|
+
public/dist
|
|
13
|
+
.idea/
|
|
14
|
+
.yalc/
|
|
15
|
+
yalc.lock
|
|
16
|
+
./build/
|
|
17
|
+
playwright-report/
|
|
18
|
+
.env/
|
|
19
|
+
_version.pyi
|
|
20
|
+
_version.py
|
|
21
|
+
|
|
22
|
+
# codecov binary
|
|
23
|
+
codecov
|
|
24
|
+
|
|
25
|
+
# Remove sitemap files (generated at build time)
|
|
26
|
+
sitemap*.xml
|
|
27
|
+
|
|
28
|
+
*storybook.log
|
|
29
|
+
storybook-static
|
|
30
|
+
.aider*
|
|
31
|
+
|
|
32
|
+
tsconfig.tsbuildinfo
|
|
33
|
+
|
|
34
|
+
### python
|
|
35
|
+
# Byte-compiled / optimized / DLL files
|
|
36
|
+
__pycache__/
|
|
37
|
+
*.py[cod]
|
|
38
|
+
*$py.class
|
|
39
|
+
|
|
40
|
+
# C extensions
|
|
41
|
+
*.so
|
|
42
|
+
|
|
43
|
+
# Distribution / packaging
|
|
44
|
+
.Python
|
|
45
|
+
build/
|
|
46
|
+
develop-eggs/
|
|
47
|
+
dist/
|
|
48
|
+
downloads/
|
|
49
|
+
eggs/
|
|
50
|
+
.eggs/
|
|
51
|
+
lib/
|
|
52
|
+
lib64/
|
|
53
|
+
parts/
|
|
54
|
+
sdist/
|
|
55
|
+
var/
|
|
56
|
+
wheels/
|
|
57
|
+
share/python-wheels/
|
|
58
|
+
*.egg-info/
|
|
59
|
+
.installed.cfg
|
|
60
|
+
*.egg
|
|
61
|
+
MANIFEST
|
|
62
|
+
|
|
63
|
+
# PyInstaller
|
|
64
|
+
# Usually these files are written by a python script from a template
|
|
65
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
66
|
+
*.manifest
|
|
67
|
+
*.spec
|
|
68
|
+
|
|
69
|
+
# Installer logs
|
|
70
|
+
pip-log.txt
|
|
71
|
+
pip-delete-this-directory.txt
|
|
72
|
+
|
|
73
|
+
# Unit test / coverage reports
|
|
74
|
+
htmlcov/
|
|
75
|
+
.tox/
|
|
76
|
+
.nox/
|
|
77
|
+
.coverage
|
|
78
|
+
.coverage.*
|
|
79
|
+
.cache
|
|
80
|
+
nosetests.xml
|
|
81
|
+
coverage.xml
|
|
82
|
+
*.cover
|
|
83
|
+
*.py,cover
|
|
84
|
+
.hypothesis/
|
|
85
|
+
.pytest_cache/
|
|
86
|
+
cover/
|
|
87
|
+
|
|
88
|
+
# Translations
|
|
89
|
+
*.mo
|
|
90
|
+
*.pot
|
|
91
|
+
|
|
92
|
+
# Django stuff:
|
|
93
|
+
*.log
|
|
94
|
+
local_settings.py
|
|
95
|
+
db.sqlite3
|
|
96
|
+
db.sqlite3-journal
|
|
97
|
+
|
|
98
|
+
# Flask stuff:
|
|
99
|
+
instance/
|
|
100
|
+
.webassets-cache
|
|
101
|
+
|
|
102
|
+
# Scrapy stuff:
|
|
103
|
+
.scrapy
|
|
104
|
+
|
|
105
|
+
# Sphinx documentation
|
|
106
|
+
docs/_build/
|
|
107
|
+
|
|
108
|
+
# PyBuilder
|
|
109
|
+
.pybuilder/
|
|
110
|
+
target/
|
|
111
|
+
|
|
112
|
+
# Jupyter Notebook
|
|
113
|
+
.ipynb_checkpoints
|
|
114
|
+
|
|
115
|
+
# IPython
|
|
116
|
+
profile_default/
|
|
117
|
+
ipython_config.py
|
|
118
|
+
|
|
119
|
+
# pyenv
|
|
120
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
121
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
122
|
+
# .python-version
|
|
123
|
+
|
|
124
|
+
# pipenv
|
|
125
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
126
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
127
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
128
|
+
# install all needed dependencies.
|
|
129
|
+
#Pipfile.lock
|
|
130
|
+
|
|
131
|
+
# UV
|
|
132
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
133
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
134
|
+
# commonly ignored for libraries.
|
|
135
|
+
#uv.lock
|
|
136
|
+
|
|
137
|
+
# poetry
|
|
138
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
139
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
140
|
+
# commonly ignored for libraries.
|
|
141
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
142
|
+
#poetry.lock
|
|
143
|
+
|
|
144
|
+
# pdm
|
|
145
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
146
|
+
#pdm.lock
|
|
147
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
148
|
+
# in version control.
|
|
149
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
150
|
+
.pdm.toml
|
|
151
|
+
.pdm-python
|
|
152
|
+
.pdm-build/
|
|
153
|
+
|
|
154
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
155
|
+
__pypackages__/
|
|
156
|
+
|
|
157
|
+
# Celery stuff
|
|
158
|
+
celerybeat-schedule
|
|
159
|
+
celerybeat.pid
|
|
160
|
+
|
|
161
|
+
# SageMath parsed files
|
|
162
|
+
*.sage.py
|
|
163
|
+
|
|
164
|
+
# Environments
|
|
165
|
+
.env
|
|
166
|
+
.venv
|
|
167
|
+
env/
|
|
168
|
+
venv/
|
|
169
|
+
ENV/
|
|
170
|
+
env.bak/
|
|
171
|
+
venv.bak/
|
|
172
|
+
|
|
173
|
+
# Spyder project settings
|
|
174
|
+
.spyderproject
|
|
175
|
+
.spyproject
|
|
176
|
+
|
|
177
|
+
# Rope project settings
|
|
178
|
+
.ropeproject
|
|
179
|
+
|
|
180
|
+
# mkdocs documentation
|
|
181
|
+
/site
|
|
182
|
+
|
|
183
|
+
# mypy
|
|
184
|
+
.mypy_cache/
|
|
185
|
+
.dmypy.json
|
|
186
|
+
dmypy.json
|
|
187
|
+
|
|
188
|
+
# Pyre type checker
|
|
189
|
+
.pyre/
|
|
190
|
+
|
|
191
|
+
# pytype static type analyzer
|
|
192
|
+
.pytype/
|
|
193
|
+
|
|
194
|
+
# Cython debug symbols
|
|
195
|
+
cython_debug/
|
|
196
|
+
|
|
197
|
+
# PyCharm
|
|
198
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
199
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
200
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
201
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
202
|
+
#.idea/
|
|
203
|
+
|
|
204
|
+
# Ruff stuff:
|
|
205
|
+
.ruff_cache/
|
|
206
|
+
|
|
207
|
+
# PyPI configuration file
|
|
208
|
+
.pypirc
|
|
@@ -0,0 +1,201 @@
|
|
|
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 reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and 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 Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2021 Non-Fungible Labs, Inc
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: iflow-mcp_thirdweb-dev-thirdweb-mcp
|
|
3
|
+
Version: 0.1.24
|
|
4
|
+
Summary: thirdweb MCP
|
|
5
|
+
Author-email: thirdweb <support@thirdweb.com>
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Python: ~=3.10
|
|
9
|
+
Requires-Dist: click<9,>=8.1.8
|
|
10
|
+
Requires-Dist: mcp<2,>=1.3.0
|
|
11
|
+
Requires-Dist: thirdweb-ai[mcp]==0.1.24
|
|
12
|
+
Description-Content-Type: text/markdown
|
|
13
|
+
|
|
14
|
+
# thirdweb MCP Server
|
|
15
|
+
|
|
16
|
+
A Model Context Protocol (MCP) server implementation for thirdweb services integration. This server allows you to integrate thirdweb's tools with any MCP-compatible client.
|
|
17
|
+
|
|
18
|
+
## Overview
|
|
19
|
+
|
|
20
|
+
thirdweb MCP provides a unified interface to access thirdweb's suite of blockchain tools and services through the standardized Model Context Protocol. It supports multiple communication transports and can be integrated with various thirdweb services:
|
|
21
|
+
|
|
22
|
+
- **Nebula**: Autonomous onchain execution - real-time on-chain analysis, code generation and contract interactions
|
|
23
|
+
- **Insight**: Blockchain data analysis capabilities for real-time on-chain data
|
|
24
|
+
- **Engine**: Integration with thirdweb's backend infrastructure for contract deployments and interactions
|
|
25
|
+
- **EngineCloud**: Cloud-based engine operations for server wallets, contract interactions, and transaction management
|
|
26
|
+
- **Storage**: Decentralized storage capabilities for uploading and retrieving data via IPFS
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
### Prerequisites
|
|
31
|
+
|
|
32
|
+
- Python 3.10 or higher
|
|
33
|
+
- uv
|
|
34
|
+
|
|
35
|
+
### Run with uvx
|
|
36
|
+
```bash
|
|
37
|
+
THIRDWEB_SECRET_KEY=... \
|
|
38
|
+
uvx thirdweb-mcp
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Install and run with pipx
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
pipx install thirdweb-mcp
|
|
45
|
+
|
|
46
|
+
THIRDWEB_SECRET_KEY=... \
|
|
47
|
+
thirdweb-mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Install from source
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
git clone https://github.com/thirdweb-dev/ai.git thirdweb-ai
|
|
54
|
+
cd thirdweb-ai/python/thirdweb-mcp
|
|
55
|
+
uv sync
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
|
|
60
|
+
The thirdweb MCP server requires configuration based on which services you want to enable:
|
|
61
|
+
|
|
62
|
+
1. **thirdweb Secret Key**: Required for Nebula, Insight, Storage, and EngineCloud services. Obtain from the [thirdweb dashboard](https://thirdweb.com/dashboard).
|
|
63
|
+
2. **Chain IDs**: Blockchain network IDs to connect to (e.g., 1 for Ethereum mainnet, 137 for Polygon).
|
|
64
|
+
3. **Engine Configuration**: If using the Engine service, you'll need the Engine URL and authentication JWT.
|
|
65
|
+
4. **EngineCloud Configuration**: For EngineCloud operations, you may need the Vault Access Token for server wallet operations.
|
|
66
|
+
|
|
67
|
+
You can provide these through command-line options or environment variables.
|
|
68
|
+
|
|
69
|
+
## Usage
|
|
70
|
+
|
|
71
|
+
### Command-line options
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
# Basic usage with default settings (stdio transport with Nebula and Insight)
|
|
75
|
+
THIRDWEB_SECRET_KEY=... thirdweb-mcp
|
|
76
|
+
|
|
77
|
+
# Using SSE transport on a custom port
|
|
78
|
+
THIRDWEB_SECRET_KEY=... thirdweb-mcp --transport sse --port 8080
|
|
79
|
+
|
|
80
|
+
# Enabling all services with specific chain IDs
|
|
81
|
+
THIRDWEB_SECRET_KEY=... thirdweb-mcp --chain-id 1 --chain-id 137 \
|
|
82
|
+
--engine-url YOUR_ENGINE_URL \
|
|
83
|
+
--engine-auth-jwt YOUR_ENGINE_JWT \
|
|
84
|
+
--engine-backend-wallet-address YOUR_ENGINE_BACKEND_WALLET_ADDRESS \
|
|
85
|
+
--vault-access-token YOUR_VAULT_ACCESS_TOKEN
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Environment variables
|
|
89
|
+
|
|
90
|
+
You can also configure the MCP server using environment variables:
|
|
91
|
+
|
|
92
|
+
- `THIRDWEB_SECRET_KEY`: Your thirdweb API secret key
|
|
93
|
+
- `THIRDWEB_ENGINE_URL`: URL endpoint for thirdweb Engine service
|
|
94
|
+
- `THIRDWEB_ENGINE_AUTH_JWT`: Authentication JWT token for Engine
|
|
95
|
+
- `THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS`: Wallet address for Engine backend
|
|
96
|
+
- `THIRDWEB_VAULT_ACCESS_TOKEN`: Vault access token for EngineCloud server wallet operations
|
|
97
|
+
|
|
98
|
+
### Integration with Claude Desktop
|
|
99
|
+
To add this MCP server to Claude Desktop:
|
|
100
|
+
|
|
101
|
+
1. Install the MCP: `pipx install thirdweb-mcp`
|
|
102
|
+
|
|
103
|
+
2. Create or edit the Claude Desktop configuration file at:
|
|
104
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
105
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
106
|
+
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
107
|
+
|
|
108
|
+
3. Add the following configuration:
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"mcpServers": {
|
|
113
|
+
"thirdweb-mcp": {
|
|
114
|
+
"command": "thirdweb-mcp",
|
|
115
|
+
"args": [], // add `--chain-id` optionally
|
|
116
|
+
"env": {
|
|
117
|
+
"THIRDWEB_SECRET_KEY": "your thirdweb secret key from dashboard",
|
|
118
|
+
"THIRDWEB_ENGINE_URL": "(OPTIONAL) your engine url",
|
|
119
|
+
"THIRDWEB_ENGINE_AUTH_JWT": "(OPTIONAL) your engine auth jwt",
|
|
120
|
+
"THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS": "(OPTIONAL) your engine backend wallet address",
|
|
121
|
+
"THIRDWEB_VAULT_ACCESS_TOKEN": "(OPTIONAL) your vault access token for EngineCloud"
|
|
122
|
+
},
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
4. Restart Claude Desktop for the changes to take effect.
|
|
129
|
+
|
|
130
|
+
Read more on [MCP Quickstart](https://modelcontextprotocol.io/quickstart/user)
|
|
131
|
+
|
|
132
|
+
### Integration with MCP clients
|
|
133
|
+
|
|
134
|
+
This server can be integrated with any client that supports the Model Context Protocol:
|
|
135
|
+
|
|
136
|
+
1. Run the MCP server with the appropriate configuration
|
|
137
|
+
2. Connect your MCP client to the server using the selected transport (stdio or SSE)
|
|
138
|
+
3. Access thirdweb services through the exposed MCP tools
|
|
139
|
+
|
|
140
|
+
## Available Services
|
|
141
|
+
|
|
142
|
+
### Nebula
|
|
143
|
+
|
|
144
|
+
Autonomous onchain execution and analysis:
|
|
145
|
+
- Analyze smart contract code
|
|
146
|
+
- Contract interactions and deployments
|
|
147
|
+
- Autonomous onchain tasks execution
|
|
148
|
+
|
|
149
|
+
### Insight
|
|
150
|
+
|
|
151
|
+
Offers blockchain data analysis capabilities:
|
|
152
|
+
- Query on-chain data across multiple networks
|
|
153
|
+
- Analyze transactions, blocks, and smart contract events
|
|
154
|
+
- Monitor wallet activities and token movements
|
|
155
|
+
|
|
156
|
+
### Engine
|
|
157
|
+
|
|
158
|
+
Integrates with thirdweb's backend infrastructure:
|
|
159
|
+
- Deploy smart contracts
|
|
160
|
+
- Interact with deployed contracts
|
|
161
|
+
- Manage wallet connections and transactions
|
|
162
|
+
|
|
163
|
+
### EngineCloud
|
|
164
|
+
|
|
165
|
+
Cloud-based engine operations with advanced capabilities:
|
|
166
|
+
- Create and manage server wallets with KMS integration
|
|
167
|
+
- Read from and write to smart contracts
|
|
168
|
+
- Send transactions and query transaction history
|
|
169
|
+
- Check native token balances on various chains
|
|
170
|
+
|
|
171
|
+
### Storage
|
|
172
|
+
|
|
173
|
+
Provides decentralized storage functionality:
|
|
174
|
+
- Upload files, directories, and JSON data to IPFS
|
|
175
|
+
- Retrieve content from IPFS using thirdweb gateway
|
|
176
|
+
- Preserve directory structures when uploading
|
|
177
|
+
|
|
178
|
+
## License
|
|
179
|
+
|
|
180
|
+
[Apache-2.0 License](LICENSE)
|
|
181
|
+
|
|
182
|
+
## Support
|
|
183
|
+
|
|
184
|
+
For questions or support, please contact [support@thirdweb.com](mailto:support@thirdweb.com) or visit [thirdweb.com](https://thirdweb.com).
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
# thirdweb MCP Server
|
|
2
|
+
|
|
3
|
+
A Model Context Protocol (MCP) server implementation for thirdweb services integration. This server allows you to integrate thirdweb's tools with any MCP-compatible client.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
thirdweb MCP provides a unified interface to access thirdweb's suite of blockchain tools and services through the standardized Model Context Protocol. It supports multiple communication transports and can be integrated with various thirdweb services:
|
|
8
|
+
|
|
9
|
+
- **Nebula**: Autonomous onchain execution - real-time on-chain analysis, code generation and contract interactions
|
|
10
|
+
- **Insight**: Blockchain data analysis capabilities for real-time on-chain data
|
|
11
|
+
- **Engine**: Integration with thirdweb's backend infrastructure for contract deployments and interactions
|
|
12
|
+
- **EngineCloud**: Cloud-based engine operations for server wallets, contract interactions, and transaction management
|
|
13
|
+
- **Storage**: Decentralized storage capabilities for uploading and retrieving data via IPFS
|
|
14
|
+
|
|
15
|
+
## Installation
|
|
16
|
+
|
|
17
|
+
### Prerequisites
|
|
18
|
+
|
|
19
|
+
- Python 3.10 or higher
|
|
20
|
+
- uv
|
|
21
|
+
|
|
22
|
+
### Run with uvx
|
|
23
|
+
```bash
|
|
24
|
+
THIRDWEB_SECRET_KEY=... \
|
|
25
|
+
uvx thirdweb-mcp
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Install and run with pipx
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pipx install thirdweb-mcp
|
|
32
|
+
|
|
33
|
+
THIRDWEB_SECRET_KEY=... \
|
|
34
|
+
thirdweb-mcp
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Install from source
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
git clone https://github.com/thirdweb-dev/ai.git thirdweb-ai
|
|
41
|
+
cd thirdweb-ai/python/thirdweb-mcp
|
|
42
|
+
uv sync
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
The thirdweb MCP server requires configuration based on which services you want to enable:
|
|
48
|
+
|
|
49
|
+
1. **thirdweb Secret Key**: Required for Nebula, Insight, Storage, and EngineCloud services. Obtain from the [thirdweb dashboard](https://thirdweb.com/dashboard).
|
|
50
|
+
2. **Chain IDs**: Blockchain network IDs to connect to (e.g., 1 for Ethereum mainnet, 137 for Polygon).
|
|
51
|
+
3. **Engine Configuration**: If using the Engine service, you'll need the Engine URL and authentication JWT.
|
|
52
|
+
4. **EngineCloud Configuration**: For EngineCloud operations, you may need the Vault Access Token for server wallet operations.
|
|
53
|
+
|
|
54
|
+
You can provide these through command-line options or environment variables.
|
|
55
|
+
|
|
56
|
+
## Usage
|
|
57
|
+
|
|
58
|
+
### Command-line options
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Basic usage with default settings (stdio transport with Nebula and Insight)
|
|
62
|
+
THIRDWEB_SECRET_KEY=... thirdweb-mcp
|
|
63
|
+
|
|
64
|
+
# Using SSE transport on a custom port
|
|
65
|
+
THIRDWEB_SECRET_KEY=... thirdweb-mcp --transport sse --port 8080
|
|
66
|
+
|
|
67
|
+
# Enabling all services with specific chain IDs
|
|
68
|
+
THIRDWEB_SECRET_KEY=... thirdweb-mcp --chain-id 1 --chain-id 137 \
|
|
69
|
+
--engine-url YOUR_ENGINE_URL \
|
|
70
|
+
--engine-auth-jwt YOUR_ENGINE_JWT \
|
|
71
|
+
--engine-backend-wallet-address YOUR_ENGINE_BACKEND_WALLET_ADDRESS \
|
|
72
|
+
--vault-access-token YOUR_VAULT_ACCESS_TOKEN
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Environment variables
|
|
76
|
+
|
|
77
|
+
You can also configure the MCP server using environment variables:
|
|
78
|
+
|
|
79
|
+
- `THIRDWEB_SECRET_KEY`: Your thirdweb API secret key
|
|
80
|
+
- `THIRDWEB_ENGINE_URL`: URL endpoint for thirdweb Engine service
|
|
81
|
+
- `THIRDWEB_ENGINE_AUTH_JWT`: Authentication JWT token for Engine
|
|
82
|
+
- `THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS`: Wallet address for Engine backend
|
|
83
|
+
- `THIRDWEB_VAULT_ACCESS_TOKEN`: Vault access token for EngineCloud server wallet operations
|
|
84
|
+
|
|
85
|
+
### Integration with Claude Desktop
|
|
86
|
+
To add this MCP server to Claude Desktop:
|
|
87
|
+
|
|
88
|
+
1. Install the MCP: `pipx install thirdweb-mcp`
|
|
89
|
+
|
|
90
|
+
2. Create or edit the Claude Desktop configuration file at:
|
|
91
|
+
- macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
92
|
+
- Windows: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
93
|
+
- Linux: `~/.config/Claude/claude_desktop_config.json`
|
|
94
|
+
|
|
95
|
+
3. Add the following configuration:
|
|
96
|
+
|
|
97
|
+
```json
|
|
98
|
+
{
|
|
99
|
+
"mcpServers": {
|
|
100
|
+
"thirdweb-mcp": {
|
|
101
|
+
"command": "thirdweb-mcp",
|
|
102
|
+
"args": [], // add `--chain-id` optionally
|
|
103
|
+
"env": {
|
|
104
|
+
"THIRDWEB_SECRET_KEY": "your thirdweb secret key from dashboard",
|
|
105
|
+
"THIRDWEB_ENGINE_URL": "(OPTIONAL) your engine url",
|
|
106
|
+
"THIRDWEB_ENGINE_AUTH_JWT": "(OPTIONAL) your engine auth jwt",
|
|
107
|
+
"THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS": "(OPTIONAL) your engine backend wallet address",
|
|
108
|
+
"THIRDWEB_VAULT_ACCESS_TOKEN": "(OPTIONAL) your vault access token for EngineCloud"
|
|
109
|
+
},
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
4. Restart Claude Desktop for the changes to take effect.
|
|
116
|
+
|
|
117
|
+
Read more on [MCP Quickstart](https://modelcontextprotocol.io/quickstart/user)
|
|
118
|
+
|
|
119
|
+
### Integration with MCP clients
|
|
120
|
+
|
|
121
|
+
This server can be integrated with any client that supports the Model Context Protocol:
|
|
122
|
+
|
|
123
|
+
1. Run the MCP server with the appropriate configuration
|
|
124
|
+
2. Connect your MCP client to the server using the selected transport (stdio or SSE)
|
|
125
|
+
3. Access thirdweb services through the exposed MCP tools
|
|
126
|
+
|
|
127
|
+
## Available Services
|
|
128
|
+
|
|
129
|
+
### Nebula
|
|
130
|
+
|
|
131
|
+
Autonomous onchain execution and analysis:
|
|
132
|
+
- Analyze smart contract code
|
|
133
|
+
- Contract interactions and deployments
|
|
134
|
+
- Autonomous onchain tasks execution
|
|
135
|
+
|
|
136
|
+
### Insight
|
|
137
|
+
|
|
138
|
+
Offers blockchain data analysis capabilities:
|
|
139
|
+
- Query on-chain data across multiple networks
|
|
140
|
+
- Analyze transactions, blocks, and smart contract events
|
|
141
|
+
- Monitor wallet activities and token movements
|
|
142
|
+
|
|
143
|
+
### Engine
|
|
144
|
+
|
|
145
|
+
Integrates with thirdweb's backend infrastructure:
|
|
146
|
+
- Deploy smart contracts
|
|
147
|
+
- Interact with deployed contracts
|
|
148
|
+
- Manage wallet connections and transactions
|
|
149
|
+
|
|
150
|
+
### EngineCloud
|
|
151
|
+
|
|
152
|
+
Cloud-based engine operations with advanced capabilities:
|
|
153
|
+
- Create and manage server wallets with KMS integration
|
|
154
|
+
- Read from and write to smart contracts
|
|
155
|
+
- Send transactions and query transaction history
|
|
156
|
+
- Check native token balances on various chains
|
|
157
|
+
|
|
158
|
+
### Storage
|
|
159
|
+
|
|
160
|
+
Provides decentralized storage functionality:
|
|
161
|
+
- Upload files, directories, and JSON data to IPFS
|
|
162
|
+
- Retrieve content from IPFS using thirdweb gateway
|
|
163
|
+
- Preserve directory structures when uploading
|
|
164
|
+
|
|
165
|
+
## License
|
|
166
|
+
|
|
167
|
+
[Apache-2.0 License](LICENSE)
|
|
168
|
+
|
|
169
|
+
## Support
|
|
170
|
+
|
|
171
|
+
For questions or support, please contact [support@thirdweb.com](mailto:support@thirdweb.com) or visit [thirdweb.com](https://thirdweb.com).
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "iflow-mcp_thirdweb-dev-thirdweb-mcp"
|
|
3
|
+
dynamic = ["version", "dependencies"]
|
|
4
|
+
description = "thirdweb MCP"
|
|
5
|
+
authors = [{ name = "thirdweb", email = "support@thirdweb.com" }]
|
|
6
|
+
requires-python = "~=3.10"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
license = "Apache-2.0"
|
|
9
|
+
|
|
10
|
+
[project.scripts]
|
|
11
|
+
iflow-mcp_thirdweb-dev-thirdweb-mcp = "src.mcp:main"
|
|
12
|
+
|
|
13
|
+
[dependency-groups]
|
|
14
|
+
dev = [
|
|
15
|
+
"ruff>=0.9.10,<0.10",
|
|
16
|
+
"pyright>=1.1.396,<2",
|
|
17
|
+
"thirdweb-ai[mcp]",
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[tool.hatch.build.targets.sdist]
|
|
21
|
+
include = ["src"]
|
|
22
|
+
|
|
23
|
+
[tool.hatch.build.targets.wheel]
|
|
24
|
+
include = ["src"]
|
|
25
|
+
|
|
26
|
+
[build-system]
|
|
27
|
+
requires = ["hatchling", "uv-dynamic-versioning"]
|
|
28
|
+
build-backend = "hatchling.build"
|
|
29
|
+
|
|
30
|
+
[tool.hatch.version]
|
|
31
|
+
source = "uv-dynamic-versioning"
|
|
32
|
+
|
|
33
|
+
[tool.hatch.build.hooks.version]
|
|
34
|
+
path = "src/_version.py"
|
|
35
|
+
template = '''
|
|
36
|
+
version = "{version}"
|
|
37
|
+
'''
|
|
38
|
+
|
|
39
|
+
[tool.hatch.metadata.hooks.uv-dynamic-versioning]
|
|
40
|
+
dependencies = [
|
|
41
|
+
"mcp>=1.3.0,<2",
|
|
42
|
+
"click>=8.1.8,<9",
|
|
43
|
+
"thirdweb-ai[mcp]=={{ version }}",
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
[tool.uv-dynamic-versioning]
|
|
47
|
+
vcs = "git"
|
|
48
|
+
style = "semver"
|
|
49
|
+
format = "{base}"
|
|
50
|
+
dev_mode = "env:THIRDWEB_DEV_MODE"
|
|
51
|
+
|
|
52
|
+
[tool.uv.sources]
|
|
53
|
+
# thirdweb-ai = { workspace = true }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
version = "0.1.24"
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import os
|
|
2
|
+
from typing import Literal
|
|
3
|
+
|
|
4
|
+
import click
|
|
5
|
+
from thirdweb_ai import Engine, EngineCloud, Insight, Nebula, Storage
|
|
6
|
+
from thirdweb_ai.adapters.mcp import add_fastmcp_tools
|
|
7
|
+
|
|
8
|
+
from mcp.server.fastmcp import FastMCP
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@click.command()
|
|
12
|
+
@click.option(
|
|
13
|
+
"--transport",
|
|
14
|
+
type=click.Choice(["stdio", "sse"]),
|
|
15
|
+
default="stdio",
|
|
16
|
+
help="Communication protocol for the MCP server. Use 'stdio' for standard input/output (default, suitable for CLI integrations) or 'sse' for Server-Sent Events (web-based applications).",
|
|
17
|
+
)
|
|
18
|
+
@click.option(
|
|
19
|
+
"-p",
|
|
20
|
+
"--port",
|
|
21
|
+
type=int,
|
|
22
|
+
default=8000,
|
|
23
|
+
help="Port number for the MCP SSE server when using the 'sse' transport. Only relevant when transport is set to 'sse'. Default is 8000.",
|
|
24
|
+
)
|
|
25
|
+
@click.option(
|
|
26
|
+
"-k",
|
|
27
|
+
"--secret-key",
|
|
28
|
+
type=str,
|
|
29
|
+
default=lambda: os.getenv("THIRDWEB_SECRET_KEY"),
|
|
30
|
+
help="Your thirdweb API secret key for authentication. Required for nebula, insight, and storage services. Can be obtained from the thirdweb dashboard. Falls back to THIRDWEB_SECRET_KEY environment variable if not specified.",
|
|
31
|
+
)
|
|
32
|
+
@click.option(
|
|
33
|
+
"--chain-id",
|
|
34
|
+
type=int,
|
|
35
|
+
multiple=True,
|
|
36
|
+
required=False,
|
|
37
|
+
default=lambda: os.getenv("THIRDWEB_CHAIN_ID"),
|
|
38
|
+
help="Blockchain network IDs to connect to (e.g., 1 for Ethereum mainnet, 137 for Polygon). Multiple chain IDs can be specified to support cross-chain operations. Required for insight when querying blockchain data.",
|
|
39
|
+
)
|
|
40
|
+
@click.option(
|
|
41
|
+
"--engine-url",
|
|
42
|
+
type=str,
|
|
43
|
+
default=lambda: os.getenv("THIRDWEB_ENGINE_URL"),
|
|
44
|
+
help="URL endpoint for thirdweb Engine service. Required when the 'engine' service is enabled. Falls back to THIRDWEB_ENGINE_URL environment variable if not specified.",
|
|
45
|
+
)
|
|
46
|
+
@click.option(
|
|
47
|
+
"--engine-auth-jwt",
|
|
48
|
+
type=str,
|
|
49
|
+
default=lambda: os.getenv("THIRDWEB_ENGINE_AUTH_JWT"),
|
|
50
|
+
help="Authentication JWT token for accessing thirdweb Engine service. Required when the 'engine' service is enabled. Falls back to THIRDWEB_ENGINE_AUTH_JWT environment variable if not specified.",
|
|
51
|
+
)
|
|
52
|
+
@click.option(
|
|
53
|
+
"--engine-backend-wallet-address",
|
|
54
|
+
type=str,
|
|
55
|
+
default=lambda: os.getenv("THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS"),
|
|
56
|
+
help="Wallet address used by the Engine backend for transactions. Optional for the 'engine' service. Falls back to THIRDWEB_ENGINE_BACKEND_WALLET_ADDRESS environment variable if not specified.",
|
|
57
|
+
)
|
|
58
|
+
@click.option(
|
|
59
|
+
"--vault-access-token",
|
|
60
|
+
type=str,
|
|
61
|
+
default=lambda: os.getenv("THIRDWEB_VAULT_ACCESS_TOKEN"),
|
|
62
|
+
help="Access token for the vault service, required for certain EngineCloud operations like creating server wallets. Falls back to THIRDWEB_VAULT_ACCESS_TOKEN environment variable if not specified.",
|
|
63
|
+
)
|
|
64
|
+
def main(
|
|
65
|
+
port: int,
|
|
66
|
+
transport: Literal["stdio", "sse"],
|
|
67
|
+
secret_key: str,
|
|
68
|
+
chain_id: list[int],
|
|
69
|
+
engine_url: str,
|
|
70
|
+
engine_auth_jwt: str,
|
|
71
|
+
engine_backend_wallet_address: str | None,
|
|
72
|
+
vault_access_token: str | None,
|
|
73
|
+
):
|
|
74
|
+
mcp = FastMCP("thirdweb MCP", port=port)
|
|
75
|
+
|
|
76
|
+
chain_ids = [int(chain_id) for chain_id in chain_id]
|
|
77
|
+
|
|
78
|
+
# determine which services to enable based on the provided options
|
|
79
|
+
services = []
|
|
80
|
+
if secret_key:
|
|
81
|
+
services.extend(["nebula", "insight", "storage", "engine_cloud"])
|
|
82
|
+
|
|
83
|
+
if engine_url and engine_auth_jwt:
|
|
84
|
+
services.append("engine")
|
|
85
|
+
|
|
86
|
+
if not services:
|
|
87
|
+
raise ValueError(
|
|
88
|
+
"Please provide a thirdweb secret key through the THIRDWEB_SECRET_KEY environment variable."
|
|
89
|
+
)
|
|
90
|
+
|
|
91
|
+
# enable the tools for each service
|
|
92
|
+
if "nebula" in services:
|
|
93
|
+
nebula = Nebula(secret_key=secret_key)
|
|
94
|
+
add_fastmcp_tools(mcp, nebula.get_tools())
|
|
95
|
+
|
|
96
|
+
if "insight" in services:
|
|
97
|
+
insight = Insight(secret_key=secret_key, chain_id=chain_ids)
|
|
98
|
+
add_fastmcp_tools(mcp, insight.get_tools())
|
|
99
|
+
|
|
100
|
+
if "storage" in services:
|
|
101
|
+
storage = Storage(secret_key=secret_key)
|
|
102
|
+
add_fastmcp_tools(mcp, storage.get_tools())
|
|
103
|
+
|
|
104
|
+
if "engine" in services:
|
|
105
|
+
engine = Engine(
|
|
106
|
+
engine_url=engine_url,
|
|
107
|
+
engine_auth_jwt=engine_auth_jwt,
|
|
108
|
+
backend_wallet_address=engine_backend_wallet_address,
|
|
109
|
+
chain_id=next(iter(chain_ids)) if chain_ids else None,
|
|
110
|
+
secret_key=secret_key or "",
|
|
111
|
+
)
|
|
112
|
+
add_fastmcp_tools(mcp, engine.get_tools())
|
|
113
|
+
|
|
114
|
+
if "engine_cloud" in services:
|
|
115
|
+
engine_cloud = EngineCloud(
|
|
116
|
+
secret_key=secret_key,
|
|
117
|
+
vault_access_token=vault_access_token or "",
|
|
118
|
+
)
|
|
119
|
+
add_fastmcp_tools(mcp, engine_cloud.get_tools())
|
|
120
|
+
|
|
121
|
+
mcp.run(transport)
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
if __name__ == "__main__":
|
|
125
|
+
main()
|