Company Logo
MCIP
Client

AI Agents & Connection

MCIP is a Machine Customer Interaction Protocol — a universal commerce protocol that transforms AI agents into autonomous machine customers. Product discovery through semantic search is the first implemented capability, powered by two search modes: simple vector search and agentic LangGraph-powered search. Cart management, checkout, and order tracking modules are planned as the protocol evolves.

The Machine Customer: AI Agents as Commerce Participants

The concept behind MCIP goes beyond giving AI agents a search endpoint. We're building toward a future where AI agents act as machine customers — autonomous participants in commerce that can discover products, manage carts, complete purchases, and track orders on behalf of users.

Think of it this way: today, when you ask a friend to pick something up from the store, they don't need to know the store's internal inventory system. They understand what you want, walk in, find it, and buy it. MCIP gives AI agents that same capability — a universal protocol for interacting with any store, starting with the most fundamental operation: finding the right product.

Product discovery is the foundation. Before an AI agent can add items to a cart or complete a checkout, it needs to understand what users want and find products that match. That's why MCIP's first implementation focuses on intelligent semantic search — getting this right enables everything that follows.

The protocol is designed to grow. Today's search_product tool becomes part of a complete commerce toolkit: add_to_cart, view_cart, checkout, track_order. Each module builds on the same three-layer architecture, the same adapter pattern, and the same MCP protocol. One integration today means access to all future capabilities.


Integration Overview: Connecting Through MCP

How AI Agents Connect to MCIP

MCIP implements the Model Context Protocol (MCP) via @rekog/mcp-nest, providing a standardized way for AI agents to discover and use commerce tools. When an agent connects, it receives a clear specification of available tools, their parameters, and expected responses — no guesswork required.

The connection process follows the MCP standard:

  1. Discovery: Agent connects to the MCIP MCP endpoint
  2. Tool listing: Agent receives available tools with Zod-validated parameter schemas
  3. Invocation: Agent calls tools with structured parameters
  4. Response: MCIP returns normalized product data with relevance scores

Currently, the primary MCP tool available is search_product:

// MCP Tool Definition (via @rekog/mcp-nest)
@Tool({
  name: 'search_product',
  description: 'Search products using natural language with semantic understanding',
  parameters: z.object({
    query: z.string().describe('Natural language search query'),
    take: z.number().optional().default(10),
    skip: z.number().optional().default(0),
  }),
})
async searchProduct(params: SearchParams): Promise<SearchResponse> {
  // Executes semantic search with optional agentic filtering
}

AI agents don't need to understand Qdrant vectors, LangGraph workflows, or adapter patterns. They call search_product with a natural language query like "Nike running shoes under $100" and receive normalized, scored results. All the intelligence happens behind the protocol boundary.

Two Search Modes: Speed vs. Precision

Behind the search_product tool, MCIP offers two complementary search strategies that agents benefit from:

1. Simple Vector Search (via SearchService)

Direct vector similarity search in Qdrant. Fast, low-latency, ideal for straightforward queries. No LLM calls — pure embedding generation followed by vector search. Best for queries like "laptop" or "blue running shoes."

2. Agentic Hard-Filtered Search (via HardFilteringService)

A full LangGraph state machine that executes a 4-stage pipeline:

  • Stage 1 — Parallel Filter Extraction: Three concurrent GPT-4o-mini calls extract categories, brands, and price constraints from the query using Zod-validated structured output
  • Stage 2 — Brand Validation: Queries Qdrant facet search to validate extracted brands against actual store inventory
  • Stage 3 — Hybrid Search: Generates 1536-dimensional embeddings via OpenAI text-embedding-3-small, then executes hybrid search combining vector similarity with exact payload filtering (brand, category, price)
  • Stage 4 — LLM Verification: Passes results through GPT-4o-mini for semantic verification against the original intent

This means when a user tells their AI agent "find me Nike shoes under $100 but not running shoes," the agentic pipeline autonomously extracts brand=Nike, priceMax=100, excludeCategory=Running, validates Nike exists in the catalog, performs hybrid vector+filter search, and verifies results actually match — all in under 500ms.

The Conversation Flow

Once connected, the interaction flows naturally:

  1. User tells the AI agent: "I need a good coffee maker"
  2. Agent recognizes commerce intent and calls MCIP's search_product tool
  3. MCIP's agentic pipeline extracts filters, searches semantically, verifies results
  4. Agent receives normalized product data with relevance scores
  5. Agent presents options conversationally to the user

What makes this powerful is the separation of concerns. The AI agent maintains conversational context — remembering what the user discussed, their preferences, their tone. MCIP maintains commerce context — search state, product data, and (in future releases) cart contents. Together, they create an intelligent shopping experience.


Supported Platforms: Any Agent That Speaks MCP

ChatGPT

ChatGPT's function calling maps naturally to MCIP's MCP tools. When a user asks about products, ChatGPT recognizes the commerce intent, invokes search_product with the right parameters, and presents results conversationally. Its multi-turn capabilities make it particularly effective at refining searches — "show me something similar but cheaper" works seamlessly because ChatGPT maintains conversation history while MCIP handles the semantic search.

Claude

Claude's integration with MCIP emphasizes thoroughness and reasoning. Claude excels at understanding nuanced requests and helping users think through purchase decisions. When connected to MCIP, Claude becomes particularly effective at complex queries that benefit from the agentic LangGraph pipeline — queries with implicit filters, exclusions, and preference signals.

Custom Agents

