User Guides
MCP
MCP Server Developer Guide

MCP Server Developer Guide


This guide explains how to build a compliant and functional MCP server from scratch. You'll learn about:

  • The core architecture and logic of an MCP server
  • How to wrap existing APIs into MCP-compatible services

MCP Server

An MCP server is a standalone program (typically Node.js or Python) that exposes a list of tools or capabilities an AI client can invoke. MCP servers:

  • Define tools using structured schemas (JSON / zod)
  • Accept input from clients via a known protocol (STDIO or SSE)
  • Execute logic or call APIs
  • Return structured results back to the client

Wrapping External APIs

Many MCP servers are just wrappers around public APIs (e.g., item ecosystems (oms, wms, bnp, tms), channels (Shopify, Amazon,) Perplexity, GitHub, Claude).

Common Example: Wrapping GitHub API

execute: async ({ repo }) => {
  const res = await fetch(`https://api.github.com/repos/${repo}`);
  const data = await res.json();
  return { stars: data.stargazers_count };
}

Converting API to MCP Server via Channel Store in item DI

This guide focus on how to configure and register an external API in Item DI using the Channel Store, and convert it into an MCP-compatible server that can be used in Item MCP. This process is typically handled by developers and system integrators.

Step 1: Configure Basic Information

connector

  1. Log into the Item DI system
  2. In the left-side menu, click Channel Store
  3. Click + to add a new channel
  4. Fill in the connector's basic metadata:
FieldDescription
NameName of the channel (shown to users)
Connector CodeUnique identifier used internally
Upload LogoOptional visual icon
Connector TypeChoose from: external channel, item internal system, etc.
Country/RegionSupported region
Help DocumentURL to usage guide or help center
LimitRate limit
Limit UnitTime unit for limit (days, hours, seconds)
Dev URL / Stage URL / Prod URLEnvironments for API endpoint switching
DescriptionShort summary of the connector function
  1. After all fields are completed, click Save.

Step 2: Configure Authentication Method

authentic

Based on the API’s specification, select the correct authorization type used to access the API. Supported types may include:

  • API Key
  • OAuth
  • Client ID + Secret
  • Authorization Code
  • Password
  • Session Token
  • Basic Auth

Different authorization methods will trigger different configuration UI pages in Item DI.

Step 3: Configure Execute Operations

import-operation

This is where you import the actual API specification and prepare it to be executed and tested.

  1. Navigate to the Execute Operation tab

  2. Click Import to begin adding the API endpoints

  3. Choose an import method:

    • Import File – drag in a Swagger/OpenAPI file directly
    • Import from Apifox – input your API Key, Project ID, and File ID
  4. After successful import, the available endpoints will appear in a list

  5. Choose a specific endpoint and click Test to debug it

Notes

Before testing, you must create a corresponding channel under a merchant account. This enables the system to locate the associated connector in the Channel Store for testing and test connection behavior.

test-para

After completing these steps, the connector (API) becomes available in Item DI as a "channel". It is now also exposed to Item MCP as a server following the MCP protocol automatically. You can test or register it in Playground, or add it to MCP clients.