@revealui/mcp 0.2.0 → 0.4.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.
Files changed (46) hide show
  1. package/LICENSE +104 -17
  2. package/README.md +16 -3
  3. package/dist/index.d.ts +1 -6
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +2 -17
  6. package/dist/index.js.map +1 -1
  7. package/dist/servers/contracts.d.ts +23 -0
  8. package/dist/servers/contracts.d.ts.map +1 -0
  9. package/dist/servers/contracts.js +34 -0
  10. package/dist/servers/contracts.js.map +1 -0
  11. package/dist/servers/factories/contracts.d.ts +7272 -0
  12. package/dist/servers/factories/contracts.d.ts.map +1 -0
  13. package/dist/servers/factories/contracts.js +646 -0
  14. package/dist/servers/factories/contracts.js.map +1 -0
  15. package/dist/servers/neon.d.ts.map +1 -1
  16. package/dist/servers/neon.js +1 -5
  17. package/dist/servers/neon.js.map +1 -1
  18. package/dist/servers/next-devtools.d.ts.map +1 -1
  19. package/dist/servers/next-devtools.js +0 -4
  20. package/dist/servers/next-devtools.js.map +1 -1
  21. package/dist/servers/playwright.d.ts.map +1 -1
  22. package/dist/servers/playwright.js +0 -4
  23. package/dist/servers/playwright.js.map +1 -1
  24. package/dist/servers/revealui-content.d.ts.map +1 -1
  25. package/dist/servers/revealui-content.js +0 -4
  26. package/dist/servers/revealui-content.js.map +1 -1
  27. package/dist/servers/revealui-email.d.ts.map +1 -1
  28. package/dist/servers/revealui-email.js +0 -6
  29. package/dist/servers/revealui-email.js.map +1 -1
  30. package/dist/servers/revealui-memory.d.ts.map +1 -1
  31. package/dist/servers/revealui-memory.js +0 -4
  32. package/dist/servers/revealui-memory.js.map +1 -1
  33. package/dist/servers/revealui-stripe.d.ts.map +1 -1
  34. package/dist/servers/revealui-stripe.js +0 -4
  35. package/dist/servers/revealui-stripe.js.map +1 -1
  36. package/dist/servers/stripe.d.ts.map +1 -1
  37. package/dist/servers/stripe.js +1 -5
  38. package/dist/servers/stripe.js.map +1 -1
  39. package/dist/servers/supabase.d.ts.map +1 -1
  40. package/dist/servers/supabase.js +0 -4
  41. package/dist/servers/supabase.js.map +1 -1
  42. package/dist/servers/vercel.d.ts.map +1 -1
  43. package/dist/servers/vercel.js +1 -5
  44. package/dist/servers/vercel.js.map +1 -1
  45. package/package.json +13 -8
  46. package/LICENSE.commercial +0 -90
package/LICENSE CHANGED
@@ -1,22 +1,109 @@
1
- MIT License
1
+ Functional Source License, Version 1.1, MIT Future License
2
2
 
3
- Copyright (c) 2025-2026 RevealUI Studio
3
+ Abbreviation
4
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:
5
+ FSL-1.1-MIT
11
6
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
7
+ Notice
14
8
 
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.
9
+ Copyright 2025-2026 RevealUI Studio (founder@revealui.com)
22
10
 
