@bluehive/sdk-mcp 0.1.0-alpha.2
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.
- package/LICENSE +201 -0
- package/README.md +188 -0
- package/compat.d.mts +56 -0
- package/compat.d.mts.map +1 -0
- package/compat.d.ts +56 -0
- package/compat.d.ts.map +1 -0
- package/compat.js +382 -0
- package/compat.js.map +1 -0
- package/compat.mjs +373 -0
- package/compat.mjs.map +1 -0
- package/dynamic-tools.d.mts +12 -0
- package/dynamic-tools.d.mts.map +1 -0
- package/dynamic-tools.d.ts +12 -0
- package/dynamic-tools.d.ts.map +1 -0
- package/dynamic-tools.js +135 -0
- package/dynamic-tools.js.map +1 -0
- package/dynamic-tools.mjs +132 -0
- package/dynamic-tools.mjs.map +1 -0
- package/index.d.mts +3 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +86 -0
- package/index.js.map +1 -0
- package/index.mjs +84 -0
- package/index.mjs.map +1 -0
- package/options.d.mts +14 -0
- package/options.d.mts.map +1 -0
- package/options.d.ts +14 -0
- package/options.d.ts.map +1 -0
- package/options.js +296 -0
- package/options.js.map +1 -0
- package/options.mjs +290 -0
- package/options.mjs.map +1 -0
- package/package.json +121 -0
- package/server.d.mts +47 -0
- package/server.d.mts.map +1 -0
- package/server.d.ts +47 -0
- package/server.d.ts.map +1 -0
- package/server.js +114 -0
- package/server.js.map +1 -0
- package/server.mjs +101 -0
- package/server.mjs.map +1 -0
- package/src/compat.ts +478 -0
- package/src/dynamic-tools.ts +153 -0
- package/src/index.ts +104 -0
- package/src/options.ts +319 -0
- package/src/server.ts +145 -0
- package/src/tools/database/check-health-database.ts +31 -0
- package/src/tools/fax/list-providers-fax.ts +31 -0
- package/src/tools/fax/retrieve-status-fax.ts +36 -0
- package/src/tools/fax/send-fax.ts +76 -0
- package/src/tools/health/check-health.ts +31 -0
- package/src/tools/index.ts +83 -0
- package/src/tools/providers/lookup-providers.ts +49 -0
- package/src/tools/types.ts +103 -0
- package/src/tools/version/retrieve-version.ts +31 -0
- package/src/tools.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/tools/database/check-health-database.d.mts +45 -0
- package/tools/database/check-health-database.d.mts.map +1 -0
- package/tools/database/check-health-database.d.ts +45 -0
- package/tools/database/check-health-database.d.ts.map +1 -0
- package/tools/database/check-health-database.js +27 -0
- package/tools/database/check-health-database.js.map +1 -0
- package/tools/database/check-health-database.mjs +23 -0
- package/tools/database/check-health-database.mjs.map +1 -0
- package/tools/fax/list-providers-fax.d.mts +45 -0
- package/tools/fax/list-providers-fax.d.mts.map +1 -0
- package/tools/fax/list-providers-fax.d.ts +45 -0
- package/tools/fax/list-providers-fax.d.ts.map +1 -0
- package/tools/fax/list-providers-fax.js +27 -0
- package/tools/fax/list-providers-fax.js.map +1 -0
- package/tools/fax/list-providers-fax.mjs +23 -0
- package/tools/fax/list-providers-fax.mjs.map +1 -0
- package/tools/fax/retrieve-status-fax.d.mts +45 -0
- package/tools/fax/retrieve-status-fax.d.mts.map +1 -0
- package/tools/fax/retrieve-status-fax.d.ts +45 -0
- package/tools/fax/retrieve-status-fax.d.ts.map +1 -0
- package/tools/fax/retrieve-status-fax.js +32 -0
- package/tools/fax/retrieve-status-fax.js.map +1 -0
- package/tools/fax/retrieve-status-fax.mjs +28 -0
- package/tools/fax/retrieve-status-fax.mjs.map +1 -0
- package/tools/fax/send-fax.d.mts +45 -0
- package/tools/fax/send-fax.d.mts.map +1 -0
- package/tools/fax/send-fax.d.ts +45 -0
- package/tools/fax/send-fax.d.ts.map +1 -0
- package/tools/fax/send-fax.js +72 -0
- package/tools/fax/send-fax.js.map +1 -0
- package/tools/fax/send-fax.mjs +68 -0
- package/tools/fax/send-fax.mjs.map +1 -0
- package/tools/health/check-health.d.mts +45 -0
- package/tools/health/check-health.d.mts.map +1 -0
- package/tools/health/check-health.d.ts +45 -0
- package/tools/health/check-health.d.ts.map +1 -0
- package/tools/health/check-health.js +27 -0
- package/tools/health/check-health.js.map +1 -0
- package/tools/health/check-health.mjs +23 -0
- package/tools/health/check-health.mjs.map +1 -0
- package/tools/index.d.mts +10 -0
- package/tools/index.d.mts.map +1 -0
- package/tools/index.d.ts +10 -0
- package/tools/index.d.ts.map +1 -0
- package/tools/index.js +67 -0
- package/tools/index.js.map +1 -0
- package/tools/index.mjs +60 -0
- package/tools/index.mjs.map +1 -0
- package/tools/providers/lookup-providers.d.mts +45 -0
- package/tools/providers/lookup-providers.d.mts.map +1 -0
- package/tools/providers/lookup-providers.d.ts +45 -0
- package/tools/providers/lookup-providers.d.ts.map +1 -0
- package/tools/providers/lookup-providers.js +45 -0
- package/tools/providers/lookup-providers.js.map +1 -0
- package/tools/providers/lookup-providers.mjs +41 -0
- package/tools/providers/lookup-providers.mjs.map +1 -0
- package/tools/types.d.mts +51 -0
- package/tools/types.d.mts.map +1 -0
- package/tools/types.d.ts +51 -0
- package/tools/types.d.ts.map +1 -0
- package/tools/types.js +46 -0
- package/tools/types.js.map +1 -0
- package/tools/types.mjs +42 -0
- package/tools/types.mjs.map +1 -0
- package/tools/version/retrieve-version.d.mts +45 -0
- package/tools/version/retrieve-version.d.mts.map +1 -0
- package/tools/version/retrieve-version.d.ts +45 -0
- package/tools/version/retrieve-version.d.ts.map +1 -0
- package/tools/version/retrieve-version.js +27 -0
- package/tools/version/retrieve-version.js.map +1 -0
- package/tools/version/retrieve-version.mjs +23 -0
- package/tools/version/retrieve-version.mjs.map +1 -0
- package/tools.d.mts +2 -0
- package/tools.d.mts.map +1 -0
- package/tools.d.ts +2 -0
- package/tools.d.ts.map +1 -0
- package/tools.js +18 -0
- package/tools.js.map +1 -0
- package/tools.mjs +2 -0
- package/tools.mjs.map +1 -0
package/LICENSE
ADDED
@@ -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 2025 BlueHive
|
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.
|
package/README.md
ADDED
@@ -0,0 +1,188 @@
|
|
1
|
+
# BlueHive TypeScript MCP Server
|
2
|
+
|
3
|
+
It is generated with [Stainless](https://www.stainless.com/).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
### Direct invocation
|
8
|
+
|
9
|
+
You can run the MCP Server directly via `npx`:
|
10
|
+
|
11
|
+
```sh
|
12
|
+
export BLUEHIVE_API_KEY="My API Key"
|
13
|
+
npx -y @bluehive/sdk-mcp@latest
|
14
|
+
```
|
15
|
+
|
16
|
+
### Via MCP Client
|
17
|
+
|
18
|
+
There is a partial list of existing clients at [modelcontextprotocol.io](https://modelcontextprotocol.io/clients). If you already
|
19
|
+
have a client, consult their documentation to install the MCP server.
|
20
|
+
|
21
|
+
For clients with a configuration JSON, it might look something like this:
|
22
|
+
|
23
|
+
```json
|
24
|
+
{
|
25
|
+
"mcpServers": {
|
26
|
+
"blue_hive_sdk_api": {
|
27
|
+
"command": "npx",
|
28
|
+
"args": ["-y", "@bluehive/sdk-mcp", "--client=claude", "--tools=all"],
|
29
|
+
"env": {
|
30
|
+
"BLUEHIVE_API_KEY": "My API Key"
|
31
|
+
}
|
32
|
+
}
|
33
|
+
}
|
34
|
+
}
|
35
|
+
```
|
36
|
+
|
37
|
+
## Exposing endpoints to your MCP Client
|
38
|
+
|
39
|
+
There are two ways to expose endpoints as tools in the MCP server:
|
40
|
+
|
41
|
+
1. Exposing one tool per endpoint, and filtering as necessary
|
42
|
+
2. Exposing a set of tools to dynamically discover and invoke endpoints from the API
|
43
|
+
|
44
|
+
### Filtering endpoints and tools
|
45
|
+
|
46
|
+
You can run the package on the command line to discover and filter the set of tools that are exposed by the
|
47
|
+
MCP Server. This can be helpful for large APIs where including all endpoints at once is too much for your AI's
|
48
|
+
context window.
|
49
|
+
|
50
|
+
You can filter by multiple aspects:
|
51
|
+
|
52
|
+
- `--tool` includes a specific tool by name
|
53
|
+
- `--resource` includes all tools under a specific resource, and can have wildcards, e.g. `my.resource*`
|
54
|
+
- `--operation` includes just read (get/list) or just write operations
|
55
|
+
|
56
|
+
### Dynamic tools
|
57
|
+
|
58
|
+
If you specify `--tools=dynamic` to the MCP server, instead of exposing one tool per endpoint in the API, it will
|
59
|
+
expose the following tools:
|
60
|
+
|
61
|
+
1. `list_api_endpoints` - Discovers available endpoints, with optional filtering by search query
|
62
|
+
2. `get_api_endpoint_schema` - Gets detailed schema information for a specific endpoint
|
63
|
+
3. `invoke_api_endpoint` - Executes any endpoint with the appropriate parameters
|
64
|
+
|
65
|
+
This allows you to have the full set of API endpoints available to your MCP Client, while not requiring that all
|
66
|
+
of their schemas be loaded into context at once. Instead, the LLM will automatically use these tools together to
|
67
|
+
search for, look up, and invoke endpoints dynamically. However, due to the indirect nature of the schemas, it
|
68
|
+
can struggle to provide the correct properties a bit more than when tools are imported explicitly. Therefore,
|
69
|
+
you can opt-in to explicit tools, the dynamic tools, or both.
|
70
|
+
|
71
|
+
See more information with `--help`.
|
72
|
+
|
73
|
+
All of these command-line options can be repeated, combined together, and have corresponding exclusion versions (e.g. `--no-tool`).
|
74
|
+
|
75
|
+
Use `--list` to see the list of available tools, or see below.
|
76
|
+
|
77
|
+
### Specifying the MCP Client
|
78
|
+
|
79
|
+
Different clients have varying abilities to handle arbitrary tools and schemas.
|
80
|
+
|
81
|
+
You can specify the client you are using with the `--client` argument, and the MCP server will automatically
|
82
|
+
serve tools and schemas that are more compatible with that client.
|
83
|
+
|
84
|
+
- `--client=<type>`: Set all capabilities based on a known MCP client
|
85
|
+
|
86
|
+
- Valid values: `openai-agents`, `claude`, `claude-code`, `cursor`
|
87
|
+
- Example: `--client=cursor`
|
88
|
+
|
89
|
+
Additionally, if you have a client not on the above list, or the client has gotten better
|
90
|
+
over time, you can manually enable or disable certain capabilities:
|
91
|
+
|
92
|
+
- `--capability=<name>`: Specify individual client capabilities
|
93
|
+
- Available capabilities:
|
94
|
+
- `top-level-unions`: Enable support for top-level unions in tool schemas
|
95
|
+
- `valid-json`: Enable JSON string parsing for arguments
|
96
|
+
- `refs`: Enable support for $ref pointers in schemas
|
97
|
+
- `unions`: Enable support for union types (anyOf) in schemas
|
98
|
+
- `formats`: Enable support for format validations in schemas (e.g. date-time, email)
|
99
|
+
- `tool-name-length=N`: Set maximum tool name length to N characters
|
100
|
+
- Example: `--capability=top-level-unions --capability=tool-name-length=40`
|
101
|
+
- Example: `--capability=top-level-unions,tool-name-length=40`
|
102
|
+
|
103
|
+
### Examples
|
104
|
+
|
105
|
+
1. Filter for read operations on cards:
|
106
|
+
|
107
|
+
```bash
|
108
|
+
--resource=cards --operation=read
|
109
|
+
```
|
110
|
+
|
111
|
+
2. Exclude specific tools while including others:
|
112
|
+
|
113
|
+
```bash
|
114
|
+
--resource=cards --no-tool=create_cards
|
115
|
+
```
|
116
|
+
|
117
|
+
3. Configure for Cursor client with custom max tool name length:
|
118
|
+
|
119
|
+
```bash
|
120
|
+
--client=cursor --capability=tool-name-length=40
|
121
|
+
```
|
122
|
+
|
123
|
+
4. Complex filtering with multiple criteria:
|
124
|
+
|
125
|
+
```bash
|
126
|
+
--resource=cards,accounts --operation=read --tag=kyc --no-tool=create_cards
|
127
|
+
```
|
128
|
+
|
129
|
+
## Importing the tools and server individually
|
130
|
+
|
131
|
+
```js
|
132
|
+
// Import the server, generated endpoints, or the init function
|
133
|
+
import { server, endpoints, init } from "@bluehive/sdk-mcp/server";
|
134
|
+
|
135
|
+
// import a specific tool
|
136
|
+
import checkHealth from "@bluehive/sdk-mcp/tools/health/check-health";
|
137
|
+
|
138
|
+
// initialize the server and all endpoints
|
139
|
+
init({ server, endpoints });
|
140
|
+
|
141
|
+
// manually start server
|
142
|
+
const transport = new StdioServerTransport();
|
143
|
+
await server.connect(transport);
|
144
|
+
|
145
|
+
// or initialize your own server with specific tools
|
146
|
+
const myServer = new McpServer(...);
|
147
|
+
|
148
|
+
// define your own endpoint
|
149
|
+
const myCustomEndpoint = {
|
150
|
+
tool: {
|
151
|
+
name: 'my_custom_tool',
|
152
|
+
description: 'My custom tool',
|
153
|
+
inputSchema: zodToJsonSchema(z.object({ a_property: z.string() })),
|
154
|
+
},
|
155
|
+
handler: async (client: client, args: any) => {
|
156
|
+
return { myResponse: 'Hello world!' };
|
157
|
+
})
|
158
|
+
};
|
159
|
+
|
160
|
+
// initialize the server with your custom endpoints
|
161
|
+
init({ server: myServer, endpoints: [checkHealth, myCustomEndpoint] });
|
162
|
+
```
|
163
|
+
|
164
|
+
## Available Tools
|
165
|
+
|
166
|
+
The following tools are available in this MCP server.
|
167
|
+
|
168
|
+
### Resource `health`:
|
169
|
+
|
170
|
+
- `check_health` (`read`): Check the service health and ensure the API is running properly.
|
171
|
+
|
172
|
+
### Resource `version`:
|
173
|
+
|
174
|
+
- `retrieve_version` (`read`): Retrieve the current version of the BlueHive API.
|
175
|
+
|
176
|
+
### Resource `providers`:
|
177
|
+
|
178
|
+
- `lookup_providers` (`read`): Search for healthcare providers by NPI number, name, or location proximity.
|
179
|
+
|
180
|
+
### Resource `database`:
|
181
|
+
|
182
|
+
- `check_health_database` (`read`): Check MongoDB database connectivity and retrieve health statistics.
|
183
|
+
|
184
|
+
### Resource `fax`:
|
185
|
+
|
186
|
+
- `list_providers_fax` (`read`): Get a list of available fax providers and their configuration status.
|
187
|
+
- `retrieve_status_fax` (`read`): Retrieve the current status and details of a fax by its ID.
|
188
|
+
- `send_fax` (`write`): Send a fax document to a specified number using the configured fax provider.
|
package/compat.d.mts
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { Endpoint } from "./tools.mjs";
|
3
|
+
export interface ClientCapabilities {
|
4
|
+
topLevelUnions: boolean;
|
5
|
+
validJson: boolean;
|
6
|
+
refs: boolean;
|
7
|
+
unions: boolean;
|
8
|
+
formats: boolean;
|
9
|
+
toolNameLength: number | undefined;
|
10
|
+
}
|
11
|
+
export declare const defaultClientCapabilities: ClientCapabilities;
|
12
|
+
export type ClientType = 'openai-agents' | 'claude' | 'claude-code' | 'cursor';
|
13
|
+
export declare const knownClients: Record<ClientType, ClientCapabilities>;
|
14
|
+
/**
|
15
|
+
* Attempts to parse strings into JSON objects
|
16
|
+
*/
|
17
|
+
export declare function parseEmbeddedJSON(args: Record<string, unknown>, schema: Record<string, unknown>): Record<string, unknown>;
|
18
|
+
export type JSONSchema = {
|
19
|
+
type?: string;
|
20
|
+
properties?: Record<string, JSONSchema>;
|
21
|
+
required?: string[];
|
22
|
+
anyOf?: JSONSchema[];
|
23
|
+
$ref?: string;
|
24
|
+
$defs?: Record<string, JSONSchema>;
|
25
|
+
[key: string]: any;
|
26
|
+
};
|
27
|
+
/**
|
28
|
+
* Truncates tool names to the specified length while ensuring uniqueness.
|
29
|
+
* If truncation would cause duplicate names, appends a number to make them unique.
|
30
|
+
*/
|
31
|
+
export declare function truncateToolNames(names: string[], maxLength: number): Map<string, string>;
|
32
|
+
/**
|
33
|
+
* Removes top-level unions from a tool by splitting it into multiple tools,
|
34
|
+
* one for each variant in the union.
|
35
|
+
*/
|
36
|
+
export declare function removeTopLevelUnions(tool: Tool): Tool[];
|
37
|
+
declare function findUsedDefs(schema: JSONSchema, defs: Record<string, JSONSchema>, visited?: Set<string>): Record<string, JSONSchema>;
|
38
|
+
export { findUsedDefs };
|
39
|
+
/**
|
40
|
+
* Inlines all $refs in a schema, eliminating $defs.
|
41
|
+
* If a circular reference is detected, the circular property is removed.
|
42
|
+
*/
|
43
|
+
export declare function inlineRefs(schema: JSONSchema): JSONSchema;
|
44
|
+
/**
|
45
|
+
* Removes anyOf fields from a schema, using only the first variant.
|
46
|
+
*/
|
47
|
+
export declare function removeAnyOf(schema: JSONSchema): JSONSchema;
|
48
|
+
/**
|
49
|
+
* Removes format fields from a schema and appends them to the description.
|
50
|
+
*/
|
51
|
+
export declare function removeFormats(schema: JSONSchema, formatsCapability: boolean): JSONSchema;
|
52
|
+
/**
|
53
|
+
* Applies all compatibility transformations to the endpoints based on the provided capabilities.
|
54
|
+
*/
|
55
|
+
export declare function applyCompatibilityTransformations(endpoints: Endpoint[], capabilities: ClientCapabilities): Endpoint[];
|
56
|
+
//# sourceMappingURL=compat.d.mts.map
|
package/compat.d.mts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"compat.d.mts","sourceRoot":"","sources":["src/compat.ts"],"names":[],"mappings":"OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE;AAEnB,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,OAAO,C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C,OAAO,GAAE,GAAG,CAAC,MAAM,CAAa,GAC/B,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CA6B5B;AAGD,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB;;;GAGG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CAazD;AAoED;;GAEG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,UAAU,GAAG,UAAU,CA0C1D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,iBAAiB,EAAE,OAAO,GAAG,UAAU,CAkCxF;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,QAAQ,EAAE,EACrB,YAAY,EAAE,kBAAkB,GAC/B,QAAQ,EAAE,CAiEZ"}
|
package/compat.d.ts
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
2
|
+
import { Endpoint } from "./tools.js";
|
3
|
+
export interface ClientCapabilities {
|
4
|
+
topLevelUnions: boolean;
|
5
|
+
validJson: boolean;
|
6
|
+
refs: boolean;
|
7
|
+
unions: boolean;
|
8
|
+
formats: boolean;
|
9
|
+
toolNameLength: number | undefined;
|
10
|
+
}
|
11
|
+
export declare const defaultClientCapabilities: ClientCapabilities;
|
12
|
+
export type ClientType = 'openai-agents' | 'claude' | 'claude-code' | 'cursor';
|
13
|
+
export declare const knownClients: Record<ClientType, ClientCapabilities>;
|
14
|
+
/**
|
15
|
+
* Attempts to parse strings into JSON objects
|
16
|
+
*/
|
17
|
+
export declare function parseEmbeddedJSON(args: Record<string, unknown>, schema: Record<string, unknown>): Record<string, unknown>;
|
18
|
+
export type JSONSchema = {
|
19
|
+
type?: string;
|
20
|
+
properties?: Record<string, JSONSchema>;
|
21
|
+
required?: string[];
|
22
|
+
anyOf?: JSONSchema[];
|
23
|
+
$ref?: string;
|
24
|
+
$defs?: Record<string, JSONSchema>;
|
25
|
+
[key: string]: any;
|
26
|
+
};
|
27
|
+
/**
|
28
|
+
* Truncates tool names to the specified length while ensuring uniqueness.
|
29
|
+
* If truncation would cause duplicate names, appends a number to make them unique.
|
30
|
+
*/
|
31
|
+
export declare function truncateToolNames(names: string[], maxLength: number): Map<string, string>;
|
32
|
+
/**
|
33
|
+
* Removes top-level unions from a tool by splitting it into multiple tools,
|
34
|
+
* one for each variant in the union.
|
35
|
+
*/
|
36
|
+
export declare function removeTopLevelUnions(tool: Tool): Tool[];
|
37
|
+
declare function findUsedDefs(schema: JSONSchema, defs: Record<string, JSONSchema>, visited?: Set<string>): Record<string, JSONSchema>;
|
38
|
+
export { findUsedDefs };
|
39
|
+
/**
|
40
|
+
* Inlines all $refs in a schema, eliminating $defs.
|
41
|
+
* If a circular reference is detected, the circular property is removed.
|
42
|
+
*/
|
43
|
+
export declare function inlineRefs(schema: JSONSchema): JSONSchema;
|
44
|
+
/**
|
45
|
+
* Removes anyOf fields from a schema, using only the first variant.
|
46
|
+
*/
|
47
|
+
export declare function removeAnyOf(schema: JSONSchema): JSONSchema;
|
48
|
+
/**
|
49
|
+
* Removes format fields from a schema and appends them to the description.
|
50
|
+
*/
|
51
|
+
export declare function removeFormats(schema: JSONSchema, formatsCapability: boolean): JSONSchema;
|
52
|
+
/**
|
53
|
+
* Applies all compatibility transformations to the endpoints based on the provided capabilities.
|
54
|
+
*/
|
55
|
+
export declare function applyCompatibilityTransformations(endpoints: Endpoint[], capabilities: ClientCapabilities): Endpoint[];
|
56
|
+
//# sourceMappingURL=compat.d.ts.map
|
package/compat.d.ts.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"compat.d.ts","sourceRoot":"","sources":["src/compat.ts"],"names":[],"mappings":"OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC;OAClD,EAAE,QAAQ,EAAE;AAEnB,MAAM,WAAW,kBAAkB;IACjC,cAAc,EAAE,OAAO,CAAC;IACxB,SAAS,EAAE,OAAO,CAAC;IACnB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