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