11
+ Terms and Conditions
12
+
13
+ Licensor: RevealUI Studio
14
+
15
+ Licensed Work: @revealui/mcp
16
+ The Licensed Work is copyright 2025-2026 RevealUI Studio.
17
+
18
+ Change Date: 2028-04-08
19
+
20
+ Change License: MIT
21
+
22
+ For information about alternative licensing arrangements for the Licensed Work,
23
+ please contact: founder@revealui.com
24
+
25
+ License text below is the Functional Source License, Version 1.1, MIT Future
26
+ License, as published at https://fsl.software/FSL-1.1-MIT.template.md
27
+
28
+ ---
29
+
30
+ ## Terms and Conditions
31
+
32
+ ### Acceptance
33
+
34
+ In order to get any license under these terms, you must agree to them as
35
+ both strict obligations and conditions to all your licenses.
36
+
37
+ ### Copyright License
38
+
39
+ The licensor grants you a non-exclusive, royalty-free, worldwide,
40
+ non-sublicensable, non-transferable license to use, copy, distribute, make
41
+ available, and prepare derivative works of the licensed work, in each case
42
+ subject to the limitations and conditions below.
43
+
44
+ ### Limitations
45
+
46
+ You may not make the functionality of the licensed work or a modified
47
+ version available to third parties as a service, or distribute the
48
+ licensed work or a modified version in a way that makes the functionality
49
+ of the software available to third parties. Making the functionality of
50
+ the licensed work available to third parties includes, without limitation,
51
+ enabling third parties to interact with the functionality of the licensed
52
+ work remotely through a computer network, offering a service the value of
53
+ which entirely or primarily derives from the value of the licensed work,
54
+ or offering a service that accomplishes for users the primary purpose of
55
+ the licensed work or a modified version.
56
+
57
+ ### Patents
58
+
59
+ The licensor grants you a license, under any patent claims the licensor
60
+ can license, or becomes able to license, to make, have made, use, sell,
61
+ offer for sale, import and have imported the licensed work, in each case
62
+ subject to the limitations and conditions in this license. This license
63
+ does not cover any patent claims that you cause to be infringed by
64
+ modifications or additions to the licensed work. If you or your company
65
+ make any written claim that the licensed work infringes or contributes to
66
+ infringement of any patent, your patent license for the licensed work
67
+ granted under these terms ends immediately. If your company makes such a
68
+ claim, your patent license ends immediately for work on behalf of your
69
+ company.
70
+
71
+ ### Fair Use
72
+
73
+ This license is not intended to limit any right of fair use, fair
74
+ dealing, or other applicable copyright exception or limitation.
75
+
76
+ ### No Other Rights
77
+
78
+ These terms do not allow you to sublicense or transfer any of your
79
+ licenses to anyone else, or prevent the licensor from granting licenses
80
+ to anyone else. These terms do not imply any other licenses.
81
+
82
+ ### Termination
83
+
84
+ If you use the licensed work in violation of these terms, such use is
85
+ not licensed, and your licenses may be revoked if you do not cure the
86
+ violation.
87
+
88
+ The licensor may also revoke your licenses if you fail to comply with
89
+ these terms.
90
+
91
+ ### No Liability
92
+
93
+ ***As far as the law allows, the licensed work comes as is, without any
94
+ warranty or condition, and the licensor will not be liable to you for any
95
+ damages arising out of these terms or the use or nature of the licensed
96
+ work, under any kind of legal claim.***
97
+
98
+ ### Change Date
99
+
100
+ On the Change Date, or the fourth anniversary of the first publicly
101
+ available distribution of a specific version of the Licensed Work under
102
+ this License, whichever comes first, the Licensor hereby grants you
103
+ rights under the terms of the Change License, and the rights granted in
104
+ the paragraphs above terminate.
105
+
106
+ ### Change License
107
+
108
+ On the Change Date, the Licensed Work will be made available under the
109
+ Change License specified above (MIT).
package/README.md CHANGED
@@ -11,7 +11,7 @@ Centralized MCP server infrastructure, configuration, and documentation for Reve
11
11
 
12
12
  This package contains everything MCP-related:
13
13
 
