@heliyos/heliyos-mcp 0.0.0-stage → 1.0.0
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/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +38 -0
- package/.cursor-plugin/plugin.json +43 -0
- package/.mcp.json +12 -0
- package/LICENSE +21 -0
- package/README.md +497 -2
- package/dist/src/bin/stdio.d.ts +2 -0
- package/dist/src/bin/stdio.js +31 -0
- package/dist/src/client/generated.d.ts +1634 -0
- package/dist/src/client/generated.js +817 -0
- package/dist/src/client/http.d.ts +57 -0
- package/dist/src/client/http.js +225 -0
- package/dist/src/client/operations.d.ts +21 -0
- package/dist/src/client/operations.js +41 -0
- package/dist/src/config.d.ts +28 -0
- package/dist/src/config.js +60 -0
- package/dist/src/format/text.d.ts +56 -0
- package/dist/src/format/text.js +122 -0
- package/dist/src/index.d.ts +30 -0
- package/dist/src/index.js +84 -0
- package/dist/src/prompts.d.ts +7 -0
- package/dist/src/prompts.js +36 -0
- package/dist/src/resources.d.ts +12 -0
- package/dist/src/resources.js +45 -0
- package/dist/src/secrets.d.ts +26 -0
- package/dist/src/secrets.js +144 -0
- package/dist/src/tools/ask.d.ts +4 -0
- package/dist/src/tools/ask.js +427 -0
- package/dist/src/tools/baseSchemas.d.ts +50 -0
- package/dist/src/tools/baseSchemas.js +186 -0
- package/dist/src/tools/catalogs.d.ts +60 -0
- package/dist/src/tools/catalogs.js +219 -0
- package/dist/src/tools/common.d.ts +176 -0
- package/dist/src/tools/common.js +276 -0
- package/dist/src/tools/define.d.ts +69 -0
- package/dist/src/tools/define.js +94 -0
- package/dist/src/tools/errors.d.ts +15 -0
- package/dist/src/tools/errors.js +67 -0
- package/dist/src/tools/fields.d.ts +8 -0
- package/dist/src/tools/fields.js +305 -0
- package/dist/src/tools/files.d.ts +6 -0
- package/dist/src/tools/files.js +388 -0
- package/dist/src/tools/knowledge.d.ts +4 -0
- package/dist/src/tools/knowledge.js +211 -0
- package/dist/src/tools/labels.d.ts +4 -0
- package/dist/src/tools/labels.js +203 -0
- package/dist/src/tools/notes.d.ts +4 -0
- package/dist/src/tools/notes.js +199 -0
- package/dist/src/tools/notifications.d.ts +6 -0
- package/dist/src/tools/notifications.js +108 -0
- package/dist/src/tools/objects.d.ts +6 -0
- package/dist/src/tools/objects.js +287 -0
- package/dist/src/tools/organization.d.ts +4 -0
- package/dist/src/tools/organization.js +71 -0
- package/dist/src/tools/records.d.ts +130 -0
- package/dist/src/tools/records.js +628 -0
- package/dist/src/tools/reviews.d.ts +4 -0
- package/dist/src/tools/reviews.js +327 -0
- package/dist/src/tools/scouts.d.ts +4 -0
- package/dist/src/tools/scouts.js +618 -0
- package/dist/src/tools/tasks.d.ts +4 -0
- package/dist/src/tools/tasks.js +310 -0
- package/dist/src/tools/teams.d.ts +4 -0
- package/dist/src/tools/teams.js +178 -0
- package/dist/src/tools/timeline.d.ts +41 -0
- package/dist/src/tools/timeline.js +363 -0
- package/dist/src/tools/usage.d.ts +9 -0
- package/dist/src/tools/usage.js +127 -0
- package/dist/src/tools/watchlist.d.ts +4 -0
- package/dist/src/tools/watchlist.js +145 -0
- package/dist/src/tools/workers.d.ts +4 -0
- package/dist/src/tools/workers.js +349 -0
- package/dist/src/util.d.ts +2 -0
- package/dist/src/util.js +2 -0
- package/dist/src/version.d.ts +4 -0
- package/dist/src/version.js +7 -0
- package/mcp.json +10 -0
- package/package.json +89 -4
- package/plugin.json +19 -0
- package/server.json +48 -0
- package/skills/heliyos/SKILL.md +74 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "heliyos",
|
|
3
|
+
"description": "Heliyos plugins for Claude Code and Codex.",
|
|
4
|
+
"owner": {
|
|
5
|
+
"name": "Heliyos",
|
|
6
|
+
"url": "https://www.heliyos.ai"
|
|
7
|
+
},
|
|
8
|
+
"plugins": [
|
|
9
|
+
{
|
|
10
|
+
"name": "heliyos",
|
|
11
|
+
"source": "./",
|
|
12
|
+
"description": "Heliyos tools over MCP: customer records, notes, tasks, Scouts, reviews, knowledge and AI workers.",
|
|
13
|
+
"category": "productivity",
|
|
14
|
+
"tags": ["crm", "sales", "mcp"]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "heliyos",
|
|
3
|
+
"displayName": "Heliyos",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "Heliyos, the AI operating system for revenue, for your agent: customer records, notes, tasks, Scouts, reviews, knowledge and AI workers, through the Heliyos API with an API key.",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Heliyos",
|
|
8
|
+
"url": "https://www.heliyos.ai"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://docs.heliyos.ai/mcp/overview",
|
|
11
|
+
"repository": "https://github.com/heliyos-ai/heliyos-mcp",
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"crm",
|
|
15
|
+
"sales",
|
|
16
|
+
"heliyos",
|
|
17
|
+
"mcp"
|
|
18
|
+
],
|
|
19
|
+
"documentationUrl": "https://docs.heliyos.ai/mcp/overview",
|
|
20
|
+
"supportUrl": "https://github.com/heliyos-ai/heliyos-mcp/issues",
|
|
21
|
+
"privacyPolicyUrl": "https://www.heliyos.ai/privacy",
|
|
22
|
+
"termsOfServiceUrl": "https://www.heliyos.ai/terms",
|
|
23
|
+
"userConfig": {
|
|
24
|
+
"api_key": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"title": "Heliyos API key",
|
|
27
|
+
"description": "Create one in Heliyos under Settings → API keys. It starts with heliyos_ and is shown once.",
|
|
28
|
+
"required": true,
|
|
29
|
+
"sensitive": true
|
|
30
|
+
},
|
|
31
|
+
"base_url": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"title": "Heliyos API URL",
|
|
34
|
+
"description": "Leave as is unless Heliyos support gave you another API URL.",
|
|
35
|
+
"default": "https://api-prod.heliyos.ai"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "heliyos",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Heliyos, the AI operating system for revenue, for your agent: customer records, notes, tasks, Scouts, reviews, knowledge and AI workers.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Heliyos"
|
|
7
|
+
},
|
|
8
|
+
"homepage": "https://docs.heliyos.ai/mcp/overview",
|
|
9
|
+
"repository": "https://github.com/heliyos-ai/heliyos-mcp",
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"crm",
|
|
13
|
+
"sales",
|
|
14
|
+
"heliyos",
|
|
15
|
+
"mcp"
|
|
16
|
+
],
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"heliyos": {
|
|
19
|
+
"type": "stdio",
|
|
20
|
+
"command": "npx",
|
|
21
|
+
"args": [
|
|
22
|
+
"-y",
|
|
23
|
+
"@heliyos/heliyos-mcp"
|
|
24
|
+
],
|
|
25
|
+
"env": {
|
|
26
|
+
"HELIYOS_API_KEY": "${HELIYOS_API_KEY}"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"variables": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"HELIYOS_API_KEY": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"title": "Heliyos API key",
|
|
36
|
+
"description": "Create one in Heliyos under Settings → API keys. It starts with heliyos_ and is shown once."
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"HELIYOS_API_KEY"
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
}
|
package/.mcp.json
ADDED
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Heliyos
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,498 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://www.heliyos.ai">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/heliyos-ai/heliyos-mcp/main/assets/logo-dark.png">
|
|
5
|
+
<img alt="Heliyos" src="https://raw.githubusercontent.com/heliyos-ai/heliyos-mcp/main/assets/logo-light.png" width="220">
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
2
9
|
|
|
3
|
-
|
|
10
|
+
<h1 align="center">Heliyos MCP server</h1>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
Connect AI agents to <a href="https://www.heliyos.ai">Heliyos</a>, the AI operating system for revenue.
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://www.npmjs.com/package/@heliyos/heliyos-mcp"><img alt="npm version" src="https://img.shields.io/npm/v/%40heliyos%2Fmcp?label=npm"></a>
|
|
18
|
+
<a href="https://github.com/heliyos-ai/heliyos-mcp/actions/workflows/test.yml"><img alt="CI" src="https://github.com/heliyos-ai/heliyos-mcp/actions/workflows/test.yml/badge.svg"></a>
|
|
19
|
+
<a href="https://nodejs.org"><img alt="Node 20+" src="https://img.shields.io/badge/node-%3E%3D20-brightgreen"></a>
|
|
20
|
+
<a href="LICENSE"><img alt="MIT license" src="https://img.shields.io/badge/license-MIT-blue"></a>
|
|
21
|
+
<a href="https://modelcontextprotocol.io"><img alt="MCP" src="https://img.shields.io/badge/protocol-MCP-black"></a>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
`@heliyos/heliyos-mcp` is a [Model Context Protocol](https://modelcontextprotocol.io) server for [Heliyos](https://www.heliyos.ai). It runs on your machine over stdio and calls the [Heliyos API](https://docs.heliyos.ai/api-reference/introduction) with a workspace API key, so an agent in Claude Code, Codex, Cursor, VS Code, Antigravity or any other MCP client can work in your CRM.
|
|
25
|
+
|
|
26
|
+
**Documentation: [docs.heliyos.ai/mcp](https://docs.heliyos.ai/mcp/overview)** · [Install guides](https://docs.heliyos.ai/mcp/install) · [All tools](https://docs.heliyos.ai/mcp/tools/index) · [API reference](https://docs.heliyos.ai/api-reference/introduction) · [Changelog](CHANGELOG.md)
|
|
27
|
+
|
|
28
|
+
With it, an agent can:
|
|
29
|
+
|
|
30
|
+
- find and update companies, people, deals and custom objects, and add fields to them
|
|
31
|
+
- read a record's timeline, change history, emails and meetings
|
|
32
|
+
- write notes and tasks, and start Heliyos workers on a task
|
|
33
|
+
- list the reviews waiting for a person and approve or reject them
|
|
34
|
+
- create and configure workers from the trigger and tool catalogs
|
|
35
|
+
- manage scouts, read their signals and keep the watchlist
|
|
36
|
+
- read and edit the knowledge base, and upload the files the workers read
|
|
37
|
+
- hand a job to Heliyos with `heliyos_ask` and follow the run
|
|
38
|
+
|
|
39
|
+
Important actions that workers take still wait for review in Heliyos, so the team stays in control.
|
|
40
|
+
|
|
41
|
+
## Quick start
|
|
42
|
+
|
|
43
|
+
1. Create an API key in Heliyos under **Settings → API keys** (details [below](#before-you-start)).
|
|
44
|
+
2. Add the server to your client. For Claude Code:
|
|
45
|
+
|
|
46
|
+
```sh
|
|
47
|
+
claude mcp add --transport stdio --env HELIYOS_API_KEY=YOUR_HELIYOS_API_KEY --scope user heliyos -- npx -y @heliyos/heliyos-mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
3. Ask your agent *"Which Heliyos workspace am I connected to?"*. It calls `heliyos_organization_get` and answers with your workspace name.
|
|
51
|
+
|
|
52
|
+
Every other client is covered in [Install](#install).
|
|
53
|
+
|
|
54
|
+
## Contents
|
|
55
|
+
|
|
56
|
+
- [Quick start](#quick-start)
|
|
57
|
+
- [Before you start](#before-you-start)
|
|
58
|
+
- [Install](#install)
|
|
59
|
+
- [Tool timeout](#tool-timeout)
|
|
60
|
+
- [Configuration](#configuration)
|
|
61
|
+
- [Tools](#tools)
|
|
62
|
+
- [Security](#security)
|
|
63
|
+
- [Troubleshooting](#troubleshooting)
|
|
64
|
+
- [Development](#development)
|
|
65
|
+
- [Contributing](#contributing)
|
|
66
|
+
- [License](#license)
|
|
67
|
+
|
|
68
|
+
## Before you start
|
|
69
|
+
|
|
70
|
+
You need Node.js 20 or later (`node -v`) and a Heliyos API key.
|
|
71
|
+
|
|
72
|
+
To create a key:
|
|
73
|
+
|
|
74
|
+
1. Open Heliyos and go to **Settings → API keys** ([gtm.heliyos.ai/settings/api-keys](https://gtm.heliyos.ai/settings/api-keys)).
|
|
75
|
+
2. Click **New key**. Give it a name you will recognise, such as "Claude Code on my laptop", and an expiry date if you want one, then click **Create key**.
|
|
76
|
+
3. Copy the key. It starts with `heliyos_` and is shown once. If you lose it, revoke it and create a new one.
|
|
77
|
+
|
|
78
|
+
Only workspace owners and admins can create keys. A key has admin access to one workspace, the one you created it in, and to nothing else. Use one key per person and machine, so you can revoke one without breaking the others.
|
|
79
|
+
|
|
80
|
+
## Install
|
|
81
|
+
|
|
82
|
+
Every client runs the same command, `npx -y @heliyos/heliyos-mcp`, with your key in the `HELIYOS_API_KEY` environment variable. In the snippets below, replace `YOUR_HELIYOS_API_KEY` with your key.
|
|
83
|
+
|
|
84
|
+
### Claude Code
|
|
85
|
+
|
|
86
|
+
Install the plugin. It asks for your key and keeps it in your system's secure credential store, and it adds a skill that teaches Claude when to use which tool.
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
claude plugin marketplace add heliyos-ai/heliyos-mcp
|
|
90
|
+
claude plugin install heliyos@heliyos
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Or add only the MCP server:
|
|
94
|
+
|
|
95
|
+
```sh
|
|
96
|
+
claude mcp add --transport stdio --env HELIYOS_API_KEY=YOUR_HELIYOS_API_KEY --scope user heliyos -- npx -y @heliyos/heliyos-mcp
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
Check it with `claude mcp list`, or `/mcp` inside a session.
|
|
100
|
+
|
|
101
|
+
### Claude Desktop
|
|
102
|
+
|
|
103
|
+
Open **Settings → Developer → Edit Config** and add the server to `claude_desktop_config.json`, then restart Claude Desktop:
|
|
104
|
+
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"mcpServers": {
|
|
108
|
+
"heliyos": {
|
|
109
|
+
"command": "npx",
|
|
110
|
+
"args": ["-y", "@heliyos/heliyos-mcp"],
|
|
111
|
+
"env": { "HELIYOS_API_KEY": "YOUR_HELIYOS_API_KEY" }
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
This file stores the key in plain text, so keep it private. Custom connectors on claude.ai and in the Claude connector directory need a hosted (remote) MCP server with OAuth. Heliyos does not offer one yet, so use a local client for now.
|
|
118
|
+
|
|
119
|
+
### Codex
|
|
120
|
+
|
|
121
|
+
Add the server to `~/.codex/config.toml`:
|
|
122
|
+
|
|
123
|
+
```toml
|
|
124
|
+
[mcp_servers.heliyos]
|
|
125
|
+
command = "npx"
|
|
126
|
+
args = ["-y", "@heliyos/heliyos-mcp"]
|
|
127
|
+
env_vars = ["HELIYOS_API_KEY"]
|
|
128
|
+
startup_timeout_sec = 30
|
|
129
|
+
tool_timeout_sec = 120
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`env_vars` passes `HELIYOS_API_KEY` from the shell you start Codex in, so export it there (for example in `~/.zshrc`). To keep the key in the file instead, replace the `env_vars` line with an env table at the end:
|
|
133
|
+
|
|
134
|
+
```toml
|
|
135
|
+
[mcp_servers.heliyos.env]
|
|
136
|
+
HELIYOS_API_KEY = "YOUR_HELIYOS_API_KEY"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The CLI does the same in one line, after which you add `tool_timeout_sec = 120` to the table it writes:
|
|
140
|
+
|
|
141
|
+
```sh
|
|
142
|
+
codex mcp add heliyos --env HELIYOS_API_KEY=YOUR_HELIYOS_API_KEY -- npx -y @heliyos/heliyos-mcp
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
### Cursor
|
|
146
|
+
|
|
147
|
+
[Add Heliyos to Cursor](https://cursor.com/install-mcp?name=heliyos&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBoZWxpeW9zL2hlbGl5b3MtbWNwIl0sImVudiI6eyJIRUxJWU9TX0FQSV9LRVkiOiIke2VudjpIRUxJWU9TX0FQSV9LRVl9In19)
|
|
148
|
+
|
|
149
|
+
The link opens this deeplink, which you can also paste into your browser:
|
|
150
|
+
|
|
151
|
+
```text
|
|
152
|
+
cursor://anysphere.cursor-deeplink/mcp/install?name=heliyos&config=eyJ0eXBlIjoic3RkaW8iLCJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBoZWxpeW9zL2hlbGl5b3MtbWNwIl0sImVudiI6eyJIRUxJWU9TX0FQSV9LRVkiOiIke2VudjpIRUxJWU9TX0FQSV9LRVl9In19
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
It adds this entry to `~/.cursor/mcp.json`:
|
|
156
|
+
|
|
157
|
+
```json
|
|
158
|
+
{
|
|
159
|
+
"mcpServers": {
|
|
160
|
+
"heliyos": {
|
|
161
|
+
"type": "stdio",
|
|
162
|
+
"command": "npx",
|
|
163
|
+
"args": ["-y", "@heliyos/heliyos-mcp"],
|
|
164
|
+
"env": { "HELIYOS_API_KEY": "${env:HELIYOS_API_KEY}" }
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Cursor reads `${env:HELIYOS_API_KEY}` from its own environment. Export the variable in your shell profile and start Cursor from that shell, or replace the value with your key. Run `npm run install-links` in this repository to print the links again.
|
|
171
|
+
|
|
172
|
+
### VS Code
|
|
173
|
+
|
|
174
|
+
[Install Heliyos in VS Code](https://vscode.dev/redirect/mcp/install?name=heliyos&inputs=%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22heliyos-api-key%22%2C%22description%22%3A%22Heliyos+API+key+%28Settings+%E2%86%92+API+keys%29%22%2C%22password%22%3Atrue%7D%5D&config=%7B%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40heliyos%2Fheliyos-mcp%22%5D%2C%22env%22%3A%7B%22HELIYOS_API_KEY%22%3A%22%24%7Binput%3Aheliyos-api-key%7D%22%7D%7D)
|
|
175
|
+
|
|
176
|
+
The link opens this deeplink, which you can also paste into your browser:
|
|
177
|
+
|
|
178
|
+
```text
|
|
179
|
+
vscode:mcp/install?%7B%22name%22%3A%22heliyos%22%2C%22inputs%22%3A%5B%7B%22type%22%3A%22promptString%22%2C%22id%22%3A%22heliyos-api-key%22%2C%22description%22%3A%22Heliyos%20API%20key%20(Settings%20%E2%86%92%20API%20keys)%22%2C%22password%22%3Atrue%7D%5D%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40heliyos%2Fheliyos-mcp%22%5D%2C%22env%22%3A%7B%22HELIYOS_API_KEY%22%3A%22%24%7Binput%3Aheliyos-api-key%7D%22%7D%7D)%22%2C%22password%22%3Atrue%7D%5D%2C%22type%22%3A%22stdio%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40heliyos%2Fmcp%22%5D%2C%22env%22%3A%7B%22HELIYOS_API_KEY%22%3A%22%24%7Binput%3Aheliyos-api-key%7D%22%7D%7D
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
VS Code asks for the key the first time the server starts and keeps it in its secret storage. To set it up by hand, add this to `.vscode/mcp.json` in a project, or to your user `mcp.json` (**MCP: Open User Configuration**):
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"inputs": [
|
|
187
|
+
{
|
|
188
|
+
"type": "promptString",
|
|
189
|
+
"id": "heliyos-api-key",
|
|
190
|
+
"description": "Heliyos API key (Settings → API keys)",
|
|
191
|
+
"password": true
|
|
192
|
+
}
|
|
193
|
+
],
|
|
194
|
+
"servers": {
|
|
195
|
+
"heliyos": {
|
|
196
|
+
"type": "stdio",
|
|
197
|
+
"command": "npx",
|
|
198
|
+
"args": ["-y", "@heliyos/heliyos-mcp"],
|
|
199
|
+
"env": { "HELIYOS_API_KEY": "${input:heliyos-api-key}" }
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Antigravity
|
|
206
|
+
|
|
207
|
+
In the agent panel, open **… → MCP Servers → Manage MCP Servers → View raw config**, or edit `~/.gemini/config/mcp_config.json` directly (`.agents/mcp_config.json` for one project):
|
|
208
|
+
|
|
209
|
+
```json
|
|
210
|
+
{
|
|
211
|
+
"mcpServers": {
|
|
212
|
+
"heliyos": {
|
|
213
|
+
"command": "npx",
|
|
214
|
+
"args": ["-y", "@heliyos/heliyos-mcp"],
|
|
215
|
+
"env": { "HELIYOS_API_KEY": "YOUR_HELIYOS_API_KEY" }
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
### Any other client
|
|
222
|
+
|
|
223
|
+
Run the package over stdio with the key in the environment:
|
|
224
|
+
|
|
225
|
+
```sh
|
|
226
|
+
HELIYOS_API_KEY=YOUR_HELIYOS_API_KEY npx -y @heliyos/heliyos-mcp
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The repository also ships portable [Agent Plugins](https://agent-plugins.org) manifests (`plugin.json` and `mcp.json`) for clients that install plugins from a Git repository. They do not carry a key, so set `HELIYOS_API_KEY` in the environment your client starts servers with. In the MCP Registry the server is listed as `ai.heliyos/crm`.
|
|
230
|
+
|
|
231
|
+
## Tool timeout
|
|
232
|
+
|
|
233
|
+
`heliyos_ask` waits up to 90 seconds for Heliyos to answer, so give tool calls at least 120 seconds.
|
|
234
|
+
|
|
235
|
+
| Client | Setting |
|
|
236
|
+
| --- | --- |
|
|
237
|
+
| Codex | `tool_timeout_sec = 120` in the `[mcp_servers.heliyos]` table (the default is 60). Installed as a plugin from a marketplace, Codex keeps the 60 second default, because the plugin's `.mcp.json` cannot carry `tool_timeout_sec`, so a long `heliyos_ask` stops at 60 seconds; use the `config.toml` setup above for 120. |
|
|
238
|
+
| Claude Code | The default is long enough. If you set `MCP_TOOL_TIMEOUT`, keep it at 120000 or more, for example `MCP_TOOL_TIMEOUT=120000 claude`. |
|
|
239
|
+
| Claude Desktop | No documented setting. |
|
|
240
|
+
| Cursor | No documented tool timeout setting. |
|
|
241
|
+
| VS Code | No documented tool timeout setting. |
|
|
242
|
+
| Antigravity | No documented tool timeout setting. |
|
|
243
|
+
|
|
244
|
+
When a client cuts a call short, the run keeps going in Heliyos. Find it with `heliyos_runs_list` and follow it with `heliyos_runs_get` and `wait: true`, which waits up to 30 seconds per call.
|
|
245
|
+
|
|
246
|
+
A rate-limited request (HTTP 429) is retried once after the `Retry-After` delay, capped at 30 s, so a `heliyos_ask` that hits the limit can take about 125 seconds. If you see timeouts while you are near the limit, raise the timeout to 150 seconds.
|
|
247
|
+
|
|
248
|
+
## Configuration
|
|
249
|
+
|
|
250
|
+
| Variable | Required | Default | What it does |
|
|
251
|
+
| --- | --- | --- | --- |
|
|
252
|
+
| `HELIYOS_API_KEY` | Yes | None | Your Heliyos API key. It must start with `heliyos_`. |
|
|
253
|
+
| `HELIYOS_BASE_URL` | No | `https://api-prod.heliyos.ai` | The Heliyos API to call. It must use https; plain http is accepted only for localhost. |
|
|
254
|
+
| `HELIYOS_MCP_EXPERIMENTAL` | No | Off | `1`, `true`, `yes` or `on` adds the experimental tools marked below. |
|
|
255
|
+
|
|
256
|
+
The server also offers a resource template, `heliyos://records/{id}`, which returns one record as JSON, and two prompts: `prepare_account_review` (for one company) and `daily_pipeline_summary`.
|
|
257
|
+
|
|
258
|
+
## Tools
|
|
259
|
+
|
|
260
|
+
Every tool is named `heliyos_<resource>_<verb>` and declares whether it reads, writes or deletes, so your client can ask before it changes anything. Reads take `response_format` (`concise` or `detailed`), and lists take `limit` and `cursor`.
|
|
261
|
+
|
|
262
|
+
<!-- tools:start (generated by scripts/tool-table.mjs; do not edit) -->
|
|
263
|
+
73 tools by default, and 4 more with `HELIYOS_MCP_EXPERIMENTAL=1`. Kind is read (no changes), write (creates or updates) or destructive (deletes or removes).
|
|
264
|
+
|
|
265
|
+
#### Records
|
|
266
|
+
|
|
267
|
+
| Tool | What it does | Kind |
|
|
268
|
+
| --- | --- | --- |
|
|
269
|
+
| `heliyos_records_list` | List records | read |
|
|
270
|
+
| `heliyos_records_get` | Get a record | read |
|
|
271
|
+
| `heliyos_records_create` | Create a record | write |
|
|
272
|
+
| `heliyos_records_update` | Update a record | write |
|
|
273
|
+
| `heliyos_records_delete` | Delete records | destructive |
|
|
274
|
+
| `heliyos_records_lookup` | Find records by name | read |
|
|
275
|
+
| `heliyos_records_enrich` | Enrich a person (experimental) | write |
|
|
276
|
+
|
|
277
|
+
#### Timeline and activity
|
|
278
|
+
|
|
279
|
+
| Tool | What it does | Kind |
|
|
280
|
+
| --- | --- | --- |
|
|
281
|
+
| `heliyos_records_timeline` | Read a record's timeline | read |
|
|
282
|
+
| `heliyos_records_events` | Read a record's change history | read |
|
|
283
|
+
| `heliyos_interactions_list` | List emails and meetings | read |
|
|
284
|
+
| `heliyos_interactions_get` | Get an email or meeting | read |
|
|
285
|
+
|
|
286
|
+
#### Workspace, objects and fields
|
|
287
|
+
|
|
288
|
+
| Tool | What it does | Kind |
|
|
289
|
+
| --- | --- | --- |
|
|
290
|
+
| `heliyos_organization_get` | Get the workspace | read |
|
|
291
|
+
| `heliyos_objects_list` | List objects | read |
|
|
292
|
+
| `heliyos_objects_get` | Get an object's fields | read |
|
|
293
|
+
| `heliyos_objects_create` | Create a custom object (experimental) | write |
|
|
294
|
+
| `heliyos_objects_update` | Rename or describe an object (experimental) | write |
|
|
295
|
+
| `heliyos_objects_delete` | Delete a custom object (experimental) | destructive |
|
|
296
|
+
| `heliyos_fields_create` | Add a field to an object | write |
|
|
297
|
+
| `heliyos_fields_update` | Change a field | destructive |
|
|
298
|
+
| `heliyos_fields_delete` | Delete a field | destructive |
|
|
299
|
+
|
|
300
|
+
#### Notes
|
|
301
|
+
|
|
302
|
+
| Tool | What it does | Kind |
|
|
303
|
+
| --- | --- | --- |
|
|
304
|
+
| `heliyos_notes_list` | List notes | read |
|
|
305
|
+
| `heliyos_notes_get` | Get a note | read |
|
|
306
|
+
| `heliyos_notes_create` | Create a note | write |
|
|
307
|
+
| `heliyos_notes_update` | Update a note | write |
|
|
308
|
+
| `heliyos_notes_delete` | Delete a note | destructive |
|
|
309
|
+
|
|
310
|
+
#### Tasks
|
|
311
|
+
|
|
312
|
+
| Tool | What it does | Kind |
|
|
313
|
+
| --- | --- | --- |
|
|
314
|
+
| `heliyos_tasks_list` | List tasks | read |
|
|
315
|
+
| `heliyos_tasks_get` | Get a task | read |
|
|
316
|
+
| `heliyos_tasks_events` | Read a task's activity | read |
|
|
317
|
+
| `heliyos_tasks_create` | Create a task | write |
|
|
318
|
+
| `heliyos_tasks_update` | Update a task | write |
|
|
319
|
+
| `heliyos_tasks_delete` | Delete a task | destructive |
|
|
320
|
+
| `heliyos_tasks_run` | Run workers on a task | destructive |
|
|
321
|
+
|
|
322
|
+
#### Scouts and signals
|
|
323
|
+
|
|
324
|
+
| Tool | What it does | Kind |
|
|
325
|
+
| --- | --- | --- |
|
|
326
|
+
| `heliyos_scouts_list` | List scouts | read |
|
|
327
|
+
| `heliyos_scouts_get` | Get a scout | read |
|
|
328
|
+
| `heliyos_scouts_create` | Create a scout | write |
|
|
329
|
+
| `heliyos_scouts_update` | Update a scout | write |
|
|
330
|
+
| `heliyos_scouts_delete` | Delete a scout | destructive |
|
|
331
|
+
| `heliyos_companies_scouts_list` | List a company's scouts | read |
|
|
332
|
+
| `heliyos_companies_scouts_add` | Add scouts to a company | write |
|
|
333
|
+
| `heliyos_companies_scouts_remove` | Remove a company's scouts | destructive |
|
|
334
|
+
| `heliyos_signals_list` | List signals | read |
|
|
335
|
+
| `heliyos_signals_mark_read` | Mark signals read | write |
|
|
336
|
+
|
|
337
|
+
#### Ask, runs and reviews
|
|
338
|
+
|
|
339
|
+
| Tool | What it does | Kind |
|
|
340
|
+
| --- | --- | --- |
|
|
341
|
+
| `heliyos_ask` | Ask Heliyos | destructive |
|
|
342
|
+
| `heliyos_runs_get` | Get a run | read |
|
|
343
|
+
| `heliyos_runs_list` | List runs | read |
|
|
344
|
+
| `heliyos_reviews_list` | List reviews | read |
|
|
345
|
+
| `heliyos_reviews_get` | Get a review | read |
|
|
346
|
+
| `heliyos_reviews_decide` | Approve or reject a review | destructive |
|
|
347
|
+
|
|
348
|
+
#### Workers, triggers and tools
|
|
349
|
+
|
|
350
|
+
| Tool | What it does | Kind |
|
|
351
|
+
| --- | --- | --- |
|
|
352
|
+
| `heliyos_workers_list` | List workers | read |
|
|
353
|
+
| `heliyos_workers_get` | Get a worker | read |
|
|
354
|
+
| `heliyos_workers_create` | Create a worker | write |
|
|
355
|
+
| `heliyos_workers_update` | Update a worker | write |
|
|
356
|
+
| `heliyos_workers_delete` | Delete a worker | destructive |
|
|
357
|
+
| `heliyos_triggers_list` | List worker triggers | read |
|
|
358
|
+
| `heliyos_workers_tools_list` | List tools a worker can use | read |
|
|
359
|
+
|
|
360
|
+
#### Knowledge base and files
|
|
361
|
+
|
|
362
|
+
| Tool | What it does | Kind |
|
|
363
|
+
| --- | --- | --- |
|
|
364
|
+
| `heliyos_knowledge_get` | Read the knowledge base | read |
|
|
365
|
+
| `heliyos_knowledge_update` | Update the knowledge base | write |
|
|
366
|
+
| `heliyos_knowledge_entries_set` | Add or change a knowledge entry | write |
|
|
367
|
+
| `heliyos_knowledge_entries_delete` | Delete a knowledge entry | destructive |
|
|
368
|
+
| `heliyos_files_list` | List files | read |
|
|
369
|
+
| `heliyos_files_get` | Get a file | read |
|
|
370
|
+
| `heliyos_files_upload` | Upload a file | write |
|
|
371
|
+
| `heliyos_files_delete` | Delete a file | destructive |
|
|
372
|
+
|
|
373
|
+
#### Watchlist
|
|
374
|
+
|
|
375
|
+
| Tool | What it does | Kind |
|
|
376
|
+
| --- | --- | --- |
|
|
377
|
+
| `heliyos_watchlist_get` | Get the watchlist | read |
|
|
378
|
+
| `heliyos_companies_watch` | Watch a company | write |
|
|
379
|
+
| `heliyos_companies_unwatch` | Unwatch a company | destructive |
|
|
380
|
+
|
|
381
|
+
#### Labels
|
|
382
|
+
|
|
383
|
+
| Tool | What it does | Kind |
|
|
384
|
+
| --- | --- | --- |
|
|
385
|
+
| `heliyos_labels_list` | List label groups | read |
|
|
386
|
+
| `heliyos_labels_create` | Create a label group | write |
|
|
387
|
+
| `heliyos_labels_update` | Update a label group | destructive |
|
|
388
|
+
| `heliyos_labels_delete` | Delete a label group | destructive |
|
|
389
|
+
|
|
390
|
+
#### Team
|
|
391
|
+
|
|
392
|
+
| Tool | What it does | Kind |
|
|
393
|
+
| --- | --- | --- |
|
|
394
|
+
| `heliyos_team_members_list` | List team members | read |
|
|
395
|
+
| `heliyos_team_members_invite` | Invite a team member | write |
|
|
396
|
+
| `heliyos_team_members_remove` | Remove a team member | destructive |
|
|
397
|
+
| `heliyos_team_members_change_role` | Change a team member's role | write |
|
|
398
|
+
|
|
399
|
+
#### Notification settings
|
|
400
|
+
|
|
401
|
+
| Tool | What it does | Kind |
|
|
402
|
+
| --- | --- | --- |
|
|
403
|
+
| `heliyos_notification_settings_get` | Get notification settings | read |
|
|
404
|
+
| `heliyos_notification_settings_update` | Update notification settings | write |
|
|
405
|
+
|
|
406
|
+
#### Usage
|
|
407
|
+
|
|
408
|
+
| Tool | What it does | Kind |
|
|
409
|
+
| --- | --- | --- |
|
|
410
|
+
| `heliyos_usage_get` | Get credit usage | read |
|
|
411
|
+
<!-- tools:end -->
|
|
412
|
+
|
|
413
|
+
## Security
|
|
414
|
+
|
|
415
|
+
- **Your key stays on your machine.** The server reads it from its environment and sends it only to the Heliyos API (`HELIYOS_BASE_URL`), as a bearer token over https. It refuses a base URL that is not https, other than localhost.
|
|
416
|
+
- **File uploads skip the key.** File content goes to a short-lived signed storage URL, and that request does not carry your key.
|
|
417
|
+
- **No telemetry.** The server sends nothing anywhere else and keeps no logs. Diagnostics go to your client's stderr, and error messages have keys removed.
|
|
418
|
+
- **Rate limits.** The API allows 60 requests per minute per key, and per IP address. When it answers 429, the server waits for `Retry-After` and retries once.
|
|
419
|
+
- **Least access.** A key has admin rights in one workspace. Give it an expiry, keep one key per person and machine, and revoke it in **Settings → API keys** when you no longer need it.
|
|
420
|
+
- **Destructive tools are marked.** Deletes and removals are annotated as destructive, and the agent skill tells agents to confirm them first.
|
|
421
|
+
|
|
422
|
+
Report a security issue privately through [GitHub security advisories](https://github.com/heliyos-ai/heliyos-mcp/security/advisories/new) rather than in a public issue.
|
|
423
|
+
|
|
424
|
+
## Troubleshooting
|
|
425
|
+
|
|
426
|
+
| What you see | What to do |
|
|
427
|
+
| --- | --- |
|
|
428
|
+
| `heliyos-mcp: Set HELIYOS_API_KEY to a Heliyos API key` | The client did not pass the key. Check the `env` block, or that the variable is exported in the shell that started the client. |
|
|
429
|
+
| `HELIYOS_API_KEY does not look like a Heliyos API key` | The value is not a Heliyos key. Keys start with `heliyos_`. Copy it again or create a new one. |
|
|
430
|
+
| `UNAUTHENTICATED` | The key was revoked, has expired or was mistyped. Create a new key in **Settings → API keys**. |
|
|
431
|
+
| `FORBIDDEN_ACTION` | The workspace plan or billing status does not allow the action, or the action is not available to API keys. |
|
|
432
|
+
| `RATE_LIMITED` | You are above 60 requests per minute. Wait a minute, and prefer list calls over many single gets. |
|
|
433
|
+
| `heliyos_ask` times out | Raise the client's tool timeout (see [Tool timeout](#tool-timeout)). The run keeps going; follow it with `heliyos_runs_get`. |
|
|
434
|
+
| The server does not start or shows no tools | Check `node -v` is 20 or later. The first start downloads the package, which can take longer than a 10 second startup timeout; raise it (Codex `startup_timeout_sec`, Claude Code `MCP_TIMEOUT`). Apps opened from the dock may not find `npx`; use its full path from `which npx`. |
|
|
435
|
+
| Experimental tools are missing | Set `HELIYOS_MCP_EXPERIMENTAL=1` and restart the client. |
|
|
436
|
+
|
|
437
|
+
Still stuck? Open an issue at [github.com/heliyos-ai/heliyos-mcp/issues](https://github.com/heliyos-ai/heliyos-mcp/issues). Never paste your key.
|
|
438
|
+
|
|
439
|
+
## Development
|
|
440
|
+
|
|
441
|
+
Requirements: Node.js 20 or later and npm. Everything else is a dev dependency.
|
|
442
|
+
|
|
443
|
+
```sh
|
|
444
|
+
git clone https://github.com/heliyos-ai/heliyos-mcp.git
|
|
445
|
+
cd heliyos-mcp
|
|
446
|
+
npm ci
|
|
447
|
+
npm test # unit tests with a mocked Heliyos API
|
|
448
|
+
npm run typecheck
|
|
449
|
+
npm run build # codegen, then tsc into dist/
|
|
450
|
+
npm run readme:tools # regenerate the tool table above
|
|
451
|
+
npm run install-links # print the Cursor and VS Code install links
|
|
452
|
+
npm run prepublish:check # manifests, versions and package contents
|
|
453
|
+
HELIYOS_API_KEY=YOUR_HELIYOS_API_KEY npm run smoke # read-only checks against a real workspace
|
|
454
|
+
```
|
|
455
|
+
|
|
456
|
+
To run your local build in a client instead of the published package, point the client at `dist/src/bin/stdio.js`:
|
|
457
|
+
|
|
458
|
+
```sh
|
|
459
|
+
claude mcp add --transport stdio --env HELIYOS_API_KEY=YOUR_HELIYOS_API_KEY --scope user heliyos-dev -- node /path/to/heliyos-mcp/dist/src/bin/stdio.js
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
### How it is built
|
|
463
|
+
|
|
464
|
+
- `src/client/openapi/` holds copies of the Heliyos API's OpenAPI documents. `npm run codegen` turns them into a typed operation table (`src/client/generated.ts`) with zod schemas, so every request is validated before it is sent.
|
|
465
|
+
- `src/tools/` defines one file per resource. Each tool declares its input and output schemas, its annotations (read, write or destructive) and a handler that calls one or two API operations and renders a short text plus `structuredContent`.
|
|
466
|
+
- `tests/` runs every tool against a mocked API with msw. A snapshot test pins the public tool contract (names, annotations, input keys), so an accidental change fails the build.
|
|
467
|
+
- `skills/heliyos/SKILL.md` ships with the Claude Code plugin and teaches the agent when to use which tool.
|
|
468
|
+
|
|
469
|
+
### Updating the API client
|
|
470
|
+
|
|
471
|
+
When the Heliyos API changes, save the new OpenAPI documents and resync:
|
|
472
|
+
|
|
473
|
+
```sh
|
|
474
|
+
curl -s https://api-prod.heliyos.ai/v1/platform/openapi.json -o /tmp/platform.json
|
|
475
|
+
curl -s https://api-prod.heliyos.ai/v1/auth/openapi.json -o /tmp/auth.json
|
|
476
|
+
HELIYOS_PLATFORM_OPENAPI=/tmp/platform.json HELIYOS_AUTH_OPENAPI=/tmp/auth.json npm run sync-openapi
|
|
477
|
+
npm run codegen && npm test
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
With those two variables set, `npm run prepublish:check` and the drift test also refuse a bundled copy that no longer matches.
|
|
481
|
+
|
|
482
|
+
### Releasing
|
|
483
|
+
|
|
484
|
+
Releases are published by GitHub Actions on every push to `main` (`.github/workflows/publish-package.yml`):
|
|
485
|
+
|
|
486
|
+
1. CI builds, tests and checks the package and manifests.
|
|
487
|
+
2. If the version in `package.json` is already on npm, the workflow bumps the patch version with `node scripts/set-version.mjs`, which keeps `package.json`, the lockfile, `server.json`, every plugin manifest and `src/version.ts` on the same version, and commits the bump.
|
|
488
|
+
3. It publishes to npm with provenance through npm trusted publishing (no token is stored anywhere), waits until the version is served, and then publishes `server.json` to the MCP registry when the `MCP_PRIVATE_KEY` secret is configured.
|
|
489
|
+
|
|
490
|
+
To cut a specific version, run `node scripts/set-version.mjs 1.2.0`, commit, and push to `main`. See [CONTRIBUTING.md](CONTRIBUTING.md) for the one-time repository setup.
|
|
491
|
+
|
|
492
|
+
## Contributing
|
|
493
|
+
|
|
494
|
+
Issues and pull requests are welcome. Read [CONTRIBUTING.md](CONTRIBUTING.md) for the workflow, the coding rules and how to add a tool, and [SECURITY.md](SECURITY.md) for how to report a vulnerability. By participating you agree to the [code of conduct](CODE_OF_CONDUCT.md).
|
|
495
|
+
|
|
496
|
+
## License
|
|
497
|
+
|
|
498
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* stdio entry point: `npx -y @heliyos/heliyos-mcp`. stdout carries MCP protocol
|
|
4
|
+
* messages only; diagnostics go to stderr and never include the API key.
|
|
5
|
+
*/
|
|
6
|
+
import { serveStdio, StdioServerTransport } from "@modelcontextprotocol/server/stdio";
|
|
7
|
+
import { createClient } from "../client/http.js";
|
|
8
|
+
import { ConfigError, loadConfig } from "../config.js";
|
|
9
|
+
import { createServer } from "../index.js";
|
|
10
|
+
function main() {
|
|
11
|
+
let config;
|
|
12
|
+
try {
|
|
13
|
+
config = loadConfig();
|
|
14
|
+
}
|
|
15
|
+
catch (err) {
|
|
16
|
+
if (err instanceof ConfigError) {
|
|
17
|
+
process.stderr.write(`heliyos-mcp: ${err.message}\n`);
|
|
18
|
+
process.exit(1);
|
|
19
|
+
}
|
|
20
|
+
throw err;
|
|
21
|
+
}
|
|
22
|
+
const client = createClient({ baseUrl: config.baseUrl, apiKey: config.apiKey });
|
|
23
|
+
const options = { experimental: config.experimental };
|
|
24
|
+
// serveStdio picks the protocol era from the client's opening message and
|
|
25
|
+
// pins one server instance from the factory for the connection.
|
|
26
|
+
serveStdio(() => createServer(client, options), {
|
|
27
|
+
transport: new StdioServerTransport(),
|
|
28
|
+
onerror: (error) => process.stderr.write(`heliyos-mcp: ${error.message}\n`),
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
main();
|