Skip to main content
The Remote StreamNative MCP Server can publish Apache Pulsar Functions as Model Context Protocol (MCP) tools. This lets IDE copilots, external orchestrators, and other MCP-aware agents call your stream processing workloads without building a custom integration layer.

Automatic discovery and refresh

  • The Remote MCP Server regularly discovers Pulsar Functions that expose the required entry point within namespaces your StreamNative identity can access.
  • Eligible functions are published as MCP tools. Default tool names follow the pattern pulsar_function_<tenant>_<namespace>_<function> when you do not provide overrides.
  • Server-Sent Events (SSE) signal catalog changes. When the MCP server reports tools changed, Orca Engine reloads cached metadata so clients immediately see the latest schema and description updates.

Metadata surfaced to MCP clients

  • Exported tools include the function name, description, and tenancy scope so callers understand which workload they are invoking.
  • The Remote MCP Server inspects each function’s input and output schema and maps supported Pulsar schemas (JSON, AVRO, and primitive types) into MCP tool parameters so clients know which fields to supply.
  • If a function omits schemas or uses unsupported formats, the generated tool may not appear or falls back to opaque byte payloads. Capture schema definitions and document expected payload fields to keep downstream calls deterministic.

Customize tool expose metadata

Provide descriptive names and summaries to make the MCP tool easier for LLM agents to use.
{
  "env": {
    "MCP_TOOL_NAME": "InventoryLookup",
    "MCP_TOOL_DESCRIPTION": "Returns stock levels for a given SKU across all warehouses."
  }
}
  • Set MCP_TOOL_NAME and MCP_TOOL_DESCRIPTION in the function environment through CLI deployment flags.
  • When present, the Remote MCP Server uses these values instead of the default derived name and description.
  • Administrators can require both variables before publishing a function so only well-documented tools appear in the Remote StreamNative MCP Server.

Prepare functions for publication

  1. Confirm the Pulsar Function runs in a tenant and namespace that the Remote MCP Server can reach through your StreamNative Cloud account or service principal.
  2. Define clear input and output schemas and update the function description so MCP users recognize the required payload fields.
  3. Apply the MCP_TOOL_NAME and MCP_TOOL_DESCRIPTION variables, then redeploy or restart the function so the discovery cycle picks up the customized metadata.

Control discovery with MCP features

  • The Remote MCP Server exports Pulsar Functions by default when your identity can reach the associated tenant and namespace.
  • To skip function discovery from a client, send the X-MCP-Features header during connection setup and omit pulsar-functions-as-tools from the list.
  • Provide the feature explicitly—X-MCP-Features: pulsar-admin,pulsar-client,pulsar-functions-as-tools—when you want to combine function tools with other MCP capabilities while keeping control over optional features.

Consume the function from MCP clients

  • MCP clients invoke the tool using standard call_tool requests. The managed server forwards payloads to the corresponding Pulsar Function and streams responses back.
  • The MCP server enforces StreamNative Cloud permissions, so users only see functions they are authorized to access.
  • Use StreamNative observability dashboards to monitor traffic routed through MCP and track invocation latency and throughput.
This pattern lets you share existing Pulsar Function automation with any MCP-aware application while keeping configuration centralized in StreamNative Cloud.
I