AI_SYNC MCP Server
Connects GPT-4 to a merchant store API, allowing AI to query and update store data for a specific merchant, including listing stores, searching for relevant stores, and adding new stores with descriptions and tags.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@AI_SYNC MCP Servershow me all stores for Tnc_Store"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
AI_SYNC Tooling with OpenAI + MCP
This project connects GPT-4 to a backend merchant store API using the Model Context Protocol (MCP). It allows querying and updating store data under a specific merchant class.
⚠️ Note: The server is currently hardcoded to work with the
Tnc_Storemerchant ID. Only data under this class is accessible to the AI.
⚙️ Setup Instructions
1. Clone the Repository
git clone https://github.com/your-org/ai_sync
cd ai_sync2. Create a .env File
Inside the project root, create a .env file containing your OpenAI API key:
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx3. Set Up the Python Environment with uv
If you haven’t installed uv, do so with:
curl -Ls https://astral.sh/uv/install.sh | shThen set up and activate the virtual environment:
uv venv .venv
source .venv/bin/activateThis will automatically install dependencies based on the uv.lock file.
4. Start the Merchant API Server
Ensure the backend server (AI_SYNC) is running locally on:
http://localhost:4001Required POST endpoints:
/MerchantStore/findAllStores/MerchantStore/findStore/MerchantStore/addNewStore
5. Run the Tooling System
To launch the client and tool server together:
uv run client.py server.pyserver.pyprovides tool definitions via MCPclient.pyconnects to GPT-4 and routes user queries
Related MCP server: Shopify MCP Server
💬 Example Queries
Query: Show me all the stores for this merchant
Query: I want to add a new store, CGV Cinemas - Vincom Nguyễn Chí Thanh, Hà Nội, with keywords: CGV, rạp chiếu phim, Hà Nội, Vincom, giải trí⚠️ For multiline input, paste it as a single line. Shift+Enter will submit prematurely in most terminals.
📁 Basic Project Structure
ai_sync/
├── client.py # MCP + OpenAI chat client
├── server.py # Tool server using FastMCP
├── .env # OpenAI API key
├── uv.lock # Dependency lock file (used by uv)✅ Available Tools
Tool Name | Description |
| List all stores for |
| Natural language search for relevant stores |
| Add a store with full description and tags |
🔒 Notes
Only data for
Tnc_Storeis accessibleRequires OpenAI GPT-4 (
gpt-4o) and a functioning backend APIRuns entirely locally using standard input/output
Available Tools
3 toolsaddNewStoreC
Add a new store to the merchant's database.
Args:
merchantID: The merchant to which the store belongs (e.g., "tnc").
name: Full name of the store.
keywords: List of keywords describing the store.
fullOriginContent: Full description of the store.
fullTextSearch: Preprocessed text for search indexing.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| keywords | Yes | ||
| fullOriginContent | Yes | ||
| fullTextSearch | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states this is an 'Add' operation, implying a write/mutation, but doesn't cover critical aspects like required permissions, whether the operation is idempotent, error handling, or what the output contains. For a mutation tool with zero annotation coverage, this is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, starting with the core purpose. The parameter list is structured with bullet points, making it easy to scan. However, the 'Args:' section could be more integrated, and some sentences like 'Preprocessed text for search indexing' are a bit technical without context, slightly reducing efficiency.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that there's an output schema (which reduces the need to describe return values), no annotations, and 4 parameters with 0% schema coverage, the description is moderately complete. It covers the purpose and parameters but lacks behavioral details and usage guidelines. For a mutation tool, this is adequate but has clear gaps, making it a minimum viable description.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description lists all 4 parameters with brief explanations, adding meaning beyond the input schema, which has 0% description coverage. However, the explanations are minimal (e.g., 'Full name of the store') and don't provide detailed semantics like format constraints or examples beyond 'merchantID: The merchant to which the store belongs (e.g., "tnc").' This partially compensates for the schema gap but isn't comprehensive.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Add a new store to the merchant's database.' It specifies the verb ('Add') and resource ('store'), making the action explicit. However, it doesn't differentiate from sibling tools like 'findAllStores' or 'findStore', which are read operations, so it's not a perfect 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, such as needing a valid merchantID, or contrast it with sibling tools like 'findAllStores' for retrieval. Usage is implied by the purpose but lacks explicit context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
findAllStoresC
Find all stores under a merchantID class Args: merchantID: string
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. It mentions what the tool does but doesn't describe important behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, or what happens when no stores are found. The description is minimal and lacks operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately concise with two sentences that directly state the purpose and provide parameter context. The structure with a clear purpose statement followed by Args section is well-organized. However, the 'Args' section references a parameter that doesn't exist in the schema, which creates some confusion.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that the tool has 0 parameters, 100% schema coverage, and an output schema exists, the description is reasonably complete for its simple purpose. However, the mismatch between the description mentioning 'merchantID' and the schema having no parameters creates confusion. For a tool with sibling alternatives, more differentiation would be beneficial.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description mentions 'merchantID: string' in the Args section, which adds context about what information might be relevant, even though it's not a formal parameter. This provides helpful semantic context beyond the empty schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the tool's purpose as 'Find all stores under a merchantID class', which is a clear verb+resource combination. However, it doesn't distinguish this tool from its sibling 'findStore', making the scope somewhat vague. The mention of 'merchantID class' adds specificity but the relationship to sibling tools is unclear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided about when to use this tool versus alternatives like 'findStore'. The description implies usage for retrieving all stores associated with a merchantID, but there's no explicit comparison with sibling tools or context about when this is preferred over more specific searches.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
findStoreB
Search for relevant stores under a merchant using a natural language query.
Args:
merchantID: The merchant class to search under (e.g., "Tnc").
queryText: A natural language description of the desired product or store.
| Name | Required | Description | Default |
|---|---|---|---|
| queryText | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes the tool as a search operation, which implies it's read-only and non-destructive, but doesn't explicitly state this or cover other traits like authentication needs, rate limits, or response format. The description adds minimal context beyond the basic operation, failing to compensate for the lack of annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded: the first sentence clearly states the tool's purpose. The Args section adds necessary details but includes an extraneous parameter ('merchantID') not in the schema, slightly reducing efficiency. Overall, it's concise with minimal waste, though the inconsistency detracts from perfect structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (a search operation with 1 parameter) and the presence of an output schema (which should cover return values), the description is somewhat complete. It explains the purpose and parameter semantics but lacks behavioral details (e.g., read-only nature, error handling) and has a parameter inconsistency. This makes it adequate but with clear gaps, especially in compensating for the absence of annotations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 1 parameter ('queryText') with 0% description coverage, meaning the schema provides no details. The description adds semantics by explaining 'queryText' as 'A natural language description of the desired product or store,' which clarifies its purpose. However, it also mentions 'merchantID' in the Args section, which is not in the schema, creating confusion. This inconsistency reduces the score, as it doesn't fully compensate for the schema's lack of coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Search for relevant stores under a merchant using a natural language query.' It specifies the verb ('Search'), resource ('stores under a merchant'), and method ('natural language query'). However, it doesn't explicitly differentiate from sibling tools like 'findAllStores' (which might list all stores without search) or 'addNewStore' (a write operation), so it falls short of a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage context by mentioning 'under a merchant' and 'natural language query,' suggesting it's for search scenarios. However, it lacks explicit guidance on when to use this tool versus alternatives like 'findAllStores' (e.g., for filtered vs. unfiltered results) or 'addNewStore' (for creation vs. search). No exclusions or prerequisites are stated, leaving room for ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
3 tool updates
v0.1.0- First observed
addNewStore - First observed
findAllStores - First observed
findStore
TDQS
Scored across 3 tools
Each tool has a clearly distinct purpose: addNewStore creates a new store, findAllStores retrieves all stores for a merchant, and findStore searches stores with a natural language query. There is no overlap in functionality, and the descriptions make the distinctions explicit.
The naming is inconsistent: addNewStore uses camelCase with a verb-noun pattern, findAllStores uses camelCase with a verb-noun pattern, and findStore uses camelCase but lacks a noun (it should be findStores or similar). While all are camelCase, the lack of a consistent noun in findStore and the mix of 'New' in addNewStore versus no qualifiers in others shows poor pattern adherence.
With only 3 tools, the count feels thin for a store management domain, as it lacks update and delete operations. However, it covers basic create, list, and search functions, which is borderline but workable for minimal CRUD.
The tool set is significantly incomplete for store management. It includes add, find all, and search, but misses essential operations like update_store, delete_store, and get_store_by_id. This creates gaps that could lead to agent failures when full lifecycle management is needed.
Maintenance
Related MCP Connectors
Manage your NanoCart store from any AI agent: products, orders, coupons, subscribers, reports.
Monetize and manage your Tip4Serv store directly from your LLM.
Manage your Savanto store from your AI: catalog, content, prompts, and analytics, by chat.
Enable AI assistants to interact seamlessly with Feeef e-commerce stores, products, and orders usi…
Related MCP Servers
AlicenseBqualityDmaintenanceConnects AI assistants to the TailorKit API, enabling them to manage customizable product templates for e-commerce platforms through natural language conversations.466MIT- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to access and manage Shopify store data including products, orders, inventory, and analytics through the Model Context Protocol. It allows users to query store performance and customer details using natural language.-
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Haravan e-commerce platforms via MCP protocol for natural language management of stores. Provides 7 smart analytics tools for insights and 63 base tools for CRUD operations on products, orders, customers, and inventory.18Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to manage WooCommerce stores, including products, orders, customers, categories, coupons, attributes, variations, order notes, refunds, reports, payment gateways, meta data, reviews, settings, data, posts, and system status through natural language.MIT