14
- - **12 MCP Servers** — Code Validator, Neon, Next.js DevTools, Playwright, RevealUI Content, RevealUI Email, RevealUI Memory, RevealUI Stripe, Stripe, Supabase, Vercel, and an Email Provider helper. Ground-truth count is enforced by `pnpm validate:claims`.
14
+ - **13 MCP Servers** — Code Validator, Contracts Introspection, Neon, Next.js DevTools, Playwright, RevealUI Content, RevealUI Email, RevealUI Memory, RevealUI Stripe, Stripe, Supabase, Vercel, and an Email Provider helper. Ground-truth count is enforced by `pnpm validate:claims`.
15
15
  - **Configuration Templates** - For Claude Code / Claude Desktop
16
16
  - **Utilities** - Config management, database adapters
17
17
  - **Documentation** - Complete guides and per-server docs
@@ -145,6 +145,19 @@ Next.js 16+ runtime diagnostics and automation.
145
145
  pnpm mcp:next-devtools
146
146
  ```
147
147
 
148
+ ### 8. Contracts Introspection
149
+ **Status:** ✅ Active (no API key required, **not** Pro-license-gated)
150
+
151
+ Phase 1 of the protocol-pyramid ADR ([`docs/decisions/2026-05-03-contracts-protocol-pyramid.md`](../../docs/decisions/2026-05-03-contracts-protocol-pyramid.md)). Exposes every `@revealui/contracts` category (representation, entities, content, admin, agents, security, secrets, a2a, api-auth, api-chat, api-gdpr, content-validation, devkit-profiles, generated, providers, revealcoin, stripe-webhook-events) as MCP **resources** (read-only JSON Schemas of every category schema) and matching MCP **tools** that parse arbitrary JSON against any registered schema.
152
+
153
+ - **Resources:** `revealui-contracts://catalog` (full discovery payload) + `revealui-contracts://<category>` (one per category, returns all schemas).
154
+ - **Tools:** `contracts_list_categories`, `contracts_get_schema`, plus one `contracts_validate_<category>` per category.
155
+ - **License:** intentionally NOT Pro-gated. `@revealui/contracts` is MIT and agent-side schema introspection is meant to enable any MCP client (Claude Code, Cursor, custom agents) to integrate cleanly.
156
+
157
+ ```bash
158
+ tsx packages/mcp/src/servers/contracts.ts
159
+ ```
160
+
148
161
  ## Configuration
149
162
 
150
163
  All configuration templates are in `configs/`:
@@ -251,5 +264,5 @@ Commercial - see [LICENSE.commercial](../../LICENSE.commercial)
251
264
  ---
252
265
 
253
266
  **Status:** ✅ Consolidated and Active
254
- **Servers:** 12 available (ground truth: `pnpm validate:claims` — source of truth is `packages/mcp/src/servers/`)
255
- **Last Updated:** 2026-04-20
267
+ **Servers:** 13 available (ground truth: `pnpm validate:claims` — source of truth is `packages/mcp/src/servers/`)
268
+ **Last Updated:** 2026-05-03
package/dist/index.d.ts CHANGED
@@ -15,12 +15,6 @@
15
15
  *
16
16
  * @packageDocumentation
17
17
  */
18
- /**
19
- * Check if the MCP package is licensed for use.
20
- * Initializes the license cache from environment variables, then checks the tier.
21
- * Returns false with a warning log if no Pro/Enterprise license is active.
22
- */
23
- export declare function checkMcpLicense(): Promise<boolean>;
24
18
  export { connectPglite, connectPostgres, createMcpDbClient, type McpDbClient, type McpDocumentOperationsInsert, type McpDocumentOperationsRow, type QueryResult, } from './adapters/db.js';
25
19
  export { authorizeToolCall, type McpAuthClaims, McpAuthClaimsSchema, validateMcpClaims, } from './auth.js';
