@tryvira/mcp 0.1.104 → 0.1.106
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/README.md +54 -4
- package/dist/cli.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @tryvira/mcp 0.1.
|
|
1
|
+
# @tryvira/mcp 0.1.106
|
|
2
2
|
|
|
3
3
|
An MCP server for connecting MCP-compatible applications to Vira's governed AI
|
|
4
4
|
behavior and runtime APIs. The package is MIT licensed.
|
|
@@ -37,10 +37,15 @@ For projects linked to organization units, set `VIRA_ORGANIZATION_UNIT_ID` to
|
|
|
37
37
|
select an active unit membership. If the actor belongs to several linked units,
|
|
38
38
|
this selection is required.
|
|
39
39
|
|
|
40
|
+
The public production API root is `https://api.tryvira.xyz` (no `/v1`
|
|
41
|
+
suffix). It is the API root, not the Studio URL. A customer-specific operator
|
|
42
|
+
may supply a different API root; use that value when one was explicitly
|
|
43
|
+
provisioned.
|
|
44
|
+
|
|
40
45
|
For example, an MCP client configuration uses the same names:
|
|
41
46
|
|
|
42
47
|
```json
|
|
43
|
-
{"env":{"VIRA_API_URL":"https://api.
|
|
48
|
+
{"env":{"VIRA_API_URL":"https://api.tryvira.xyz","VIRA_API_KEY":"<customer-api-key>","VIRA_ORGANIZATION_ID":"<org>","VIRA_PROJECT_ID":"<project>","VIRA_ENVIRONMENT_ID":"<environment>"}}
|
|
44
49
|
```
|
|
45
50
|
|
|
46
51
|
The launcher uses MCP stdio. It exposes separate Vira Control tools for capability, semantic,
|
|
@@ -93,9 +98,9 @@ gates still apply.
|
|
|
93
98
|
"command": "npx",
|
|
94
99
|
"args": ["-y", "@tryvira/mcp"],
|
|
95
100
|
"env": {
|
|
96
|
-
"VIRA_API_URL": "https://api.
|
|
101
|
+
"VIRA_API_URL": "https://api.tryvira.xyz",
|
|
97
102
|
"VIRA_API_KEY": "<customer-api-key>",
|
|
98
|
-
"VIRA_MCP_AUTHORITY_URL": "https://api.
|
|
103
|
+
"VIRA_MCP_AUTHORITY_URL": "https://api.tryvira.xyz/v1/mcp/authorize",
|
|
99
104
|
"VIRA_ORGANIZATION_ID": "<organization>",
|
|
100
105
|
"VIRA_PROJECT_ID": "<project>",
|
|
101
106
|
"VIRA_ENVIRONMENT_ID": "<environment>"
|
|
@@ -109,6 +114,51 @@ Never paste real credentials into a checked-in client configuration. For local-o
|
|
|
109
114
|
testing, use the local stack and its documented development credentials; the production
|
|
110
115
|
authority path does not accept the local bypass.
|
|
111
116
|
|
|
117
|
+
### OpenCode 2.4.x
|
|
118
|
+
|
|
119
|
+
OpenCode's background service does not reliably inherit variables exported in
|
|
120
|
+
the terminal that runs a later `opencode mcp list`. Keep the API key in a
|
|
121
|
+
user-only file and let OpenCode read it at launch time:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
mkdir -p "$HOME/.config/vira"
|
|
125
|
+
chmod 700 "$HOME/.config/vira"
|
|
126
|
+
umask 077
|
|
127
|
+
printf '%s' '<customer-api-key>' > "$HOME/.config/vira/api-key"
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Then merge this entry into the global OpenCode configuration. Replace the three
|
|
131
|
+
scope placeholders with the values supplied for the customer account; they are
|
|
132
|
+
identifiers, not the API key:
|
|
133
|
+
|
|
134
|
+
```jsonc
|
|
135
|
+
{
|
|
136
|
+
"$schema": "https://opencode.ai/config.json",
|
|
137
|
+
"mcp": {
|
|
138
|
+
"servers": {
|
|
139
|
+
"vira": {
|
|
140
|
+
"type": "local",
|
|
141
|
+
"command": ["npx", "-y", "@tryvira/mcp@0.1.106"],
|
|
142
|
+
"environment": {
|
|
143
|
+
"VIRA_API_URL": "https://api.tryvira.xyz",
|
|
144
|
+
"VIRA_API_KEY": "{file:~/.config/vira/api-key}",
|
|
145
|
+
"VIRA_ORGANIZATION_ID": "<organization>",
|
|
146
|
+
"VIRA_PROJECT_ID": "<project>",
|
|
147
|
+
"VIRA_ENVIRONMENT_ID": "<environment>"
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
Do not pass `VIRA_API_URL={env:VIRA_API_URL}` to `opencode mcp add` unless that
|
|
156
|
+
variable is present in the background service environment. An unresolved
|
|
157
|
+
OpenCode `{env:...}` reference becomes an empty string, which makes this
|
|
158
|
+
launcher fail closed with `VIRA_API_URL_REQUIRED`. After saving the config, use
|
|
159
|
+
`opencode --standalone mcp list` for the first verification; this avoids stale
|
|
160
|
+
background-service state while preserving the secret outside the JSON file.
|
|
161
|
+
|
|
112
162
|
See the [MCP guide](https://github.com/hrpering/tryvira/blob/main/docs/reference/mcp.md)
|
|
113
163
|
and [tool catalog](https://github.com/hrpering/tryvira/blob/main/docs/reference/mcp-tools.md)
|
|
114
164
|
for discovery, examples, and error behavior.
|
package/dist/cli.js
CHANGED
|
@@ -1182,7 +1182,7 @@ var authorize = async (tool, args) => {
|
|
|
1182
1182
|
})).body;
|
|
1183
1183
|
assertMcpAuthorityDecisionReceipt(decision);
|
|
1184
1184
|
};
|
|
1185
|
-
var server = new McpServer({ name: process.env.VIRA_MCP_SERVER_NAME ?? "vira", version: "0.1.
|
|
1185
|
+
var server = new McpServer({ name: process.env.VIRA_MCP_SERVER_NAME ?? "vira", version: "0.1.106" }, { capabilities: { tools: {} } });
|
|
1186
1186
|
var stdioObserver = createMcpStderrObserver(process.env.VIRA_MCP_LOCAL_DIAGNOSTICS === "true");
|
|
1187
1187
|
for (const tool of tools) {
|
|
1188
1188
|
server.registerTool(tool.name, { description: tool.description, inputSchema: tool.inputSchema, outputSchema: z.fromJSONSchema(MCP_PUBLIC_TOOL_CATALOG.find((item) => item.name === tool.name).outputSchema), annotations: tool.annotations }, async (raw) => observeMcpStdioCall(stdioObserver, async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryvira/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.106",
|
|
4
4
|
"mcpName": "io.github.hrpering/vira",
|
|
5
5
|
"description": "Vira MCP client and npx-ready JSON-RPC launcher.",
|
|
6
6
|
"keywords": [
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"@modelcontextprotocol/server": "^2.4.0",
|
|
46
|
-
"@tryvira/sdk": "^0.1.
|
|
46
|
+
"@tryvira/sdk": "^0.1.108",
|
|
47
47
|
"zod": "^4.2.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|