Skip to main content

MCP Core Overview

@interopio/mcp-core is a TypeScript library that provides foundational functionality for building Model Context Protocol (MCP) servers within the io.Intelligence ecosystem. It enables seamless interoperability between applications and Large Language Models (LLMs) by providing interfaces and functions to create, register, and manage MCP tools.

Key Features

  • MCP Server Creation: Initialize and manage MCP server instances compliant with the MCP specification
  • System Tools: Pre-built tools for searching and starting applications and workspaces
  • Static Tools: Define tools in configuration that are automatically managed
  • Dynamic Tools: Register and unregister tools at runtime based on application state
  • Working Context Integration: Optional integration with @interopio/working-context for enhanced context management
  • Client Capability Detection: Automatically adjusts available tools based on client capabilities
  • Multi-Transport Support: Works with STDIO, HTTP, and web-based transports

Target Audience

This library is designed for developers building MCP servers for io.Connect Desktop or io.Connect Browser platforms who need to expose application functionality to LLMs.

Installation

npm install @interopio/mcp-core
Transport Required

The @interopio/mcp-core package creates MCP server instances that must be connected to an MCP-compliant transport to function. The core library is designed to be transport-agnostic and is typically consumed through the @interopio/mcp-web or @interopio/mcp-http packages, which provide the necessary transport layers.

Requirements

  • Node.js 16 or higher
  • TypeScript 4.5 or higher
  • Valid io.Intelligence license key
  • io.Connect Desktop or io.Connect Browser instance

Basic Setup

The following example demonstrates how to initialize the MCP Core factory and create a basic MCP server instance:

import { IoIntelMCPCoreFactory } from "@interopio/mcp-core";
import IOConnectBrowser from "@interopio/browser";

// Initialize io.Connect
const io = await IOConnectBrowser();

// Create MCP Core API
const mcpApi = await IoIntelMCPCoreFactory(io, {
licenseKey: process.env.IO_LICENSE_KEY!,
transport: { type: "web" },
server: {
name: "my-mcp-server",
title: "My MCP Server",
},
});

// Create an MCP instance with client capabilities
const { instance } = mcpApi.createMCPInstance({
sampling: {},
elicitation: {},
});

// IMPORTANT: The instance must be connected to a transport to function
// See @interopio/mcp-web or @interopio/mcp-http for complete implementations
console.log("MCP server instance created (requires transport connection)");
Recommended Approach

For production use, use @interopio/mcp-web or @interopio/mcp-http instead of directly using MCP Core. These packages provide the complete server implementation with transport layers included.

Core Concepts

MCP Server

An MCP server acts as a bridge between LLMs and io.Connect applications. The core library creates standard McpServer instances that must be connected to an MCP-compliant transport to function. Each server instance exposes tools that LLMs can invoke to interact with applications.

The MCP Core package is designed to be transport-agnostic, meaning it can work with any transport layer that implements the Model Context Protocol specification. However, it does not include transport functionality itself. For production use, you should use one of the following packages that wrap MCP Core with a transport layer:

Tools

Tools are functions that LLMs can call to perform actions. The library supports three types:

  • System Tools: Built-in tools for searching and starting applications and workspaces
  • Static Tools: Defined in configuration, automatically registered and unregistered based on interop availability
  • Dynamic Tools: Registered at runtime using io.interop.register with MCP-specific flags

Client Capabilities

MCP clients declare capabilities such as sampling (for search operations) and elicitation (for user confirmations). The library adjusts available tools based on these capabilities:

  • Search tools require sampling capability
  • Start tools require elicitation capability
  • Working context tools are available unless client declares experimental.workingContext

Working Context Integration

Optional integration with @interopio/working-context enables the io_connect_get_working_context tool, allowing LLMs to retrieve the user's current business context (selected clients, portfolios, instruments, etc.).

Transport Integration

To create a functioning MCP server, the MCP Core instance must be connected to a transport layer. The io.Intelligence ecosystem provides two transport packages:

@interopio/mcp-web

Web-based transport designed for io.Connect Browser applications. Ideal when:

  • Your application runs in a browser environment
  • You need both server and client capabilities in the same application (self-contained example)
  • You want to leverage io.Connect Browser's interop system for MCP communication

Learn more about MCP Web

@interopio/mcp-http

HTTP-based transport designed for io.Connect Desktop integration. Ideal when:

  • You need a traditional HTTP server for MCP communication
  • You're integrating with io.Connect Desktop applications
  • You want to expose MCP capabilities through RESTful endpoints

Learn more about MCP HTTP

Next Steps