Configures and manages the CrestApps Orchard Core MCP Server feature, including Streamable HTTP endpoint setup, authentication modes, opt-in tool exposure, MCP prompts/resources, and permission management.
Ships in crestapps-orchardcore. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The MCP Server feature exposes Orchard Core AI tools, tool instances, prompts, and resources to external MCP clients (IDEs, desktop agents, other AI apps) over the MCP Streamable HTTP transport.
CrestApps.OrchardCore.AI.Mcp.Server, from the CrestApps.OrchardCore.AI.Mcp package. It depends only on CrestApps.OrchardCore.AI. Install the package in the web/startup project.McpServerOptions.Tools, or set ExposeAllTools to true. Prompts and resources are not affected by this switch.ExposeAllTools. Only selectable tools (registered with .Selectable()) can be exposed.ExposeAllAgents and Agents (configuration only).OpenId in production. None is for local development only.IOptionsMonitor<McpServerOptions>, so saving the card takes effect without a tenant reload.{
"steps": [
{
"name": "Feature",
"enable": [
"CrestApps.OrchardCore.AI",
"CrestApps.OrchardCore.AI.Mcp.Server"
],
"disable": []
}
]
}
Enable CrestApps.OrchardCore.AI.Agent and other tool-providing features only when you intend to expose their tools, and enable CrestApps.OrchardCore.AI.ToolInstances to expose tool instances.
routes.MapMcp("mcp") maps one Streamable HTTP endpoint, relative to the tenant URL prefix, protected by the McpServerPolicy authorization policy (schemes McpApiKey and Api).
| Method | Purpose |
|---|---|
POST /mcp | Send a JSON-RPC message. The reply is a JSON payload or a text/event-stream. |
GET /mcp | Open the server-to-client event stream for an established session. |
DELETE /mcp | End the session. |
The MCP SDK 2.x transport is stateless by default, which does not map GET and DELETE (they answered 405 Method Not Allowed until #1355). The server now sets the transport's session mode from OrchardCore:CrestApps:AI:McpServer:SessionMode (read from configuration only, when the tenant starts):
SessionMode | Behavior |
|---|---|
StatefulForInitializeClients (default) | A client that starts with the initialize handshake gets an Mcp-Session-Id and can use GET and DELETE. Clients of the 2026-07-28 protocol revision or later are served without a session and get 405 for GET and DELETE. |
Stateful | Every client gets a session; newer clients fall back to the initialize handshake. |
Stateless | No sessions; GET and DELETE are not mapped. Use it on several nodes without session affinity. |
A session lives in the memory of the node that created it, so a multi-node site needs session affinity or Stateless.
{
"OrchardCore": {
"CrestApps": {
"AI": {
"McpServer": {
"SessionMode": "Stateless"
}
}
}
}
}
The deprecated HTTP+SSE transport (GET /mcp/sse plus POST /mcp/message) is not mapped. Clients that only speak that transport cannot connect.
Configure exposure under Settings > Artificial Intelligence (permission ManageMcpServerSettings, granted to Administrator by default). The MCP server fields sit in the shared Authentication card and the Exposed tools card, which the WebMCP settings also use:
The allow-list is enforced by both the list and the call handlers, so a tool that is not exposed can neither be discovered nor invoked. Each Tools entry matches a code-registered tool name, a tool instance's function name, or a tool instance's technical name (case-insensitive).
These fields are stored as McpServerSettings site settings and projected into McpServerOptions. The shell configuration section OrchardCore:CrestApps:AI:McpServer is bound afterwards and overrides the stored values (the older OrchardCore:CrestApps:McpServer section is still read first for backward compatibility).
{
"OrchardCore": {
"CrestApps": {
"AI": {
"McpServer": {
"AuthenticationType": "OpenId",
"RequireAccessPermission": true,
"ExposeAllTools": false,
"Tools": [ "searchForContentItems", "orchardcore-docs" ],
"ExposeAllAgents": false,
"Agents": [ "research-agent" ]
}
}
}
}
}
| Option | Default | Description |
|---|---|---|
AuthenticationType | OpenId | OpenId, ApiKey, or None. |
ApiKey | null | Key required in ApiKey mode. |
RequireAccessPermission | true | In OpenId mode, also require the AccessMcpServer permission. |
ExposeAllTools | false | Expose every selectable tool and tool instance; Tools is ignored. |
Tools | [] | Allow-list of tool and tool instance names. |
ExposeAllAgents | false | Expose every Agent profile as a callable tool. Not on the admin card. |
Agents | [] | Allow-list of Agent profile Names. Not on the admin card. |
An exposed agent runs its whole profile (system message, tools, data sources) for any client that passes authentication. Its internal tools are neither filtered by nor exposed through Tools.
CrestApps.OrchardCore.AI.ToolInstances.orchardcore-docs with base URL https://docs.orchardcore.net). See orchardcore-ai-tool-instances.MCP clients now discover exactly those search tools while every content or management tool stays private.
| Mode | How clients authenticate |
|---|---|
OpenId | Bearer token from the Orchard Core OpenID server (Api scheme). Requires AccessMcpServer when RequireAccessPermission is true. |
ApiKey | Authorization: Bearer <key>, Authorization: ApiKey <key>, or the raw key. |
None | No credentials. Development only. |
Prefer setting ApiKey through user secrets or environment variables (OrchardCore__CrestApps__AI__McpServer__ApiKey) rather than the admin card in production.
{
"mcpServers": {
"orchard-core": {
"transport": {
"type": "http",
"url": "https://your-orchard-site.com/mcp",
"headers": {
"Authorization": "Bearer <token-or-api-key>"
}
}
}
}
}
Send Accept: application/json, text/event-stream on POST /mcp.
Managed under Artificial Intelligence > Model Context Protocol > Prompts (permission ManageMcpPrompts). A prompt has a Title, unique Name, optional Description, optional Arguments (name, title, description, required) referenced in content as {{argName}}, and one or more Messages with role user or assistant. Clients call ListPrompts and GetPrompt.
{
"steps": [
{
"name": "McpPrompt",
"Prompts": [
{
"Prompt": {
"Name": "summarize",
"Title": "Summarize",
"Description": "Summarizes supplied text.",
"Arguments": [
{ "Name": "text", "Description": "The text to summarize.", "Required": true }
]
},
"Messages": [
{ "Role": "user", "Content": "Summarize the following text in three bullet points: {{text}}" }
]
}
]
}
]
}
Managed under Artificial Intelligence > Model Context Protocol > Resources (permission ManageMcpResources). Add resource lists the registered resource types. The editor takes Display text, Name, Path, Description, MIME type, and type-specific fields. The URI is built as {source}://{itemId}/{path}, and a path with {variable} placeholders becomes a templated resource listed by ListResourceTemplates.
| Type | Variables | Registered when |
|---|---|---|
file | {fileName}, optional {providerName} | Always; reads only the tenant's McpFiles folder or a registered provider (see below) |
media | {path} | OrchardCore.Media is enabled |
content-item | {contentItemId}, {contentItemVersionId} | OrchardCore.ContentManagement is enabled |
content-type | {contentType} | OrchardCore.ContentManagement is enabled |
recipe-schema | none | CrestApps.OrchardCore.Recipes is enabled |
recipe-step-schema | {stepName} | CrestApps.OrchardCore.Recipes is enabled |
recipe | {recipeName} | CrestApps.OrchardCore.Recipes is enabled |
ftp, sftp | {path} | See orchardcore-ai-mcp-resources |
Where file resources read from. Without {providerName}, a file resource reads only from the tenant's App_Data/Sites/{tenant}/McpFiles folder. Create the folder and put in it only the files to share; until it exists nothing is found. Paths that leave the folder and dot-prefixed, hidden or system files are refused. A {providerName} template variable (the client supplies the value) selects a provider registered in code with McpFileProviderOptions (CrestApps.OrchardCore.AI.Mcp.Services); an unknown name is not found. A literal name in the template, such as handbook/{fileName}, does not select a provider: it is only part of the path. Earlier versions read from the web host's content root, so move the shared files into McpFiles when upgrading.
services.Configure<McpFileProviderOptions>(options =>
{
options.AddProvider("handbook", sp => new PhysicalFileProvider("/srv/handbook"));
});
The MCP client picks the file name, so every file a provider can reach is readable by every client allowed to read resources. Never register the content root or the application data folder (they hold appsettings.json, connection strings, keys and every tenant's database).
{
"steps": [
{
"name": "McpResource",
"Resources": [
{
"Source": "recipe-step-schema",
"DisplayText": "Recipe step schema",
"Resource": {
"Uri": "{stepName}",
"Name": "recipe-step-schema",
"Description": "JSON schema for one recipe step.",
"MimeType": "application/json"
}
}
]
}
]
}
Resource.Uri accepts either the path portion (expanded to {source}://{itemId}/{path} on import) or a full URI that already uses the source scheme. The resource title is always taken from DisplayText.
using CrestApps.Core.AI.Mcp;
using CrestApps.Core.AI.Mcp.Models;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using ModelContextProtocol.Protocol;
using OrchardCore.Modules;
[RequireFeatures("CrestApps.OrchardCore.AI.Mcp.Server")]
public sealed class Startup : StartupBase
{
internal readonly IStringLocalizer S;
public Startup(IStringLocalizer<Startup> stringLocalizer)
{
S = stringLocalizer;
}
public override void ConfigureServices(IServiceCollection services)
{
services.AddCoreAIMcpResourceType<DatabaseResourceTypeHandler>("database", entry =>
{
entry.DisplayName = S["Database"];
entry.Description = S["Query data from databases."];
entry.SupportedVariables =
[
new McpResourceVariable("table") { Description = S["The database table name."] },
new McpResourceVariable("id") { Description = S["The row ID to fetch."] },
];
});
}
}
public sealed class DatabaseResourceTypeHandler : McpResourceTypeHandlerBase
{
public DatabaseResourceTypeHandler()
: base("database")
{
}
protected override Task<ReadResourceResult> GetResultAsync(
McpResource resource,
IReadOnlyDictionary<string, string> variables,
CancellationToken cancellationToken)
{
variables.TryGetValue("table", out var table);
variables.TryGetValue("id", out var id);
// Query your data source here and return its contents.
return Task.FromResult(CreateErrorResult(resource.Resource.Uri, "Not implemented."));
}
}
The base class also offers SanitizePath (rejects traversal sequences) and IsTextMimeType. Add an McpResource display driver gated on entry.Source when the type needs its own fields.
With OrchardCore.Deployment enabled, the MCP Prompts and MCP Resources export steps appear under the Artificial Intelligence category of the deployment-plan editor. With CrestApps Recipes (CrestApps.OrchardCore.Recipes) enabled, the McpPrompt and McpResource recipe steps have JSON schemas.
orchardcore-ai-webmcp) gives the same selectable tool catalog to AI agents in the signed-in user's browser through document.modelContext, with its own WebMCP selection card and a per-user Access AI tool check. Use it instead of the MCP Server when the agent runs in the browser.orchardcore-nlweb) adds the ask tool, which can be selected on the Exposed tools card to let MCP clients ask the site natural-language questions.The Prompts and Resources pages use Orchard Core's AdminList shape (list names McpPrompts and McpResources), so they follow the site's List or Grid layout. See orchardcore-admin-lists to add columns with IAdminListColumnsProvider.
Tools, or set ExposeAllTools: true.ExposeAllTools never exposes system or hidden tools.McpServerOptions through IOptions<T> keeps the first value forever; switch to IOptionsMonitor<McpServerOptions>.CurrentValue (or IOptionsSnapshot<T> in a scoped service).OrchardCore:CrestApps:McpServer to OrchardCore:CrestApps:AI:McpServer.| Symptom | Check |
|---|---|
| Client connects but lists no tools | Tools are opt-in. Select them on the Exposed tools card or set ExposeAllTools. |
A tool is missing even with ExposeAllTools | It is a system or hidden tool, or its providing feature is disabled. |
| Tool listed but the call fails or is skipped | The calling identity lacks AccessAITool_{name} or AccessAnyAITool. |
| 401 or 403 | Authentication type and credentials do not match, or AccessMcpServer is missing in OpenId mode. |
| Legacy SSE client cannot connect | Point it at /mcp with a Streamable HTTP transport. |
GET /mcp or DELETE /mcp answers 405 | The client uses no session (2026-07-28 revision or later, or SessionMode is Stateless). Only session clients can use them. |
appsettings.json value ignored | Use OrchardCore:CrestApps:AI:McpServer; configuration changes need an app restart. |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
orchard-core, mcp-server, streamable-http, tool-exposure, ai-integration
/crestapps-orchardcore:orchardcore-ai-mcp-serverfrom crestapps-orchardcore
npx claudepluginhub crestapps/crestapps.agentskills --plugin crestapps-orchardcore137 skills in this plugin
/orchardcore-accountsSkill for the CrestApps Orchard Core Accounts module (CrestApps.OrchardCore.Accounts) with its Account Members, Account Team, Account E-mail Domains and Account Locations features. Covers the Account type and AccountPart, the account picker and search, IAccountChildTypeRule, account page sections (AccountPageTabs, AddPageSection, Notes), members and IAccountMemberService, account invitations, the account owner and team picked from staff, e-mail domains, locations with a billing location, the account's billing profile and party members, the Accounts recipe and deployment steps, and the admin menu. Use this skill when requests mention accounts, the businesses or households records belong to, an account page tab, members, invitations, owners, domains or locations. Strong matches include AccountPart, AccountPageTabs, IAccountMemberService, IAccountInvitationService, AccountInvitation, AccountTeamPart, AccountEmailDomainsPart, IAccountEmailDomains, AccountLocationsPart and ManageAccountMembers./orchardcore-accounts-b2bSkill for the CrestApps Orchard Core Accounts B2B module (CrestApps.OrchardCore.Accounts.B2B), business selling on an Account content item. Covers B2BAccountPart and B2BAccount, buyers as account members and ship-to addresses as account locations, terms (deposit, net days, credit limit) through the account-terms tender billed to the account, the account's billing profile, purchase order numbers, quotes, price lists through IBuyerPriceProvider, order limits, approvals and budgets, OCI punchout, the account/business page and API, the PriceLists recipe and deployment steps, the B2BAccounts report source, and the move from the removed Companies module. Use this skill when requests mention B2B, wholesale or business buyers, net terms, purchase orders, price lists, order approvals or punchout. Strong matches include B2BAccountPart, B2BAccount, AccountTerms, AccountTermsTenderProvider, B2BAccountBillingProfileSource, IB2BAccountStore, PriceList, B2BPriceProvider, B2BApprovalService and ManageB2BAccounts./orchardcore-addressesSkill for the CrestApps Orchard Core Addresses module (CrestApps.OrchardCore.Addresses, Addresses.Countries, Addresses.GooglePlaces). Covers the immutable Address value shared by customers, checkout, orders, shipping and taxation, per-country address formats from Google address data with AddAddressesCore, IAddressFormatProvider and AddressFormat, IAddressValidator and AddressProblem, IAddressFormatter, the AddressEditor shape with IAddressEditorService and AddressEditorOptions, CreateAddressEditorAsync and CreateAddressDisplayAsync, ICountryService and managed Country content items, address suggestions through IAddressAutocompleteProvider, ContactInfo, NamedAddress and IShippingAddressBook, the Google Places provider with its protected API key, the address-autocomplete rate-limit group, and the ManageAddressSuggestions permission. Use it when requests mention Orchard Core addresses, international address formats, address validation, a country list, address autocomplete or Google Places./orchardcore-advanced-seoSkill for the CrestApps Orchard Core Advanced SEO module (CrestApps.OrchardCore.Seo), which publishes schema.org structured data as one JSON-LD graph per page and for NLWeb answers. Covers the Schema.org part (SchemaOrgPart, SchemaOrgPartSettings with SchemaType and property mappings from Content, Fixed, Editor or Liquid sources), the StructuredDataSettings site settings and their deployment step, the ManageAdvancedSeoSettings permission, Orchard Core SEO, Search, Products and Reviews integration, the getSchemaOrgOptions, configureContentTypeSchemaOrg and configureSiteStructuredData AI tools, describing pages in code with IPageStructuredData, the structured-data tag helper and the structured_data Liquid filter, and extending with IStructuredDataProvider, ContentPartStructuredDataProvider and SelfDescribingParts. Use this skill when requests mention schema.org, JSON-LD, structured data, rich results, Google required properties, product or article markup, or Advanced SEO in Orchard Core./orchardcore-agentic-commerceSkill for the CrestApps Orchard Core Agentic Commerce module (CrestApps.OrchardCore.AgenticCommerce), which lets AI agents such as Gemini and ChatGPT buy from the store with the Universal Commerce Protocol (UCP), the Agentic Commerce Protocol (ACP) and the AP2 mandates extension (preview). Covers every feature (UCP, account linking, catalog and cart, MCP and A2A bindings, ACP, Agent Product Feeds, AP2), the /.well-known/ucp and /.well-known/acp.json discovery documents, checkout session endpoints, agent platforms and their sign-in, AgenticCommerceSettings, store signing keys in Secrets, idempotency, payment handlers (Stripe shared payment tokens, Google Pay, test credentials), delegated 3-D Secure, embedded checkout, signed order updates, the AgentPlatforms recipe step, and extending with IAgentPaymentHandler, IUcpProfileContributor, IUcpCheckoutExtension and IAgentOrderPublisher. Use it when requests mention agentic commerce, selling through AI agents, UCP, ACP, AP2, agent checkout or agent product feeds./orchardcore-agreementsSkill for the CrestApps Orchard Core Agreements module (CrestApps.OrchardCore.Agreements), support and maintenance contracts with accounts. Covers the Agreement record with its SA- number, status, period and covered hours (a block or a monthly allowance with rounding), Content > Agreements, the account Service tab, the ManageAgreements and ViewAgreements permissions, the Agreements recipe and deployment step, module terms in Properties with IAgreementTermsValidator, IAgreementUsageProvider and IAgreementBalanceService, the hourly lifecycle task with IAgreementObserver, account manager notifications, and the Agreement Usage and Burn-down reports. Use this skill when requests mention service agreements, support contracts, prepaid or retainer hours, entitlements or agreement expiry. Strong matches include Agreement, AgreementHours, AgreementStatus, AgreementBalance, AgreementUsage, IAgreementManager, IAgreementObserver and TicketAgreementTerms.Other plugins' skills for the same job