@healthybowl/mcp 0.0.0-stage โ 2026.1201.1
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 +9 -0
- package/README.md +361 -2
- package/dist/index.js +215 -0
- package/package.json +101 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
Copyright (c) 2025 Burdenoff Consultancy Services Private Limited, Algoshred Technologies Private Limited and all sister companies.
|
|
2
|
+
|
|
3
|
+
All rights reserved.
|
|
4
|
+
|
|
5
|
+
This software is proprietary and confidential. Unauthorized copying, modification, distribution, or use of this software, via any medium, is strictly prohibited without the express written permission of the copyright holders.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
8
|
+
|
|
9
|
+
For licensing inquiries, please contact: legal@algoshred.com
|
package/README.md
CHANGED
|
@@ -1,3 +1,362 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Healthybowl Mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A comprehensive TypeScript healthybowl for building [Model Context Protocol (MCP)](https://modelcontextprotocol.io) servers. This healthybowl provides a solid foundation for creating MCP servers that can integrate with LLMs through various transport methods.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- ๐ **TypeScript First** - Full TypeScript support with strict type checking
|
|
8
|
+
- ๐ง **Multiple Transports** - Support for both stdio and HTTP transports
|
|
9
|
+
- ๐ฆ **Modular Architecture** - Well-organized code structure with clear separation of concerns
|
|
10
|
+
- ๐ ๏ธ **Built-in Examples** - Sample tools, resources, and prompts to get started
|
|
11
|
+
- โ๏ธ **Configuration Management** - Environment-based configuration with validation
|
|
12
|
+
- ๐ **Comprehensive Logging** - Structured logging with configurable levels
|
|
13
|
+
- ๐งช **Testing Ready** - Vitest setup with coverage reporting
|
|
14
|
+
- ๐ฏ **Production Ready** - Docker support and health checks included
|
|
15
|
+
- ๐ **Code Quality** - ESLint and Prettier configurations included
|
|
16
|
+
|
|
17
|
+
## Quick Start
|
|
18
|
+
|
|
19
|
+
### Prerequisites
|
|
20
|
+
|
|
21
|
+
- Node.js 18.x or higher
|
|
22
|
+
- npm or yarn
|
|
23
|
+
|
|
24
|
+
### Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Clone or copy the healthybowl
|
|
28
|
+
cp -r healthybowl-mcp your-mcp-server
|
|
29
|
+
cd your-mcp-server
|
|
30
|
+
|
|
31
|
+
# Install dependencies
|
|
32
|
+
npm install
|
|
33
|
+
|
|
34
|
+
# Copy environment file and configure
|
|
35
|
+
cp .env.example .env
|
|
36
|
+
|
|
37
|
+
# Build the project
|
|
38
|
+
npm run build
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Running the Server
|
|
42
|
+
|
|
43
|
+
#### Stdio Transport (Default)
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
# Development mode with watch
|
|
47
|
+
npm run dev
|
|
48
|
+
|
|
49
|
+
# Production mode
|
|
50
|
+
npm start
|
|
51
|
+
|
|
52
|
+
# Direct execution
|
|
53
|
+
npm run server
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
#### HTTP Transport
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
# Start HTTP server on port 3000
|
|
60
|
+
npm run server -- --http
|
|
61
|
+
|
|
62
|
+
# Start on custom port
|
|
63
|
+
npm run server -- --http --port 3001
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### Testing the Server
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
# Run the example client
|
|
70
|
+
npm run client
|
|
71
|
+
|
|
72
|
+
# Test HTTP endpoint (if running HTTP transport)
|
|
73
|
+
curl -X GET http://localhost:3000/health
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Project Structure
|
|
77
|
+
|
|
78
|
+
```
|
|
79
|
+
healthybowl-mcp/
|
|
80
|
+
โโโ src/
|
|
81
|
+
โ โโโ config/ # Configuration management
|
|
82
|
+
โ โโโ tools/ # MCP tools implementation
|
|
83
|
+
โ โโโ resources/ # MCP resources implementation
|
|
84
|
+
โ โโโ prompts/ # MCP prompts implementation
|
|
85
|
+
โ โโโ transports/ # Transport layer (stdio, HTTP)
|
|
86
|
+
โ โโโ utils/ # Utilities and helpers
|
|
87
|
+
โ โโโ index.ts # Main server entry point
|
|
88
|
+
โ โโโ cli.ts # CLI interface
|
|
89
|
+
โโโ examples/ # Example implementations
|
|
90
|
+
โโโ tests/ # Test files
|
|
91
|
+
โโโ docs/ # Documentation
|
|
92
|
+
โโโ ...config files
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Core Concepts
|
|
96
|
+
|
|
97
|
+
### Tools
|
|
98
|
+
|
|
99
|
+
Tools are functions that the LLM can call to perform actions or retrieve information.
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
// Example tool implementation
|
|
103
|
+
server.registerTool(
|
|
104
|
+
'my-tool',
|
|
105
|
+
{
|
|
106
|
+
title: 'My Custom Tool',
|
|
107
|
+
description: 'Description of what this tool does',
|
|
108
|
+
inputSchema: {
|
|
109
|
+
param1: z.string().describe('First parameter'),
|
|
110
|
+
param2: z.number().optional().describe('Optional second parameter'),
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
async ({ param1, param2 }) => {
|
|
114
|
+
// Tool logic here
|
|
115
|
+
return {
|
|
116
|
+
content: [{ type: 'text', text: 'Tool result' }],
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Resources
|
|
123
|
+
|
|
124
|
+
Resources provide static or dynamic data that the LLM can read.
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
// Static resource
|
|
128
|
+
server.registerResource(
|
|
129
|
+
'config',
|
|
130
|
+
'config://main',
|
|
131
|
+
{ title: 'Configuration', description: 'Server configuration' },
|
|
132
|
+
async uri => ({
|
|
133
|
+
contents: [{ uri: uri.href, text: JSON.stringify(config) }],
|
|
134
|
+
})
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
// Dynamic resource with parameters
|
|
138
|
+
server.registerResource(
|
|
139
|
+
'user',
|
|
140
|
+
new ResourceTemplate('user://{id}', { list: undefined }),
|
|
141
|
+
{ title: 'User Data', description: 'User information' },
|
|
142
|
+
async (uri, { id }) => ({
|
|
143
|
+
contents: [{ uri: uri.href, text: JSON.stringify(userData) }],
|
|
144
|
+
})
|
|
145
|
+
);
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### Prompts
|
|
149
|
+
|
|
150
|
+
Prompts are templates that help structure requests to the LLM.
|
|
151
|
+
|
|
152
|
+
```typescript
|
|
153
|
+
server.registerPrompt(
|
|
154
|
+
'code-review',
|
|
155
|
+
{
|
|
156
|
+
title: 'Code Review',
|
|
157
|
+
description: 'Review code for best practices',
|
|
158
|
+
argsSchema: {
|
|
159
|
+
code: z.string().describe('Code to review'),
|
|
160
|
+
language: z.string().optional().describe('Programming language'),
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
({ code, language }) => ({
|
|
164
|
+
messages: [
|
|
165
|
+
{
|
|
166
|
+
role: 'user',
|
|
167
|
+
content: {
|
|
168
|
+
type: 'text',
|
|
169
|
+
text: `Please review this ${language || ''} code: ${code}`,
|
|
170
|
+
},
|
|
171
|
+
},
|
|
172
|
+
],
|
|
173
|
+
})
|
|
174
|
+
);
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## Configuration
|
|
178
|
+
|
|
179
|
+
Configuration is handled through environment variables. Copy `.env.example` to `.env` and customize:
|
|
180
|
+
|
|
181
|
+
```bash
|
|
182
|
+
# Basic configuration
|
|
183
|
+
SERVER_NAME=my-mcp-server
|
|
184
|
+
SERVER_VERSION=1.0.0
|
|
185
|
+
PORT=3000
|
|
186
|
+
LOG_LEVEL=info
|
|
187
|
+
|
|
188
|
+
# Optional integrations
|
|
189
|
+
DATABASE_URL=postgresql://user:password@localhost:5432/db
|
|
190
|
+
API_KEY=your-api-key-here
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
See `.env.example` for all available configuration options.
|
|
194
|
+
|
|
195
|
+
## Transport Methods
|
|
196
|
+
|
|
197
|
+
### Stdio Transport
|
|
198
|
+
|
|
199
|
+
Best for servers launched directly by MCP clients:
|
|
200
|
+
|
|
201
|
+
```typescript
|
|
202
|
+
import { startStdioServer } from './transports/index.js';
|
|
203
|
+
await startStdioServer();
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### HTTP Transport
|
|
207
|
+
|
|
208
|
+
Best for web-based clients or when you need persistent sessions:
|
|
209
|
+
|
|
210
|
+
```typescript
|
|
211
|
+
import { startHttpServer } from './transports/index.js';
|
|
212
|
+
await startHttpServer({
|
|
213
|
+
port: 3000,
|
|
214
|
+
enableCors: true,
|
|
215
|
+
corsOrigins: ['https://yourdomain.com'],
|
|
216
|
+
});
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
## Development
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
# Development with watch mode
|
|
223
|
+
npm run dev
|
|
224
|
+
|
|
225
|
+
# Run tests
|
|
226
|
+
npm test
|
|
227
|
+
|
|
228
|
+
# Run tests with coverage
|
|
229
|
+
npm run test:coverage
|
|
230
|
+
|
|
231
|
+
# Lint code
|
|
232
|
+
npm run lint
|
|
233
|
+
|
|
234
|
+
# Format code
|
|
235
|
+
npm run format
|
|
236
|
+
|
|
237
|
+
# Type checking
|
|
238
|
+
npm run typecheck
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
## Building for Production
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
# Build the project
|
|
245
|
+
npm run build
|
|
246
|
+
|
|
247
|
+
# Start production server
|
|
248
|
+
node dist/index.js
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
## Examples
|
|
252
|
+
|
|
253
|
+
The `examples/` directory contains several example implementations:
|
|
254
|
+
|
|
255
|
+
- `stdio-server.ts` - Basic stdio server
|
|
256
|
+
- `http-server.ts` - Basic HTTP server
|
|
257
|
+
- `custom-server.ts` - Custom implementation without healthybowl registry
|
|
258
|
+
- `client.ts` - Example client that connects to the server
|
|
259
|
+
|
|
260
|
+
## Integration with AlgoShred Products
|
|
261
|
+
|
|
262
|
+
This healthybowl is designed to work with any AlgoShred product. To integrate:
|
|
263
|
+
|
|
264
|
+
1. Copy this healthybowl to your product directory
|
|
265
|
+
2. Customize the tools, resources, and prompts for your specific use case
|
|
266
|
+
3. Update configuration and documentation
|
|
267
|
+
4. Add product-specific environment variables
|
|
268
|
+
|
|
269
|
+
### TypeScript Backend Integration
|
|
270
|
+
|
|
271
|
+
A specialized integration is included for the `healthybowl-backend` project:
|
|
272
|
+
|
|
273
|
+
```bash
|
|
274
|
+
# Configure for TypeScript backend
|
|
275
|
+
cp .env.ts-backend .env
|
|
276
|
+
|
|
277
|
+
# Start the TypeScript backend first
|
|
278
|
+
cd ../healthybowl-backend && npm run dev
|
|
279
|
+
|
|
280
|
+
# Run the specialized MCP server
|
|
281
|
+
npm run ts-backend:server
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
See [TS_BACKEND_GRAPHQL_INTEGRATION.md](./docs/TS_BACKEND_GRAPHQL_INTEGRATION.md) for complete integration guide.
|
|
285
|
+
|
|
286
|
+
## Common Patterns
|
|
287
|
+
|
|
288
|
+
### Adding Authentication
|
|
289
|
+
|
|
290
|
+
```typescript
|
|
291
|
+
// Add API key validation to tools
|
|
292
|
+
const authenticatedTool = async (input, context) => {
|
|
293
|
+
if (!context.apiKey || context.apiKey !== config.apiKey) {
|
|
294
|
+
throw new Error('Unauthorized');
|
|
295
|
+
}
|
|
296
|
+
// Tool logic here
|
|
297
|
+
};
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
### Database Integration
|
|
301
|
+
|
|
302
|
+
```typescript
|
|
303
|
+
// Example with database connection
|
|
304
|
+
import { DatabaseClient } from './database.js';
|
|
305
|
+
|
|
306
|
+
const db = new DatabaseClient(config.databaseUrl);
|
|
307
|
+
|
|
308
|
+
const getUserTool = async ({ userId }) => {
|
|
309
|
+
const user = await db.user.findById(userId);
|
|
310
|
+
return { content: [{ type: 'text', text: JSON.stringify(user) }] };
|
|
311
|
+
};
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
### External API Integration
|
|
315
|
+
|
|
316
|
+
```typescript
|
|
317
|
+
// Example with external API
|
|
318
|
+
const weatherTool = async ({ city }) => {
|
|
319
|
+
const response = await fetch(`${config.externalApiBaseUrl}/weather?city=${city}`, {
|
|
320
|
+
headers: { Authorization: `Bearer ${config.externalApiKey}` },
|
|
321
|
+
});
|
|
322
|
+
const data = await response.json();
|
|
323
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
324
|
+
};
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
## Troubleshooting
|
|
328
|
+
|
|
329
|
+
### Common Issues
|
|
330
|
+
|
|
331
|
+
1. **Port already in use**: Change the port in your `.env` file or use `--port` flag
|
|
332
|
+
2. **Module not found**: Ensure you've run `npm install` and `npm run build`
|
|
333
|
+
3. **Permission denied**: Check file permissions, especially for the CLI script
|
|
334
|
+
|
|
335
|
+
### Debug Mode
|
|
336
|
+
|
|
337
|
+
```bash
|
|
338
|
+
# Enable debug logging
|
|
339
|
+
LOG_LEVEL=debug npm run dev
|
|
340
|
+
|
|
341
|
+
# Run with Node.js debugging
|
|
342
|
+
node --inspect dist/index.js
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
## Contributing
|
|
346
|
+
|
|
347
|
+
1. Fork the repository
|
|
348
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
349
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
350
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
351
|
+
5. Open a Pull Request
|
|
352
|
+
|
|
353
|
+
## License
|
|
354
|
+
|
|
355
|
+
MIT License - see LICENSE file for details.
|
|
356
|
+
|
|
357
|
+
## Resources
|
|
358
|
+
|
|
359
|
+
- [Model Context Protocol Documentation](https://modelcontextprotocol.io)
|
|
360
|
+
- [MCP TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
361
|
+
- [MCP Specification](https://github.com/modelcontextprotocol/specification)
|
|
362
|
+
- [AlgoShred Products Documentation](../README.md)
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/index.ts
|
|
4
|
+
import { buildContext, createMcpServer } from "@burdenoff/mcp-libs/core";
|
|
5
|
+
import { startHttpServer, startStdioServer } from "@burdenoff/mcp-libs/transports";
|
|
6
|
+
import authModule from "@burdenoff/mcp-libs/modules/auth";
|
|
7
|
+
import billingModule from "@burdenoff/mcp-libs/modules/billing";
|
|
8
|
+
import channelsModule from "@burdenoff/mcp-libs/modules/channels";
|
|
9
|
+
import conversationsModule from "@burdenoff/mcp-libs/modules/conversations";
|
|
10
|
+
import devportalModule from "@burdenoff/mcp-libs/modules/devportal";
|
|
11
|
+
import exportModule from "@burdenoff/mcp-libs/modules/export";
|
|
12
|
+
import filesModule from "@burdenoff/mcp-libs/modules/files";
|
|
13
|
+
import groupsModule from "@burdenoff/mcp-libs/modules/groups";
|
|
14
|
+
import healthybowlModule from "@burdenoff/mcp-libs/modules/healthybowl";
|
|
15
|
+
import integrationsModule from "@burdenoff/mcp-libs/modules/integrations";
|
|
16
|
+
import notificationsModule from "@burdenoff/mcp-libs/modules/notifications";
|
|
17
|
+
import organizationsModule from "@burdenoff/mcp-libs/modules/organizations";
|
|
18
|
+
import productsModule from "@burdenoff/mcp-libs/modules/products";
|
|
19
|
+
import rbacModule from "@burdenoff/mcp-libs/modules/rbac";
|
|
20
|
+
import sandboxModule from "@burdenoff/mcp-libs/modules/sandbox";
|
|
21
|
+
import schedulerModule from "@burdenoff/mcp-libs/modules/scheduler";
|
|
22
|
+
import securityModule from "@burdenoff/mcp-libs/modules/security";
|
|
23
|
+
import storeModule from "@burdenoff/mcp-libs/modules/store";
|
|
24
|
+
import supportModule from "@burdenoff/mcp-libs/modules/support";
|
|
25
|
+
import tagsModule from "@burdenoff/mcp-libs/modules/tags";
|
|
26
|
+
import toursModule from "@burdenoff/mcp-libs/modules/tours";
|
|
27
|
+
import workspacesModule from "@burdenoff/mcp-libs/modules/workspaces";
|
|
28
|
+
// package.json
|
|
29
|
+
var package_default = {
|
|
30
|
+
name: "@healthybowl/mcp",
|
|
31
|
+
version: "2026.1201.1",
|
|
32
|
+
repository: {
|
|
33
|
+
type: "git",
|
|
34
|
+
url: "git+https://github.com/Algoshred/healthybowl-mcp.git"
|
|
35
|
+
},
|
|
36
|
+
description: "HealthyBowl MCP Server โ farm operations tools for AI agents via GraphQL",
|
|
37
|
+
main: "dist/index.js",
|
|
38
|
+
type: "module",
|
|
39
|
+
scripts: {
|
|
40
|
+
build: "bun build src/index.ts --outdir dist --target node --packages external",
|
|
41
|
+
dev: "bun --watch src/index.ts",
|
|
42
|
+
start: "node dist/index.js",
|
|
43
|
+
lint: "eslint .",
|
|
44
|
+
"lint:fix": "eslint . --fix",
|
|
45
|
+
format: "bun fmt src tests",
|
|
46
|
+
"format:check": "bun fmt --check src tests",
|
|
47
|
+
test: "bun test",
|
|
48
|
+
"test:coverage": "bun test --coverage",
|
|
49
|
+
clean: "rm -rf dist coverage junit.xml",
|
|
50
|
+
server: "bun src/index.ts",
|
|
51
|
+
"server:http": "bun src/index.ts --http",
|
|
52
|
+
sanity: "boff sanity",
|
|
53
|
+
prepare: "lefthook install || true",
|
|
54
|
+
"type:check": "boff gate -- bun check --no-pretty",
|
|
55
|
+
"sanity:force": "boff sanity --force",
|
|
56
|
+
audit: "bun audit --audit-level=high"
|
|
57
|
+
},
|
|
58
|
+
keywords: [
|
|
59
|
+
"mcp",
|
|
60
|
+
"model-context-protocol",
|
|
61
|
+
"typescript",
|
|
62
|
+
"healthybowl",
|
|
63
|
+
"server",
|
|
64
|
+
"llm",
|
|
65
|
+
"ai"
|
|
66
|
+
],
|
|
67
|
+
author: "AlgoShred Products",
|
|
68
|
+
license: "PROPRIETARY",
|
|
69
|
+
dependencies: {
|
|
70
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
71
|
+
"@burdenoff/mcp-libs": "^2026.1107.5"
|
|
72
|
+
},
|
|
73
|
+
devDependencies: {
|
|
74
|
+
"@burdenoff/toolchain": "2026.1107.14",
|
|
75
|
+
"@types/bun": "^1.4.4",
|
|
76
|
+
eslint: "^9.39.5",
|
|
77
|
+
lefthook: "^2.2.2",
|
|
78
|
+
typescript: "6.0.3"
|
|
79
|
+
},
|
|
80
|
+
engines: {
|
|
81
|
+
node: ">=18.0.0",
|
|
82
|
+
bun: ">=1.4.4"
|
|
83
|
+
},
|
|
84
|
+
bin: {
|
|
85
|
+
"healthybowl-mcp": "./dist/index.js"
|
|
86
|
+
},
|
|
87
|
+
files: [
|
|
88
|
+
"dist",
|
|
89
|
+
"README.md",
|
|
90
|
+
"LICENSE"
|
|
91
|
+
],
|
|
92
|
+
publishConfig: {
|
|
93
|
+
access: "public",
|
|
94
|
+
registry: "https://registry.npmjs.org/"
|
|
95
|
+
},
|
|
96
|
+
overrides: {
|
|
97
|
+
lodash: ">=4.17.21",
|
|
98
|
+
"lodash-es": ">=4.17.21",
|
|
99
|
+
dompurify: ">=3.3.4",
|
|
100
|
+
"fast-xml-parser": ">=4.5.5",
|
|
101
|
+
"@xmldom/xmldom": ">=0.8.12",
|
|
102
|
+
swiper: ">=12.1.2",
|
|
103
|
+
"brace-expansion": ">=1.1.13",
|
|
104
|
+
"follow-redirects": ">=1.15.12",
|
|
105
|
+
"smol-toml": ">=1.6.1",
|
|
106
|
+
axios: ">=1.15.0",
|
|
107
|
+
flatted: ">=3.4.1",
|
|
108
|
+
yaml: ">=2.8.3",
|
|
109
|
+
picomatch: ">=2.3.2",
|
|
110
|
+
immutable: ">=3.8.3",
|
|
111
|
+
minimatch: ">=3.1.3",
|
|
112
|
+
"ip-address": "^10.7.6"
|
|
113
|
+
},
|
|
114
|
+
packageManager: "bun@1.4.4",
|
|
115
|
+
boff: {
|
|
116
|
+
type: "mcp",
|
|
117
|
+
sanity: {
|
|
118
|
+
formatPaths: [
|
|
119
|
+
"src",
|
|
120
|
+
"tests"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
coverage: {
|
|
124
|
+
global: 80,
|
|
125
|
+
diff: 80,
|
|
126
|
+
exclude: [
|
|
127
|
+
"src/index.ts"
|
|
128
|
+
]
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// src/product-defaults.ts
|
|
134
|
+
var productDefaults = {
|
|
135
|
+
configDirName: "healthybowl-mcp",
|
|
136
|
+
oidcClientId: "burdenoff_mcp_healthybowl",
|
|
137
|
+
oidcIssuerProd: "https://graphql.burdenoff.com/global",
|
|
138
|
+
workspaceEndpointDefault: "https://graphqlworkspaces.burdenoff.com/workspaces/graphql",
|
|
139
|
+
globalEndpointDefault: "https://graphql.burdenoff.com/global/graphql",
|
|
140
|
+
httpPortDefault: 3004,
|
|
141
|
+
hostDefault: "127.0.0.1",
|
|
142
|
+
envPrefix: "HEALTHYBOWL"
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
// src/index.ts
|
|
146
|
+
var MODULES = [
|
|
147
|
+
authModule,
|
|
148
|
+
healthybowlModule,
|
|
149
|
+
sandboxModule,
|
|
150
|
+
rbacModule,
|
|
151
|
+
organizationsModule,
|
|
152
|
+
toursModule,
|
|
153
|
+
workspacesModule,
|
|
154
|
+
groupsModule,
|
|
155
|
+
tagsModule,
|
|
156
|
+
filesModule,
|
|
157
|
+
conversationsModule,
|
|
158
|
+
securityModule,
|
|
159
|
+
integrationsModule,
|
|
160
|
+
channelsModule,
|
|
161
|
+
schedulerModule,
|
|
162
|
+
exportModule,
|
|
163
|
+
notificationsModule,
|
|
164
|
+
supportModule,
|
|
165
|
+
productsModule,
|
|
166
|
+
devportalModule,
|
|
167
|
+
billingModule,
|
|
168
|
+
storeModule
|
|
169
|
+
];
|
|
170
|
+
async function main() {
|
|
171
|
+
const args = process.argv.slice(2);
|
|
172
|
+
let mode = "stdio";
|
|
173
|
+
if (args.includes("--http") || args.includes("--transport=http")) {
|
|
174
|
+
mode = "http";
|
|
175
|
+
} else if (args.includes("--stdio") || args.includes("--transport=stdio")) {
|
|
176
|
+
mode = "stdio";
|
|
177
|
+
}
|
|
178
|
+
const portIdx = args.indexOf("--port");
|
|
179
|
+
const portArg = portIdx >= 0 ? args[portIdx + 1] : undefined;
|
|
180
|
+
const ctx = buildContext({
|
|
181
|
+
productName: "healthybowl",
|
|
182
|
+
productVersion: package_default.version,
|
|
183
|
+
serverName: "healthybowl-mcp",
|
|
184
|
+
serverVersion: package_default.version,
|
|
185
|
+
defaults: productDefaults
|
|
186
|
+
});
|
|
187
|
+
const port = portArg ? parseInt(portArg, 10) : ctx.config.read().httpPort;
|
|
188
|
+
ctx.logger.info("Starting Healthybowl MCP server", {
|
|
189
|
+
mode,
|
|
190
|
+
name: "healthybowl-mcp",
|
|
191
|
+
version: package_default.version,
|
|
192
|
+
modules: MODULES.length,
|
|
193
|
+
env: ctx.env,
|
|
194
|
+
workspaceEndpoint: ctx.config.read().workspaceEndpoint,
|
|
195
|
+
globalEndpoint: ctx.config.read().globalEndpoint
|
|
196
|
+
});
|
|
197
|
+
if (mode === "http") {
|
|
198
|
+
await startHttpServer(ctx, () => createMcpServer(ctx, MODULES, {
|
|
199
|
+
name: "healthybowl-mcp",
|
|
200
|
+
version: package_default.version
|
|
201
|
+
}).server, { port });
|
|
202
|
+
} else {
|
|
203
|
+
const { server } = createMcpServer(ctx, MODULES, {
|
|
204
|
+
name: "healthybowl-mcp",
|
|
205
|
+
version: package_default.version
|
|
206
|
+
});
|
|
207
|
+
await startStdioServer(server, ctx);
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
process.on("SIGINT", () => process.exit(0));
|
|
211
|
+
process.on("SIGTERM", () => process.exit(0));
|
|
212
|
+
main().catch((error) => {
|
|
213
|
+
console.error("Fatal error in healthybowl-mcp:", error);
|
|
214
|
+
process.exit(1);
|
|
215
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,103 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@healthybowl/mcp",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"version": "2026.1201.1",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/Algoshred/healthybowl-mcp.git"
|
|
7
|
+
},
|
|
8
|
+
"description": "HealthyBowl MCP Server โ farm operations tools for AI agents via GraphQL",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"type": "module",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "bun build src/index.ts --outdir dist --target node --packages external",
|
|
13
|
+
"dev": "bun --watch src/index.ts",
|
|
14
|
+
"start": "node dist/index.js",
|
|
15
|
+
"lint": "eslint .",
|
|
16
|
+
"lint:fix": "eslint . --fix",
|
|
17
|
+
"format": "bun fmt src tests",
|
|
18
|
+
"format:check": "bun fmt --check src tests",
|
|
19
|
+
"test": "bun test",
|
|
20
|
+
"test:coverage": "bun test --coverage",
|
|
21
|
+
"clean": "rm -rf dist coverage junit.xml",
|
|
22
|
+
"server": "bun src/index.ts",
|
|
23
|
+
"server:http": "bun src/index.ts --http",
|
|
24
|
+
"sanity": "boff sanity",
|
|
25
|
+
"prepare": "lefthook install || true",
|
|
26
|
+
"type:check": "boff gate -- bun check --no-pretty",
|
|
27
|
+
"sanity:force": "boff sanity --force",
|
|
28
|
+
"audit": "bun audit --audit-level=high"
|
|
29
|
+
},
|
|
30
|
+
"keywords": [
|
|
31
|
+
"mcp",
|
|
32
|
+
"model-context-protocol",
|
|
33
|
+
"typescript",
|
|
34
|
+
"healthybowl",
|
|
35
|
+
"server",
|
|
36
|
+
"llm",
|
|
37
|
+
"ai"
|
|
38
|
+
],
|
|
39
|
+
"author": "AlgoShred Products",
|
|
40
|
+
"license": "PROPRIETARY",
|
|
41
|
+
"dependencies": {
|
|
42
|
+
"@modelcontextprotocol/sdk": "1.32.2",
|
|
43
|
+
"@burdenoff/mcp-libs": "^2026.1107.5"
|
|
44
|
+
},
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@burdenoff/toolchain": "2026.1107.14",
|
|
47
|
+
"@types/bun": "^1.4.4",
|
|
48
|
+
"eslint": "^9.39.5",
|
|
49
|
+
"lefthook": "^2.2.2",
|
|
50
|
+
"typescript": "6.0.3"
|
|
51
|
+
},
|
|
52
|
+
"engines": {
|
|
53
|
+
"node": ">=18.0.0",
|
|
54
|
+
"bun": ">=1.4.4"
|
|
55
|
+
},
|
|
56
|
+
"bin": {
|
|
57
|
+
"healthybowl-mcp": "./dist/index.js"
|
|
58
|
+
},
|
|
59
|
+
"files": [
|
|
60
|
+
"dist",
|
|
61
|
+
"README.md",
|
|
62
|
+
"LICENSE"
|
|
63
|
+
],
|
|
64
|
+
"publishConfig": {
|
|
65
|
+
"access": "public",
|
|
66
|
+
"registry": "https://registry.npmjs.org/"
|
|
67
|
+
},
|
|
68
|
+
"overrides": {
|
|
69
|
+
"lodash": ">=4.17.21",
|
|
70
|
+
"lodash-es": ">=4.17.21",
|
|
71
|
+
"dompurify": ">=3.3.4",
|
|
72
|
+
"fast-xml-parser": ">=4.5.5",
|
|
73
|
+
"@xmldom/xmldom": ">=0.8.12",
|
|
74
|
+
"swiper": ">=12.1.2",
|
|
75
|
+
"brace-expansion": ">=1.1.13",
|
|
76
|
+
"follow-redirects": ">=1.15.12",
|
|
77
|
+
"smol-toml": ">=1.6.1",
|
|
78
|
+
"axios": ">=1.15.0",
|
|
79
|
+
"flatted": ">=3.4.1",
|
|
80
|
+
"yaml": ">=2.8.3",
|
|
81
|
+
"picomatch": ">=2.3.2",
|
|
82
|
+
"immutable": ">=3.8.3",
|
|
83
|
+
"minimatch": ">=3.1.3",
|
|
84
|
+
"ip-address": "^10.7.6"
|
|
85
|
+
},
|
|
86
|
+
"packageManager": "bun@1.4.4",
|
|
87
|
+
"boff": {
|
|
88
|
+
"type": "mcp",
|
|
89
|
+
"sanity": {
|
|
90
|
+
"formatPaths": [
|
|
91
|
+
"src",
|
|
92
|
+
"tests"
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
"coverage": {
|
|
96
|
+
"global": 80,
|
|
97
|
+
"diff": 80,
|
|
98
|
+
"exclude": [
|
|
99
|
+
"src/index.ts"
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|