Skip to main content
Version: Latest

Model Context Protocol (MCP)

Connect to remote MCP servers as a client and expose your application's tools, prompts, and resources as an MCP server.

The Model Context Protocol standardizes how AI applications discover and invoke tools, prompts, and resources across process boundaries. The framework provides both sides of the protocol.

Client — Consume Remote MCP Servers​

Connect to external MCP servers, discover their tools, and make them available in the AI orchestrator.

builder.Services
.AddCoreAIServices()
.AddCoreAIOrchestration()
.AddCoreAIMcpClient();

Key capabilities:

  • SSE transport — Connect to remote MCP servers over HTTP with full authentication support (API key, Basic, OAuth2, custom headers)
  • StdIO transport — Communicate with locally installed MCP server processes via stdin/stdout
  • Automatic tool discovery — Discovered tools appear in the orchestrator's tool registry and are invoked transparently
  • Capability resolution — Semantic similarity filtering to select relevant tools from large MCP server catalogs

📖 MCP Hosts → — Full documentation with transport configuration, authentication, and integration details.

Server — Expose Your AI Capabilities​

Expose your registered AI tools, prompts, and resources to external MCP clients.

builder.Services
.AddCoreAIServices()
.AddCoreAIOrchestration()
.AddCoreAIMcpServer();

Or, using the builder pattern with stores:

builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddOpenAI()
.AddMcpServer(mcpServer => mcpServer
.AddYesSqlStores()
.AddFtpResources()
)
)
);

Key capabilities:

  • Tool exposure — Registered AI tools become callable by external MCP clients
  • Prompt serving — Prompts from the catalog and code-registered instances are listed and retrievable
  • Resource serving — Files and data served through pluggable resource type handlers (FTP, SFTP, custom)
  • Authentication — OpenID Connect, API key, or no-auth for development

📖 MCP Server → — Full documentation with endpoint setup, authentication, and resource configuration.

WebMCP — Tools for AI Agents in the Browser​

Register your AI tools and page tools with the standard WebMCP API (document.modelContext), and let the AI chat discover and run every WebMCP tool the page it is used from exposes. The W3C reference polyfill brings WebMCP to browsers without native support.

builder.Services.AddCrestAppsCore(crestApps => crestApps
.AddAISuite(ai => ai
.AddWebMcp(webMcp => webMcp.AddPageTools<AIChatHub>())));

app.MapWebMcpTools();

📖 WebMCP → — Your AI tools as WebMCP tools, the page scripts and polyfill, the AI chat as a WebMCP agent, the playground, and security.

Resource Type Handlers​

Create custom resource type handlers to serve files, data, or content from any protocol as MCP resources.

builder.Services
.AddCoreAIMcpServer()
.AddMcpResourceType<MyDatabaseResourceHandler>("database");

📖 Resource Types → — Implementation guide with built-in handlers and custom handler examples.