@vectros-ai/mcp-server 0.5.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/CHANGELOG.md +38 -0
- package/LICENSE +201 -0
- package/README.md +298 -0
- package/dist/cli-http.d.mts +1 -0
- package/dist/cli-http.d.ts +1 -0
- package/dist/cli-http.js +10798 -0
- package/dist/cli-http.js.map +1 -0
- package/dist/cli-http.mjs +10780 -0
- package/dist/cli-http.mjs.map +1 -0
- package/dist/cli.d.mts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +10647 -0
- package/dist/cli.js.map +1 -0
- package/dist/cli.mjs +10629 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/index.d.mts +215 -0
- package/dist/index.d.ts +215 -0
- package/dist/index.js +10578 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +10541 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +66 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to `@vectros-ai/mcp-server` are documented here.
|
|
4
|
+
This project adheres to [Semantic Versioning](https://semver.org).
|
|
5
|
+
|
|
6
|
+
## 0.5.0 — 2026-06-20
|
|
7
|
+
|
|
8
|
+
Initial public release of the Vectros MCP server.
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- A [Model Context Protocol](https://modelcontextprotocol.io) server exposing the
|
|
13
|
+
Vectros data plane to MCP-aware agents (Claude Desktop, Cursor, Code, Cline,
|
|
14
|
+
Continue, VS Code, and hosted agent platforms) as **21 data-plane tools** — and
|
|
15
|
+
only data-plane tools (no web or external-search surface, by design).
|
|
16
|
+
- Full data-plane coverage:
|
|
17
|
+
- **Hybrid search** with keyword-precision and relevance controls, ownership /
|
|
18
|
+
folder / type / metadata / date scoping.
|
|
19
|
+
- **Structured records** — create / read / update / delete / query, with field
|
|
20
|
+
lookups (equality, range, prefix; ascending or descending) and idempotent
|
|
21
|
+
create by `externalId`.
|
|
22
|
+
- **Documents** — idempotent, optionally-typed ingest (inline text or file
|
|
23
|
+
upload), retrieval (metadata, text, or a presigned download URL), update,
|
|
24
|
+
delete, and query / lookup.
|
|
25
|
+
- **Folders** — create / read / update / delete, with pagination.
|
|
26
|
+
- **In-perimeter inference** — retrieval-augmented generation (with retrieval
|
|
27
|
+
scoping and prompt steering) and single-document Q&A.
|
|
28
|
+
- **Discovery & history** — schema catalog, current-credential identity,
|
|
29
|
+
identity resolution (look up a user / org / client by your own id), and
|
|
30
|
+
record / document version history.
|
|
31
|
+
- Optimistic concurrency (`expectedVersion`) on record / document / folder
|
|
32
|
+
updates; results are bounded with MCP-specific limits to protect the agent
|
|
33
|
+
context window.
|
|
34
|
+
- One-command start: `npx -y @vectros-ai/mcp-server`.
|
|
35
|
+
- Pairs with `@vectros-ai/cli bootstrap`, which mints a least-privilege scoped
|
|
36
|
+
key so the server never needs your root credential.
|
|
37
|
+
- Fail-closed configuration: the server refuses to start on a missing or invalid
|
|
38
|
+
base URL, or on an insecure network bind.
|
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 Derivative
|
|
95
|
+
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 2026 Vectros
|
|
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,298 @@
|
|
|
1
|
+
# @vectros-ai/mcp-server
|
|
2
|
+
|
|
3
|
+
A [Model Context Protocol](https://modelcontextprotocol.io) server
|
|
4
|
+
that exposes Vectros — hybrid search, structured records, documents,
|
|
5
|
+
and in-perimeter RAG / document Q&A — to MCP-aware agents (Claude
|
|
6
|
+
Desktop, Cursor, Code, Cline, Continue, VS Code, hosted agent
|
|
7
|
+
platforms).
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
npx -y @vectros-ai/mcp-server
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Your agent can search your indexed corpus, query structured records,
|
|
14
|
+
ingest documents, and ask questions grounded against documents — all
|
|
15
|
+
without leaving the BAA boundary.
|
|
16
|
+
|
|
17
|
+
## Quick start — one command
|
|
18
|
+
|
|
19
|
+
The fastest way to set up is the [`@vectros-ai/cli`](https://www.npmjs.com/package/@vectros-ai/cli)
|
|
20
|
+
`bootstrap` command. It mints a **least-privilege scoped key** (`ssk_*`)
|
|
21
|
+
bound to a narrowed AccessProfile, optionally scaffolds a use-case data
|
|
22
|
+
model, and safe-merges the `vectros` server into your MCP client config —
|
|
23
|
+
no root key, and no hand-editing JSON:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx -y @vectros-ai/cli bootstrap
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
You pick what to set up (a blank read-only credential, or a **blueprint**
|
|
30
|
+
like task tracking) and sign in once with a token from the
|
|
31
|
+
developer portal. The command then:
|
|
32
|
+
|
|
33
|
+
- mints a scoped `ssk_*` for **this machine** (independently rotatable),
|
|
34
|
+
- creates the matching AccessProfile — **data-plane only**; the command
|
|
35
|
+
refuses to provision control-plane scope (keys / profiles / billing / …),
|
|
36
|
+
- backs up and merges the entry into `claude_desktop_config.json` (Claude
|
|
37
|
+
Desktop, Cursor, Cline). For **Claude Code**, add `--client code`: it merges
|
|
38
|
+
the project `.mcp.json` and prints the equivalent `claude mcp add` command.
|
|
39
|
+
|
|
40
|
+
Restart your MCP client and you're done. It's idempotent (re-run any time);
|
|
41
|
+
`--rotate` replaces this machine's key.
|
|
42
|
+
|
|
43
|
+
For scripted / agent use, set the sign-in token in the environment and skip
|
|
44
|
+
the prompts:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
VECTROS_BOOTSTRAP_TOKEN=… npx -y @vectros-ai/cli bootstrap \
|
|
48
|
+
--blueprint task-management --yes
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Prefer to wire it up by hand? See **Configure manually** below.
|
|
52
|
+
|
|
53
|
+
## Configure manually (Claude Desktop or any MCP client)
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"mcpServers": {
|
|
58
|
+
"vectros": {
|
|
59
|
+
"command": "npx",
|
|
60
|
+
"args": ["-y", "@vectros-ai/mcp-server"],
|
|
61
|
+
"env": {
|
|
62
|
+
"VECTROS_API_KEY": "ssk_live_..."
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Restart Claude Desktop. The agent now sees the Vectros tools and
|
|
70
|
+
two resources as callable surfaces.
|
|
71
|
+
|
|
72
|
+
## Configure manually (Claude Code)
|
|
73
|
+
|
|
74
|
+
Claude Code reads a project-scoped `.mcp.json` with the same shape — drop this
|
|
75
|
+
at your project root (commit it to share the server with the repo):
|
|
76
|
+
|
|
77
|
+
```json
|
|
78
|
+
{
|
|
79
|
+
"mcpServers": {
|
|
80
|
+
"vectros": {
|
|
81
|
+
"command": "npx",
|
|
82
|
+
"args": ["-y", "@vectros-ai/mcp-server"],
|
|
83
|
+
"env": {
|
|
84
|
+
"VECTROS_API_KEY": "ssk_live_..."
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Or let Claude Code's CLI write it for you:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
claude mcp add vectros -e VECTROS_API_KEY=ssk_live_... -- npx -y @vectros-ai/mcp-server
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Add `-e VECTROS_API_BASE_URL=https://api.staging.vectros.ai` for a non-production
|
|
98
|
+
environment. Reopen the project in Claude Code and the Vectros tools are
|
|
99
|
+
available.
|
|
100
|
+
|
|
101
|
+
## Tools (21 tools)
|
|
102
|
+
|
|
103
|
+
**Search & RAG**
|
|
104
|
+
|
|
105
|
+
| Tool | What it does |
|
|
106
|
+
|---|---|
|
|
107
|
+
| `hybrid_search` | Hybrid BM25 + dense search across the tenant's indexed content (records + documents). Narrow by ownership, folder, type, metadata filters, a created date window, and keyword-precision (`textMode`) / relevance floors. Returns the indexed projection of each hit. |
|
|
108
|
+
| `rag_ask` | Ask a question grounded against the indexed corpus. Scope retrieval (ownership / folder / type / metadata filters / date window) and steer generation (`instructions` / `temperature`). Streaming generation aggregated; progress notifications keep the call alive for the generation window. |
|
|
109
|
+
| `document_ask` | Ask a question grounded against a single document. Same aggregation + progress-notification shape as `rag_ask`. |
|
|
110
|
+
|
|
111
|
+
**Records** (structured, schema-validated data)
|
|
112
|
+
|
|
113
|
+
| Tool | What it does |
|
|
114
|
+
|---|---|
|
|
115
|
+
| `list_schemas` | List the record-schema catalog the credential can see (filter by `surface` or resolve one by `recordType`). Makes `record_query` / `record_create` discoverable. |
|
|
116
|
+
| `record_query` | Query records by lookup field (equality / range / prefix, with `asc`/`desc` ordering) or list mode (filter by ownership + type). |
|
|
117
|
+
| `record_get` | Fetch one record by id, including its full payload (large payloads truncated to protect the agent context window). |
|
|
118
|
+
| `record_create` | Create a record of a given type; idempotent by `externalId`; optional per-record `indexMode`. |
|
|
119
|
+
| `record_update` | Patch a record's payload (deep-merged; `null` deletes a key); optimistic concurrency via `expectedVersion`. |
|
|
120
|
+
| `record_delete` | Permanently delete a record by id (leaves a tombstone). |
|
|
121
|
+
|
|
122
|
+
**Documents** (text/file content, indexed for search + Q&A)
|
|
123
|
+
|
|
124
|
+
| Tool | What it does |
|
|
125
|
+
|---|---|
|
|
126
|
+
| `document_ingest` | Create a document — inline text body OR local file upload (file mode is stdio-transport only). Idempotent by `externalId`; optional `schemaId` + `payload` for a typed, lookup-queryable document. |
|
|
127
|
+
| `document_query` | Query documents by lookup field (equality / range / prefix, with `asc`/`desc` ordering) or list mode (filter by ownership + type). |
|
|
128
|
+
| `document_get` | Fetch a document by id (metadata; optional text truncated at ~8K tokens; optional presigned `downloadUrl` for file-backed documents). |
|
|
129
|
+
| `document_update` | Patch a document's metadata / typed payload (deep-merged); optimistic concurrency via `expectedVersion`. |
|
|
130
|
+
| `document_delete` | Permanently delete a document by id (removes it and its indexed content). |
|
|
131
|
+
|
|
132
|
+
**Folders** (group records + documents)
|
|
133
|
+
|
|
134
|
+
| Tool | What it does |
|
|
135
|
+
|---|---|
|
|
136
|
+
| `folder_query` | Get a folder by id, or list folders (a parent's children for tree navigation, or a flat tenant list; paginated via `nextCursor`). |
|
|
137
|
+
| `folder_create` | Create a folder. |
|
|
138
|
+
| `folder_update` | Update a folder's name / description / ownership (merge-patch; optimistic concurrency via `expectedVersion`; folders cannot be re-parented). |
|
|
139
|
+
| `folder_delete` | Delete a folder. |
|
|
140
|
+
|
|
141
|
+
**Identity & history**
|
|
142
|
+
|
|
143
|
+
| Tool | What it does |
|
|
144
|
+
|---|---|
|
|
145
|
+
| `current_identity` | Describe the credential: tenantId, environment, principalType, and (where surfaced) allowedActions + dataScope. |
|
|
146
|
+
| `lookup_principal` | Resolve a user / org / client by your own `externalId` (→ its Vectros UUID, for the ownership filters) or by a schema lookup field. Read-only. |
|
|
147
|
+
| `version_history` | Read the audit/version trail (CREATE/UPDATE/DELETE, with actor + diff) for one record or document. Read-only. |
|
|
148
|
+
|
|
149
|
+
All 21 tools wrap published Vectros HTTP API endpoints. JSON
|
|
150
|
+
responses are what the agent sees as tool output. Per-call cost
|
|
151
|
+
surfaces via the `usage` field on inference responses.
|
|
152
|
+
|
|
153
|
+
### Opting into a subset
|
|
154
|
+
|
|
155
|
+
Pass `VECTROS_MCP_TOOLS=hybrid_search,rag_ask` to register only those
|
|
156
|
+
two — useful for giving an agent read-only search access without
|
|
157
|
+
exposing ingestion or inference costs to the credential. Unknown tool
|
|
158
|
+
names fail fast at startup.
|
|
159
|
+
|
|
160
|
+
## Resources
|
|
161
|
+
|
|
162
|
+
Two read-only resources for ambient context (no tool call required):
|
|
163
|
+
|
|
164
|
+
| URI | What it returns |
|
|
165
|
+
|---|---|
|
|
166
|
+
| `vectros://schemas` | Same payload as `list_schemas`. Lets the agent preload schemas into context for ambient discovery. |
|
|
167
|
+
| `vectros://identity` | Same payload as `current_identity`. Lets the agent self-describe without spending a tool call. |
|
|
168
|
+
|
|
169
|
+
## Recommended credential
|
|
170
|
+
|
|
171
|
+
Use a **scoped permanent API key** (`ssk_*`), not a root key (`sk_*`).
|
|
172
|
+
|
|
173
|
+
A scoped key is bound to a narrowed `AccessProfile` — e.g. read-only
|
|
174
|
+
across one `orgId`. If your MCP install is compromised, the blast
|
|
175
|
+
radius is whatever the profile allows, not the whole tenant. The
|
|
176
|
+
server emits a `warn` log line on startup when you pass a wildcard
|
|
177
|
+
`sk_*` for exactly this reason.
|
|
178
|
+
|
|
179
|
+
**The easiest way to get one is `npx -y @vectros-ai/cli bootstrap` (above)**
|
|
180
|
+
— it mints a least-privilege `ssk_*` and an AccessProfile for you, no root
|
|
181
|
+
key required. To do it by hand instead: mint a scoped key from the developer
|
|
182
|
+
portal under **Keys → Create scoped key**, bind it to an AccessProfile
|
|
183
|
+
titled `mcp-read-all` or `mcp-read-scoped`, and drop the resulting
|
|
184
|
+
`ssk_live_...` into the config above.
|
|
185
|
+
|
|
186
|
+
See the Vectros developer documentation on scoped tokens ("Recommended
|
|
187
|
+
AccessProfile for MCP") for least-privilege credential setup — the
|
|
188
|
+
`vectros bootstrap` flow provisions a scoped `ssk_*` key and its AccessProfile
|
|
189
|
+
in one command.
|
|
190
|
+
|
|
191
|
+
## Environment variables
|
|
192
|
+
|
|
193
|
+
| Var | Required | Default | Purpose |
|
|
194
|
+
|---|---|---|---|
|
|
195
|
+
| `VECTROS_API_KEY` | **yes** | — | Vectros API key. Accepts `sk_*` / `ssk_*` / `st_*`; `ssk_*` recommended. |
|
|
196
|
+
| `VECTROS_API_BASE_URL` | no | `https://api.vectros.ai` | Override for staging or other envs. Validated: must be `https://` (or `http://` to localhost) and an official `*.vectros.ai` host. |
|
|
197
|
+
| `VECTROS_ALLOW_INSECURE_BASE_URL` | no | — | Set `1` to bypass the base-URL allow-list (e.g. a trusted local proxy). **Not recommended** — sends your key to an unvalidated host; logs a warning. |
|
|
198
|
+
| `VECTROS_MCP_INGEST_ROOT` | no | process cwd | Directory `document_ingest`'s `filePath` mode is jailed to. Paths escaping it (traversal/absolute/symlink) or matching a sensitive pattern are rejected. |
|
|
199
|
+
| `VECTROS_MCP_TOOLS` | no | (all tools) | Comma-separated tool names (e.g. `hybrid_search,rag_ask`). |
|
|
200
|
+
| `VECTROS_MCP_DEBUG` | no | — | Set `1` for verbose stderr logs. |
|
|
201
|
+
| `VECTROS_MCP_SKIP_PING_VALIDATION` | no | — | Set `1` to disable the startup `/v1/ping` check. |
|
|
202
|
+
| `VECTROS_MCP_HTTP_PORT` | HTTP only | `8765` | Port for HTTP transport. |
|
|
203
|
+
| `VECTROS_MCP_HTTP_HOST` | HTTP only | `127.0.0.1` | Bind address. Use `0.0.0.0` for all interfaces (then set a bearer token). |
|
|
204
|
+
| `VECTROS_MCP_HTTP_BEARER_TOKEN` | HTTP only | — | Client→server bearer token. **Strongly recommended** beyond localhost; **required** for a non-loopback bind. |
|
|
205
|
+
| `VECTROS_MCP_HTTP_ALLOWED_HOSTS` | HTTP only | — | Comma-separated extra `Host` values to allow (DNS-rebinding protection). Set to the public hostname(s) behind a reverse proxy. |
|
|
206
|
+
| `VECTROS_MCP_HTTP_ALLOWED_ORIGINS` | HTTP only | — | Comma-separated extra `Origin` values to allow. |
|
|
207
|
+
| `VECTROS_MCP_HTTP_ALLOW_INSECURE` | HTTP only | — | Set `1` to permit a non-loopback bind without a bearer token. **Not recommended.** |
|
|
208
|
+
|
|
209
|
+
## Startup credential validation
|
|
210
|
+
|
|
211
|
+
Before the first tool call, the server runs a `GET /v1/ping` check
|
|
212
|
+
against your credential. Bad keys fail at startup with a clear
|
|
213
|
+
error instead of opaquely 401'ing mid-conversation. Set
|
|
214
|
+
`VECTROS_MCP_SKIP_PING_VALIDATION=1` to disable.
|
|
215
|
+
|
|
216
|
+
## HTTP transport
|
|
217
|
+
|
|
218
|
+
For hosted-MCP scenarios — running the server behind a network
|
|
219
|
+
boundary, sharing it across multiple agent instances, deploying as
|
|
220
|
+
a sidecar — the package also ships an HTTP binary:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
VECTROS_API_KEY=ssk_live_... \
|
|
224
|
+
VECTROS_MCP_HTTP_PORT=8765 \
|
|
225
|
+
VECTROS_MCP_HTTP_BEARER_TOKEN=$(openssl rand -hex 32) \
|
|
226
|
+
npx -y @vectros-ai/mcp-server vectros-mcp-server-http
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
The server listens on `http://127.0.0.1:8765/mcp` by default. The
|
|
230
|
+
bearer token is optional but **strongly recommended for any
|
|
231
|
+
deployment beyond localhost** — without it, anyone who can reach the
|
|
232
|
+
port can call Vectros with your credentials.
|
|
233
|
+
|
|
234
|
+
Health probe lives at `GET /healthz` (always unauthenticated, k8s
|
|
235
|
+
readiness-friendly).
|
|
236
|
+
|
|
237
|
+
Current limitation: the server uses one upstream credential per process
|
|
238
|
+
(the env `VECTROS_API_KEY`). Per-request credential override via the
|
|
239
|
+
incoming Authorization header is a planned enhancement. For now, deploy one
|
|
240
|
+
server per credential boundary you want.
|
|
241
|
+
|
|
242
|
+
## Programmatic use (advanced)
|
|
243
|
+
|
|
244
|
+
Most consumers use the CLI shape above. If you need to embed the
|
|
245
|
+
server in your own Node process:
|
|
246
|
+
|
|
247
|
+
```ts
|
|
248
|
+
import { VectrosMCPServer, createStdioTransport } from '@vectros-ai/mcp-server';
|
|
249
|
+
|
|
250
|
+
const server = new VectrosMCPServer({
|
|
251
|
+
apiKey: process.env.VECTROS_API_KEY!,
|
|
252
|
+
tools: ['hybrid_search', 'rag_ask'],
|
|
253
|
+
resources: ['schemas'], // opt-in resource filter; default = all
|
|
254
|
+
validateOnStart: true, // default — set false to skip startup ping
|
|
255
|
+
});
|
|
256
|
+
await server.connect(createStdioTransport());
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
## What this server doesn't do (yet)
|
|
260
|
+
|
|
261
|
+
- **No prompts capability** — `/rag` and `/ingest_pdf` slash-command
|
|
262
|
+
templates land in a future release. (Provisioning — the `bootstrap` command — lives
|
|
263
|
+
in the separate [`@vectros-ai/cli`](https://www.npmjs.com/package/@vectros-ai/cli)
|
|
264
|
+
package, above.)
|
|
265
|
+
- **HTTP transport is single-tenant per process** — per-request
|
|
266
|
+
credential override via incoming Authorization header is a v1.0+
|
|
267
|
+
enhancement.
|
|
268
|
+
- **No Python implementation** — TS only. Python users can `npx`
|
|
269
|
+
this server from any project.
|
|
270
|
+
- **`rag_ask` and `document_ask` are not natively streaming** —
|
|
271
|
+
full answer aggregated before the tool returns. Progress
|
|
272
|
+
notifications cover the latency. Native MCP-spec streaming lands
|
|
273
|
+
when the spec stabilizes.
|
|
274
|
+
|
|
275
|
+
The server is on a pre-1.0 track toward a stable 1.0 release.
|
|
276
|
+
|
|
277
|
+
## Building from source
|
|
278
|
+
|
|
279
|
+
```sh
|
|
280
|
+
git clone https://github.com/vectros-ai/mcp-server
|
|
281
|
+
cd mcp-server
|
|
282
|
+
npm install
|
|
283
|
+
npm run build
|
|
284
|
+
npm test
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
`npm install` pulls `@vectros-ai/sdk` from the configured npm
|
|
288
|
+
registry.
|
|
289
|
+
|
|
290
|
+
`npm run build` runs `tsup` to produce the dual ESM/CJS output in
|
|
291
|
+
`dist/`. The SDK is bundled into the build (see
|
|
292
|
+
[`tsup.config.ts`](./tsup.config.ts)) — the published npm package is
|
|
293
|
+
self-contained and works without `.npmrc` config on the consumer's
|
|
294
|
+
machine.
|
|
295
|
+
|
|
296
|
+
## License
|
|
297
|
+
|
|
298
|
+
Apache-2.0. See the LICENSE file.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|