LevelUp.Strategos.Ontology.MCP.Hosting 2.10.0

dotnet add package LevelUp.Strategos.Ontology.MCP.Hosting --version 2.10.0
                    
NuGet\Install-Package LevelUp.Strategos.Ontology.MCP.Hosting -Version 2.10.0
                    
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="LevelUp.Strategos.Ontology.MCP.Hosting" Version="2.10.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LevelUp.Strategos.Ontology.MCP.Hosting" Version="2.10.0" />
                    
Directory.Packages.props
<PackageReference Include="LevelUp.Strategos.Ontology.MCP.Hosting" />
                    
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 LevelUp.Strategos.Ontology.MCP.Hosting --version 2.10.0
                    
#r "nuget: LevelUp.Strategos.Ontology.MCP.Hosting, 2.10.0"
                    
#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 LevelUp.Strategos.Ontology.MCP.Hosting@2.10.0
                    
#: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=LevelUp.Strategos.Ontology.MCP.Hosting&version=2.10.0
                    
Install as a Cake Addin
#tool nuget:?package=LevelUp.Strategos.Ontology.MCP.Hosting&version=2.10.0
                    
Install as a Cake Tool

Strategos.Ontology.MCP.Hosting

MCP server hosting bridge for Strategos ontology. Adapts ontology tool descriptors into ModelContextProtocol server tools and registers them on an MCP server builder.

Installation

dotnet add package LevelUp.Strategos.Ontology.MCP.Hosting

Brings in LevelUp.Strategos.Ontology.MCP (the SDK-free core) and the ModelContextProtocol server SDK.

Why a separate package

The core Strategos.Ontology.MCP package stays free of any ModelContextProtocol dependency so it can be referenced by AOT-published and SDK-agnostic consumers. This companion package carries the server-SDK bridge.

Usage

using Microsoft.Extensions.DependencyInjection;
using Strategos.Ontology.MCP.Hosting;

builder.Services
    .AddOntology(o => o.AddDomain<MyDomain>())   // registers OntologyGraph + IObjectSetProvider
    .AddMcpServer()
    .AddOntologyTools();                          // resolves the graph + providers from DI

AddOntologyTools discovers the four ontology tools (ontology_explore, ontology_query, ontology_action, ontology_validate) and registers them as provider-bound MCP server tools: each tool dispatches against the host's DI-resolved IObjectSetProvider (and, where applicable, IActionDispatcher, IEventStreamProvider, IOntologyQuery), resolved per call from the request's IServiceProvider. So ontology_query executes against the configured provider and returns real rows.

It also registers ontology_traverse — an instance-anchored traversal tool that walks from a specific object instance across a reified association to a far endpoint, with edge-attribute filtering. Its inputs are closed-vocabulary (a linkName from the graph, an integer depth ≤ 3, a direction of ToDestination/ToSource); malformed arguments return isError: true (never a thrown protocol error), and a large subgraph returns a resource_link plus an opaque cursor. Use the ontology_explore associations scope to discover the reified associations and endpoints to traverse.

The no-argument overload resolves the OntologyGraph from the service collection. Pass a graph explicitly when it is not registered there:

builder.Services
    .AddMcpServer()
    .AddOntologyTools(ontologyGraph);

To obtain the adapted tools directly:

IEnumerable<McpServerTool> tools = OntologyServerToolFactory.CreateServerTools(ontologyGraph);

Each tool preserves the originating descriptor's OutputSchema, annotations, and action constraint summaries (carried in the tool's _meta). The query path requires an IObjectSetProvider in the host's service provider; register one (e.g. via AddOntology) before serving traffic.

License

MIT

Product Compatible and additional computed target framework versions.
.NET 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.10.0 127 8/7/2026
2.9.1 131 6/23/2026
2.9.0 118 6/19/2026
2.8.0 112 5/25/2026