@tryvira/mcp 0.1.12 → 0.1.14
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 +21 -21
- package/README.md +79 -79
- package/dist/cli.js +2044 -2038
- package/dist/index.d.ts +306 -306
- package/dist/index.js +224 -224
- package/dist/migrations/001_vnext_foundation.sql +628 -628
- package/package.json +52 -52
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Vira / Esad Türkel
|
|
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.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Vira / Esad Türkel
|
|
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,79 +1,79 @@
|
|
|
1
|
-
# @tryvira/mcp
|
|
2
|
-
|
|
3
|
-
MIT-licensed MCP client/server package. The Vira service, application, and
|
|
4
|
-
backend remain proprietary and are governed separately.
|
|
5
|
-
|
|
6
|
-
An npx-ready MCP server for Vira's existing scoped authority boundary.
|
|
7
|
-
|
|
8
|
-
## Run it
|
|
9
|
-
|
|
10
|
-
```bash
|
|
11
|
-
npx @tryvira/mcp
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
The default transport is the official MCP transport. The legacy custom transport is an
|
|
15
|
-
explicit migration option only: `VIRA_MCP_PROTOCOL_MODE=legacy npx @tryvira/mcp`.
|
|
16
|
-
|
|
17
|
-
The launcher reads environment variables from its parent process. It does not automatically load a
|
|
18
|
-
`.env` file. For a local shell, export the variables first; for an MCP client, put them in the
|
|
19
|
-
client's `env` configuration:
|
|
20
|
-
|
|
21
|
-
```dotenv
|
|
22
|
-
VIRA_API_URL=http://127.0.0.1:4185
|
|
23
|
-
VIRA_API_KEY=vira_dev_local.local-development-only-32chars
|
|
24
|
-
VIRA_MCP_AUTH_TOKEN=replace-with-a-long-random-mcp-token
|
|
25
|
-
VIRA_ORGANIZATION_ID=local-org
|
|
26
|
-
VIRA_PROJECT_ID=local-project
|
|
27
|
-
VIRA_ENVIRONMENT_ID=local
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
For example, an MCP client configuration uses the same names:
|
|
31
|
-
|
|
32
|
-
```json
|
|
33
|
-
{"env":{"VIRA_API_URL":"https://api.example","VIRA_API_KEY":"<customer-api-key>","VIRA_MCP_AUTH_TOKEN":"<mcp-token>","VIRA_ORGANIZATION_ID":"<org>","VIRA_PROJECT_ID":"<project>","VIRA_ENVIRONMENT_ID":"<environment>"}}
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
The default launcher uses MCP stdio. To run the optional HTTP transport explicitly, use
|
|
37
|
-
`npx @tryvira/mcp --http`; it binds to `127.0.0.1` by default and requires `Authorization: Bearer
|
|
38
|
-
<VIRA_MCP_AUTH_TOKEN>`. Effectful MCP tools are denied by default. Local-only effectful
|
|
39
|
-
execution requires the explicit `VIRA_MCP_ALLOW_EFFECTFUL=true` opt-in; production never
|
|
40
|
-
accepts that shortcut. Set `VIRA_MCP_BIND_PUBLIC=true` only when an authenticated reverse
|
|
41
|
-
proxy or equivalent network boundary is present.
|
|
42
|
-
|
|
43
|
-
Effectful MCP tools remain authority-gated; the launcher does not create a second execution or telemetry path.
|
|
44
|
-
|
|
45
|
-
## What a client can discover
|
|
46
|
-
|
|
47
|
-
After `initialize`, call `tools/list`. Read-only tools such as `resolve_semantic` may return
|
|
48
|
-
semantic candidates. Effectful tools such as `resolve_runtime`, pack installation/release
|
|
49
|
-
and Strategy execution call the configured authority endpoint and can be denied by scope,
|
|
50
|
-
role, release state or policy.
|
|
51
|
-
|
|
52
|
-
## Minimal MCP client configuration
|
|
53
|
-
|
|
54
|
-
```json
|
|
55
|
-
{
|
|
56
|
-
"mcpServers": {
|
|
57
|
-
"vira": {
|
|
58
|
-
"command": "npx",
|
|
59
|
-
"args": ["-y", "@tryvira/mcp"],
|
|
60
|
-
"env": {
|
|
61
|
-
"VIRA_API_URL": "https://api.example.invalid",
|
|
62
|
-
"VIRA_API_KEY": "<customer-api-key>",
|
|
63
|
-
"VIRA_MCP_AUTH_TOKEN": "<mcp-auth-token>",
|
|
64
|
-
"VIRA_MCP_AUTHORITY_URL": "https://api.example.invalid/v1/mcp/authorize",
|
|
65
|
-
"VIRA_ORGANIZATION_ID": "<organization>",
|
|
66
|
-
"VIRA_PROJECT_ID": "<project>",
|
|
67
|
-
"VIRA_ENVIRONMENT_ID": "<environment>"
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
Never paste real credentials into a checked-in client configuration. For local-only effectful
|
|
75
|
-
testing, use the local stack and its documented development credentials; the production
|
|
76
|
-
authority path does not accept the local bypass.
|
|
77
|
-
|
|
78
|
-
See [`docs/MCP_GUIDE.md`](../../docs/MCP_GUIDE.md) for JSON-RPC discovery, tool examples and
|
|
79
|
-
authority/error behavior.
|
|
1
|
+
# @tryvira/mcp
|
|
2
|
+
|
|
3
|
+
MIT-licensed MCP client/server package. The Vira service, application, and
|
|
4
|
+
backend remain proprietary and are governed separately.
|
|
5
|
+
|
|
6
|
+
An npx-ready MCP server for Vira's existing scoped authority boundary.
|
|
7
|
+
|
|
8
|
+
## Run it
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npx @tryvira/mcp
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The default transport is the official MCP transport. The legacy custom transport is an
|
|
15
|
+
explicit migration option only: `VIRA_MCP_PROTOCOL_MODE=legacy npx @tryvira/mcp`.
|
|
16
|
+
|
|
17
|
+
The launcher reads environment variables from its parent process. It does not automatically load a
|
|
18
|
+
`.env` file. For a local shell, export the variables first; for an MCP client, put them in the
|
|
19
|
+
client's `env` configuration:
|
|
20
|
+
|
|
21
|
+
```dotenv
|
|
22
|
+
VIRA_API_URL=http://127.0.0.1:4185
|
|
23
|
+
VIRA_API_KEY=vira_dev_local.local-development-only-32chars
|
|
24
|
+
VIRA_MCP_AUTH_TOKEN=replace-with-a-long-random-mcp-token
|
|
25
|
+
VIRA_ORGANIZATION_ID=local-org
|
|
26
|
+
VIRA_PROJECT_ID=local-project
|
|
27
|
+
VIRA_ENVIRONMENT_ID=local
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
For example, an MCP client configuration uses the same names:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{"env":{"VIRA_API_URL":"https://api.example","VIRA_API_KEY":"<customer-api-key>","VIRA_MCP_AUTH_TOKEN":"<mcp-token>","VIRA_ORGANIZATION_ID":"<org>","VIRA_PROJECT_ID":"<project>","VIRA_ENVIRONMENT_ID":"<environment>"}}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
The default launcher uses MCP stdio. To run the optional HTTP transport explicitly, use
|
|
37
|
+
`npx @tryvira/mcp --http`; it binds to `127.0.0.1` by default and requires `Authorization: Bearer
|
|
38
|
+
<VIRA_MCP_AUTH_TOKEN>`. Effectful MCP tools are denied by default. Local-only effectful
|
|
39
|
+
execution requires the explicit `VIRA_MCP_ALLOW_EFFECTFUL=true` opt-in; production never
|
|
40
|
+
accepts that shortcut. Set `VIRA_MCP_BIND_PUBLIC=true` only when an authenticated reverse
|
|
41
|
+
proxy or equivalent network boundary is present.
|
|
42
|
+
|
|
43
|
+
Effectful MCP tools remain authority-gated; the launcher does not create a second execution or telemetry path.
|
|
44
|
+
|
|
45
|
+
## What a client can discover
|
|
46
|
+
|
|
47
|
+
After `initialize`, call `tools/list`. Read-only tools such as `resolve_semantic` may return
|
|
48
|
+
semantic candidates. Effectful tools such as `resolve_runtime`, pack installation/release
|
|
49
|
+
and Strategy execution call the configured authority endpoint and can be denied by scope,
|
|
50
|
+
role, release state or policy.
|
|
51
|
+
|
|
52
|
+
## Minimal MCP client configuration
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"vira": {
|
|
58
|
+
"command": "npx",
|
|
59
|
+
"args": ["-y", "@tryvira/mcp"],
|
|
60
|
+
"env": {
|
|
61
|
+
"VIRA_API_URL": "https://api.example.invalid",
|
|
62
|
+
"VIRA_API_KEY": "<customer-api-key>",
|
|
63
|
+
"VIRA_MCP_AUTH_TOKEN": "<mcp-auth-token>",
|
|
64
|
+
"VIRA_MCP_AUTHORITY_URL": "https://api.example.invalid/v1/mcp/authorize",
|
|
65
|
+
"VIRA_ORGANIZATION_ID": "<organization>",
|
|
66
|
+
"VIRA_PROJECT_ID": "<project>",
|
|
67
|
+
"VIRA_ENVIRONMENT_ID": "<environment>"
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Never paste real credentials into a checked-in client configuration. For local-only effectful
|
|
75
|
+
testing, use the local stack and its documented development credentials; the production
|
|
76
|
+
authority path does not accept the local bypass.
|
|
77
|
+
|
|
78
|
+
See [`docs/MCP_GUIDE.md`](../../docs/MCP_GUIDE.md) for JSON-RPC discovery, tool examples and
|
|
79
|
+
authority/error behavior.
|