The real power of MCIP is that any AI agent can integrate. Building a specialized outdoor gear bot? A personal fashion stylist? A B2B procurement agent? They all use the same MCP protocol and benefit from the same semantic search infrastructure.

Custom agents connect through standard MCP client libraries. A minimal integration requires just a few lines:

import { Client } from '@modelcontextprotocol/sdk/client';

const client = new Client({
  name: 'my-shopping-agent',
  version: '1.0.0',
});

// Connect to MCIP's MCP endpoint
await client.connect(transport);

// Discover available tools
const tools = await client.listTools();
// Returns: [{ name: 'search_product', ... }]

// Search products
const results = await client.callTool({
  name: 'search_product',
  arguments: {
    query: 'gaming laptop under 1500',
    take: 5,
  },
});

Future Platforms

Gemini, Mistral, open-source alternatives — they're all welcome. MCIP is platform-agnostic by design. If an AI agent can communicate via the MCP protocol, it can be a machine customer through MCIP. No waiting for specific support, no custom adapters per agent platform.


Authentication: Current Implementation

Search Operations: Open Access

The current MCIP implementation provides open access for search operations. AI agents can query products without credential management overhead. This design prioritizes integration simplicity — getting started requires zero authentication setup for product discovery.

# Direct HTTP search (no auth required)
curl "http://localhost:8080/search?q=laptop"

# Agentic search with LangGraph pipeline (no auth required)
curl "http://localhost:8080/hard-filtering/search?q=nike+shoes+under+100"

Admin Operations: API Key Required

Admin endpoints (product sync, index management) require the x-admin-api-key header:

curl -X POST http://localhost:8080/admin/sync \
  -H "x-admin-api-key: your-secret-key"

Configured via the ADMIN_API_KEY environment variable. Simple to implement, easy to rotate.

Planned Enhancements

As MCIP evolves toward cart management and checkout, authentication will expand to include:

  • Session-bound tokens: Tying agent sessions to authenticated users
  • OAuth 2.0: User-controlled authorization for agents acting on their behalf
  • JWT tokens: Stateless authentication for distributed deployments
  • Per-agent permissions: Controlling which tools each agent can access

These enhancements will arrive alongside cart and checkout modules, where authentication becomes essential for protecting user data and purchase actions.


Session Management: Redis-Backed Context

How Sessions Work

Every interaction between an AI agent and MCIP happens within a session. Sessions are created automatically on first contact and identified by a UUID. All subsequent interactions reference this session ID, ensuring continuity and isolation.

Current session configuration:

SettingValue
Storage backendRedis
Session TTL24 hours
ID formatUUID v4
IsolationComplete per session

Sessions currently maintain search context. When cart tools are added (Q1-Q2 2026), sessions will also persist cart contents, enabling users to search, add items, leave, and return to find their cart intact.

Isolation and Privacy

Each session is completely isolated. What happens in one session is invisible to others. This isolation ensures privacy, prevents data leakage between users, and means failures in one session don't affect others. Think of it as separate shopping carts — dropping one doesn't spill the others.


Best Practices: Building Great Machine Customer Experiences

Leverage Both Search Modes

For simple, direct queries ("laptop", "blue sneakers"), the simple vector search delivers fast results. For complex natural language queries with implicit filters ("Nike shoes under $100 but not running shoes"), the agentic LangGraph pipeline extracts, validates, and verifies — yielding precise results. Great agents learn when to use which.

Conversational Commerce

Do: Let users refine searches through natural dialogue. "Show me more like the second one but in red" should work because the agent maintains conversation context while MCIP handles the semantic search.

Don't: Force rigid query formats. Don't make users repeat information. Don't forget previous interactions.

Error Communication

Do: Translate MCIP's structured errors into helpful guidance. If a brand isn't found, suggest alternatives. If search takes longer than usual, show partial results.

Don't: Expose raw error codes. Instead of "Error 2001," say "I couldn't find that brand in this store. Would you like me to search for similar brands?"

MCIP's graceful degradation helps here — if the embedding API fails, search falls back to keyword matching. If the vector DB is slow, cached results are returned. Agents should communicate these fallbacks naturally.

Progressive Disclosure

MCIP returns rich product data (title, description, price, brand, category, attributes, variants, images, relevance score). Good agents present this progressively — name and price first, details on request. The score field (0-1) helps agents prioritize which results to highlight.

Understand the Protocol Vision

MCIP is building toward full machine customer capabilities. Agents built today should anticipate tomorrow's tools. Design your agent architecture to accommodate cart management, checkout flows, and order tracking when those modules arrive. The MCP tool discovery mechanism means your agent will automatically see new tools as they're deployed.


Integration Patterns

The Shopping Assistant

The most common pattern. The AI agent acts as a helpful shopping companion — conversational, knowledgeable, never pushy. It uses MCIP's search_product to find relevant products and presents them naturally. This pattern works because it matches user expectations from human shopping experiences.

The Research Analyst

For B2B scenarios, agents become research analysts. They use MCIP's semantic search to compile comparisons, surface products matching specific technical requirements, and present structured data for decision-making. The agentic search mode is particularly valuable here, as complex B2B queries often contain implicit filters.

The Personal Shopper

Some agents learn individual preferences over time. They use MCIP's search results combined with their own conversation memory to build user profiles. As MCIP adds personalization capabilities in future phases, this pattern will become even more powerful.

The Procurement Agent

Fully autonomous agents that handle routine purchasing decisions. Today they discover and recommend products through MCIP. As cart and checkout modules arrive, they'll be able to complete purchases end-to-end — true machine customers.