Skip to content
PluginStats

@cedar-policy/mcp-schema-generator-wasm weekly downloads statistics

By cedar-policy · npm · MCP servers

WASM bindings for cedar-policy-mcp-schema-generator, exposing SchemaGenerator to JavaScript/TypeScript.

View on npm Fresh · Nov 3, 2026

@cedar-policy/mcp-schema-generator-wasm has 9,391 recorded weekly downloads on npm, ranking #1224 of 2,762 tracked listings.

Weekly downloads
9,391
Official API · Nov 1, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
#1224
Among tracked npm listings

About @cedar-policy/mcp-schema-generator-wasm

cedar-policy-mcp-schema-generator-wasm

WASM bindings for cedar-policy-mcp-schema-generator, exposing SchemaGenerator to JavaScript and TypeScript via wasm-bindgen.

This enables Node.js and browser environments to generate Cedar authorization schemas from MCP tool descriptions with the exact same behavior as the Rust implementation, including correct handling of:

  • JSON number as Long or Decimal (configurable)
  • additionalProperties as Cedar tagged entities
  • Namespaced type deduplication for nested objects

Usage

Install the npm package:

npm install @cedar-policy/mcp-schema-generator-wasm
const { generateSchema } = require('@cedar-policy/mcp-schema-generator-wasm');

const stub = `
namespace MyServer {
    @mcp_principal
    entity User;
    @mcp_resource
    entity McpServer;
    action "call_tool" appliesTo {
        principal: [User],
        resource: [McpServer]
    };
}
`;

const tools = JSON.stringify([
  {
    name: 'read_file',
    description: 'Read a file from disk',
    inputSchema: {
      type: 'object',
      properties: { path: { type: 'string' } },
      required: ['path'],
    },
  },
]);

const result = JSON.parse(generateSchema(stub, tools));

if (result.isOk) {
  console.log(result.schema);     // Human-readable .cedarschema
  console.log(result.schemaJson); // JSON for Cedar WASM isAuthorized()
} else {
  console.error(result.error);
}

API

generateSchema(schemaStub, toolsJson, configJson?)
ParameterTypeDescription
schemaStubstringCedar schema stub with @mcp_principal and @mcp_resource annotations
toolsJsonstringMCP tool descriptions as JSON (the tools array from tools/list)
configJsonstring?Optional configuration as JSON

Returns: JSON string with fields:

FieldTypeDescription
schemastring | nullGenerated Cedar schema as .cedarschema text
schemaJsonstring | nullGenerated schema as JSON (for isAuthorized())
errorstring | nullError message if generation failed
isOkbooleanWhether generation succeeded
Configuration
{
  "includeOutputs": false,
  "objectsAsRecords": false,
  "eraseAnnotations": true,
  "flattenNamespaces": false,
  "numbersAsDecimal": false,
  "deduplicateEntityTypes": false
}
OptionDefaultDescription
includeOutputsfalseInclude tool output schemas in actions
objectsAsRecordsfalseUse records instead of entities for objects without additionalProperties
eraseAnnotationstrueRemove @mcp_* annotations from output
flattenNamespacesfalseFlatten all types into a single namespace
numbersAsDecimalfalseEncode JSON number as Cedar Decimal instead of Long
deduplicateEntityTypesfalseConsolidate identical entity types across tools into the lowest common ancestor namespace
generateRequest(schemaStub, toolsJson, inputJson, principalType, principalId, resourceType, resourceId, configJson?)

Generates Cedar authorization request components from an MCP tool call.

ParameterTypeDescription
schemaStubstringCedar schema stub (same as generateSchema)
toolsJsonstringMCP tool descriptions as JSON
inputJsonstringMCP tool call input ({"params": {"tool": "...", "args": {...}}})
principalTypestringCedar entity type for the principal (e.g., "User")
principalIdstringPrincipal identifier (e.g., "alice")
resourceTypestringCedar entity type for the resource (e.g., "McpServer")
resourceIdstringResource identifier (e.g., "my-server")
configJsonstring?Optional configuration as JSON

Returns: JSON string with fields:

FieldTypeDescription
principalstring | nullPrincipal EntityUID (e.g., MyServer::User::"alice")
actionstring | nullAction EntityUID (e.g., MyServer::Action::"read_file")
resourcestring | nullResource EntityUID (e.g., MyServer::McpServer::"my-server")
entitiesJsonstring | nullEntities as a JSON array string
errorstring | nullError message if generation failed
isOkbooleanWhether generation succeeded

Example:

const { generateRequest } = require('@cedar-policy/mcp-schema-generator-wasm');

const stub = `
namespace MyServer {
    @mcp_principal
    entity User;
    @mcp_resource
    entity McpServer;
    action "call_tool" appliesTo {
        principal: [User],
        resource: [McpServer]
    };
}
`;

const tools = JSON.stringify([
  {
    name: 'read_file',
    description: 'Read a file from disk',
    inputSchema: {
      type: 'object',
      properties: { path: { type: 'string' } },
      required: ['path'],
    },
  },
]);

const input = JSON.stringify({
  params: { tool: 'read_file', args: { path: '/etc/config.yaml' } },
});

const result = JSON.parse(
  generateRequest(stub, tools, input, 'User', 'alice', 'McpServer', 'my-server')
);

if (result.isOk) {
  console.log(result.principal);    // MyServer::User::"alice"
  console.log(result.action);       // MyServer::Action::"read_file"
  console.log(result.resource);     // MyServer::McpServer::"my-server"
  console.log(result.entitiesJson); // JSON array of entities for isAuthorized()
} else {
  console.error(result.error);
}

Building

# Install wasm-pack
cargo install wasm-pack

# Build for Node.js
wasm-pack build --target nodejs --scope cedar-policy

# Build for browsers
wasm-pack build --target web --scope cedar-policy

npm Release

The npm package name is:

@cedar-policy/mcp-schema-generator-wasm
```…

Description from the npm listing.

  • cedar
  • authorization
  • security
  • agents
  • mcp

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

@cedar-policy/mcp-schema-generator-wasm weekly downloads on npm, last 90 days: 9,391 weekly downloads as of Nov 1, 2026.@cedar-policy/mcp-schema-generator-wasmWeekly downloads on npm · Last 90 days9,391downloads / week8K8.5K9K9.5K10K10.5KAug 3Aug 18Sep 2Sep 17Oct 2Oct 17Nov 1downloads / weekNov 1, 2026 – Nov 1, 2026 · 1 observations · Updated Nov 1, 2026pluginstats.com
@cedar-policy/mcp-schema-generator-wasm weekly downloads on npm, last 90 days: 9,391 weekly downloads as of Nov 1, 2026.

7/30/90-day growth

@cedar-policy/mcp-schema-generator-wasm weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.@cedar-policy/mcp-schema-generator-wasmWeekly downloads growth on npm9,391downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Nov 1, 2026pluginstats.com
@cedar-policy/mcp-schema-generator-wasm weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

@cedar-policy/mcp-schema-generator-wasm npm ranking history: currently #1224 (by weekly downloads).@cedar-policy/mcp-schema-generator-wasmnpm ranking · by weekly downloads · Last 90 days#1224current rank#1222#1223#1224#1225#1226Aug 5Aug 20Sep 4Sep 19Oct 4Oct 19Nov 3rankNov 3, 2026 – Nov 3, 2026 · 1 observations · Updated Nov 1, 2026pluginstats.com
@cedar-policy/mcp-schema-generator-wasm npm ranking history: currently #1224 (by weekly downloads).

Listing placement

All npm2,762 listings · 139 pages · 1,382 shown · page 62, #5 (overall #1,225)
All npm: every listing in weekly downloads order

Listing placement

MCP servers376 listings · 19 pages · page 13, #15 (overall #255)
MCP servers: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (1)
Recent weekly downloads observations for @cedar-policy/mcp-schema-generator-wasm
Date (UTC)Weekly downloadsChange vs. previous
9,391—

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/@cedar-policy/mcp-schema-generator-wasm. First seen Nov 3, 2026; last successful collection Nov 3, 2026. See the methodology.