OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema 2.0.2

Prefix Reserved
dotnet add package OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema --version 2.0.2
                    
NuGet\Install-Package OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema -Version 2.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema" Version="2.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema" Version="2.0.2" />
                    
Directory.Packages.props
<PackageReference Include="OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema --version 2.0.2
                    
#r "nuget: OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema, 2.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema@2.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema&version=2.0.2
                    
Install as a Cake Addin
#tool nuget:?package=OPCFoundation.NetStandard.Opc.Ua.Mcp.Schema&version=2.0.2
                    
Install as a Cake Tool

OPC UA MCP schema workflows

Embeddable schemas profile for runtime type discovery and bounded XSD, BSD, UA JSON, PubSub and REST OpenAPI schema artifacts.

The module reuses the stack's definition resolvers and schema generators. It does not compile supplied code, use Reflection.Emit, or start a UA server. Generated artifacts use the host's configured transfer root and size limits.

Embedding

services.AddOpcUaMcpCore(new OpcUaMcpOptions
{
    TransferRoot = artifactDirectory,
    MaxTransferBytes = 16 * 1024 * 1024
});
services.AddOpcUaMcpSchema(new McpSchemaOptions { MaxTypes = 256 });
services.AddMcpServer().WithOpcUaSchemaTools(McpToolProfile.Schemas);

WithOpcUaSchemaTools also accepts a composed McpToolProfileSet. Repeated registration does not duplicate the six schema tools or the four shared connection tools. Connection tools are available for explicit Session operations; registered/standard local schemas and REST OpenAPI do not require a connection.

Hosts can inject IServiceMessageContext, IDataTypeDefinitionResolver (the default is DataTypeDefinitionRegistry) and IUaSchemaGenerator implementations. SchemaTools also has a direct constructor. Per-operation generation always receives a separate finite registry, never the potentially unlimited host resolver.

Tools

Tool Purpose
schema_list_types A live, bounded local namespace or remote HasSubtype page.
schema_inspect_type Actual structure/enum definition, identity, ranks and remote attribute quality.
schema_load_types Explicit client-side registration through the SDK's AOT-safe default complex-type factory.
schema_generate Xsd, Bsd, JsonCompact or JsonVerbose; Type closure or Namespace.
schema_generate_pubsub Payload, DataSetMessage, NetworkMessage or MetaData JSON schema.
schema_generate_openapi Existing REST OpenAPI generator, with optional bounded component schemas.

Scalar settings are grouped under options; identifiers and actual arrays remain typed top-level arguments. For example:

{
  "typeId": "i=296",
  "outputPath": "argument.schema.json",
  "options": {
    "source": "Registered",
    "format": "JsonCompact",
    "scope": "Type"
  }
}

Use options.source: "Session" plus sessionName for live server definitions. schema_load_types takes the non-empty typeIds string array and optional sessionName; it does not accept assembly paths, code, or a dictionary-loading fallback. Loading affects the current client session's factory, not the server. Per-root results can report partial client-side registration; successful roots and dependencies remain registered.

PubSub input uses either a typed fields array or metadataNodeId with options.source: "Session". Each inline field contains name, dataTypeId and optional valueRank. All three numeric options.fieldContentMask, options.messageContentMask and options.networkContentMask are required. Unused masks must be zero, unknown/unsupported bits are refused, and RawData cannot be combined with DataValue quality bits. MetaData describes the SDK's metadata-message envelope; it does not specialize its generic metadata body. Remote metadata's built-in hints are preserved; custom namespace tables must match the selected context. Use inline fields with context-local identifiers when metadata uses a different namespace table. Custom PubSub type names are limited to letters, digits and underscores, and distinct types cannot share a schema name, because the current SDK provider otherwise aliases their references. serverUrl in OpenAPI options is document metadata and is never fetched.

Bounds and fidelity

The default and maximum ceilings are 512 definitions, 1024 fields per type, 32 dependency/array levels, 16 MiB per artifact and 30 seconds per operation. The host may lower these limits. The shared transfer byte ceiling also applies. Registered-factory discovery additionally caps its identifier/encoding-alias scan at 4096 entries before activating further definitions. Output destinations are preflighted before remote reads, must have existing parent directories beneath TransferRoot, and are published atomically without overwriting existing files. Failures and cancellation leave no partial artifact.

Namespace expansion must fit a complete bounded enumeration; a large remote type hierarchy is an error, not a silently incomplete namespace schema. Choose Type scope for an explicitly bounded root closure on such a server. List offsets refer to a live enumeration, not a durable server snapshot.

The tools preserve DataType identifier namespaces independently of BrowseName namespaces. Unknown definitions, ambiguous schema names and unsupported representations fail explicitly. In particular, the SDK BSD generator cannot preserve multidimensional arrays or OptionSet wire forms, and the current generators cannot fully describe unconstrained-dimensional or subtyped-field envelopes. Integer-backed OptionSets are not registered as signed enumerations by the bounded loader. No fallback invents a permissive successful schema. XML/BSD namespace imports remain references; dependency artifacts are not silently generated or fetched.

See the repository's docs/McpServer.md and docs/SchemaGeneration.md for configuration and the underlying schema contracts.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2.0.2 89 11/11/2026