26
20
  export { type CallToolResult, type ClientCapabilities, type CompleteRequest, type CompleteResult, type Completion, type CompletionReference, type CreateMessageRequest, type CreateMessageResult, type CustomTransportOptions, type ElicitationHandler, type ElicitRequest, type ElicitResult, type GetPromptResult, type LoggingLevel, type LoggingMessageNotification, type LogMessageParams, McpCapabilityError, McpClient, type McpClientOptions, McpNotConnectedError, type McpRequestOptions, type Progress, type Prompt, type PromptMessage, type PromptReference, type Resource, type ResourceContents, type ResourceTemplateReference, type ResourceUpdatedParams, type Root, type RootsProvider, type SamplingHandler, type ServerCapabilities, type StdioTransportOptions, type StreamableHTTPClientTransportOptions, type StreamableHTTPReconnectionOptions, type StreamableHttpTransportOptions, type Tool, type TransportOptions, } from './client.js';
@@ -33,6 +27,7 @@ export { executePipeline, type PipelineResult, type PipelineStep, type PipelineS
33
27
  export { InMemoryRateLimitStore, PGliteRateLimitStore, type RateLimitStore, type WindowEntry, } from './rate-limit-store.js';
34
28
  export { DEFAULT_TIER_LIMITS, McpRateLimiter, type McpRateLimiterOptions, type RateLimitConfig, type RateLimitResult, } from './rate-limiter.js';
35
29
  export { createMCPAdapter, disposeAllAdapters, generateIdempotencyKey, generateUniqueIdempotencyKey, type IdempotencyStore, MCPAdapter, type MCPConfig, NeonAdapter, StripeAdapter, VercelAdapter, } from './servers/adapter.js';
30
+ export { type ContractCategoryName, type ContractCategorySchemas, type CreateContractsServerOptions, createContractsServer, getContractsCatalog, REGISTERED_CATEGORIES, REVEALCOIN_TOKEN_DEFAULT, validatePayload, } from './servers/factories/contracts.js';
36
31
  export { createRevealuiContentServer, setCredentials as setRevealuiContentCredentials, } from './servers/factories/revealui-content.js';
37
32
  export { launchNeonMcp } from './servers/neon.js';
38
33
  export { launchNextDevtoolsMcp } from './servers/next-devtools.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAMH;;;;GAIG;AACH,wBAAsB,eAAe,IAAI,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KAAK,4BAA4B,GAClC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,YAAY,GACb,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -15,23 +15,6 @@
15
15
  *
16
16
  * @packageDocumentation
17
17
  */
18
- import { isFeatureEnabled } from '@revealui/core/features';
19
- import { initializeLicense } from '@revealui/core/license';
20
- import { logger } from '@revealui/core/observability/logger';
21
- /**
22
- * Check if the MCP package is licensed for use.
23
- * Initializes the license cache from environment variables, then checks the tier.
24
- * Returns false with a warning log if no Pro/Enterprise license is active.
25
- */
26
- export async function checkMcpLicense() {
27
- await initializeLicense();
28
- if (!isFeatureEnabled('mcp')) {
29
- logger.warn('[@revealui/mcp] MCP server integration requires a Pro or Enterprise license. ' +
30
- 'Visit https://revealui.com/pricing for details.');
31
- return false;
32
- }
33
- return true;
34
- }
35
18
  // Database adapter
36
19
  export { connectPglite, connectPostgres, createMcpDbClient, } from './adapters/db.js';
37
20
  // Auth bridge (JWT claims validation + tool authorization)
@@ -54,6 +37,8 @@ export { InMemoryRateLimitStore, PGliteRateLimitStore, } from './rate-limit-stor
54
37
  export { DEFAULT_TIER_LIMITS, McpRateLimiter, } from './rate-limiter.js';
55
38
  // Adapter framework
56
39
  export { createMCPAdapter, disposeAllAdapters, generateIdempotencyKey, generateUniqueIdempotencyKey, MCPAdapter, NeonAdapter, StripeAdapter, VercelAdapter, } from './servers/adapter.js';
40
+ // Contracts introspection server (F8 Phase 1 — protocol-pyramid ADR L2-MCP)
41
+ export { createContractsServer, getContractsCatalog, REGISTERED_CATEGORIES, REVEALCOIN_TOKEN_DEFAULT, validatePayload, } from './servers/factories/contracts.js';
57
42
  // First-party server factories (Stage 1 PR-1.2 — dual-mode template)
58
43
  export { createRevealuiContentServer, setCredentials as setRevealuiContentCredentials, } from './servers/factories/revealui-content.js';
59
44
  // Server launchers
package/dist/index.js.map CHANGED
@@ -1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aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,sDAAsD;AACtD,OAAO,EACL,+BAA+B,GAGhC,MAAM,sBAAsB,CAAC;AAC9B,8CAA8C;AAC9C,OAAO,EAIL,YAAY,GACb,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * RevealUI Contracts MCP Server — stdio launcher.
4
+ *
5
+ * Thin wrapper around `createContractsServer()` (see
6
+ * `./factories/contracts.ts` for the full surface). This file exists
7
+ * purely to run the server as a stdio subprocess — the canonical
8
+ * deployment for Claude Code integration, custom-agent integrations, and
9
+ * the hypervisor's `spawn()`-based tool-discovery pipeline.
10
+ *
11
+ * For HTTP / serverless / in-process deployment, import
12
+ * `createContractsServer` directly and wrap it via
13
+ * `createNodeStreamableHttpHandler` from `@revealui/mcp/streamable-http`.
14
+ *
15
+ * **Not Pro-license-gated** — `@revealui/contracts` is MIT and
16
+ * agent-side schema introspection is meant to enable any client
17
+ * (Claude Code, Cursor, custom agents) to integrate cleanly. Pro-gating
18
+ * a public-package primitive would defeat the purpose. Compare with
19
+ * `revealui-content.ts` (Pro-gated) which exposes RevealUI runtime data,
20
+ * not just contracts.
21
+ */
22
+ export {};
23
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../src/servers/contracts.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG"}
@@ -0,0 +1,34 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * RevealUI Contracts MCP Server — stdio launcher.
4
+ *
5
+ * Thin wrapper around `createContractsServer()` (see
6
+ * `./factories/contracts.ts` for the full surface). This file exists
7
+ * purely to run the server as a stdio subprocess — the canonical
8
+ * deployment for Claude Code integration, custom-agent integrations, and
9
+ * the hypervisor's `spawn()`-based tool-discovery pipeline.
10
+ *
11
+ * For HTTP / serverless / in-process deployment, import
12
+ * `createContractsServer` directly and wrap it via
13
+ * `createNodeStreamableHttpHandler` from `@revealui/mcp/streamable-http`.
14
+ *
15
+ * **Not Pro-license-gated** — `@revealui/contracts` is MIT and
16
+ * agent-side schema introspection is meant to enable any client
17
+ * (Claude Code, Cursor, custom agents) to integrate cleanly. Pro-gating
18
+ * a public-package primitive would defeat the purpose. Compare with
19
+ * `revealui-content.ts` (Pro-gated) which exposes RevealUI runtime data,
20
+ * not just contracts.
21
+ */
22
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
23
+ import { logger } from '@revealui/core/observability/logger';
24
+ import { createContractsServer } from './factories/contracts.js';
25
+ async function main() {
26
+ const server = createContractsServer();
27
+ const transport = new StdioServerTransport();
28
+ await server.connect(transport);
29
+ }
30
+ main().catch((err) => {
31
+ logger.error('RevealUI Contracts MCP error', err instanceof Error ? err : new Error(String(err)));
32
+ process.exit(1);
33
+ });
34
+ //# sourceMappingURL=contracts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/servers/contracts.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,MAAM,EAAE,MAAM,qCAAqC,CAAC;AAC7D,OAAO,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEjE,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,qBAAqB,EAAE,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;IACnB,MAAM,CAAC,KAAK,CAAC,8BAA8B,EAAE,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAClG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}