Searchspring Integration Assistant
Provides implementation guidance, code validation, and troubleshooting tools for Searchspring's e-commerce APIs including search, autocomplete, recommendations, and tracking. Helps developers properly integrate Searchspring functionality with platform-specific code examples and best practices.
README
Searchspring Integration Assistant (MCP Server)
MCP server designed as an integration assistant to help customers implement Searchspring APIs correctly.
This Model Context Protocol (MCP) server provides implementation guidance, code validation, and troubleshooting tools for Searchspring's e-commerce APIs. Instead of making direct API calls, it serves as an intelligent assistant that helps developers properly implement search, autocomplete, IntelliSuggest tracking, and recommendations in their applications.
Features
The server provides integration assistance for all major Searchspring APIs:
- Implementation Guidance: Step-by-step code examples and API endpoint construction
- Platform-Specific Code Generation: Ready-to-use code for Shopify, Magento, BigCommerce, etc.
- Code Validation & Troubleshooting: Analyze existing implementations and identify issues
- Best Practices: Security, performance, and reliability recommendations
- Documentation Links: Direct links to relevant Searchspring documentation
Supported API Integrations:
- Search API: Implementation guides for product search with filtering and pagination
- Autocomplete API: Real-time search suggestions implementation patterns
- Suggest API: Spell correction and alternative query suggestions
- IntelliSuggest Tracking: Behavioral event tracking implementation (product views, cart, purchases)
- Recommendations API: Personalized product recommendation integration
- Trending API: Popular search terms and trending content
- Beacon API: Analytics event tracking for recommendations
- Bulk Indexing API: Product data indexing guidance (requires secret key)
- Finder API: Advanced product discovery interfaces
Installation
-
Clone this repository
-
Install dependencies:
npm install -
Build the project:
npm run build
Configuration
Configure your Searchspring credentials as environment variables:
# Required: Your Searchspring site ID
SEARCHSPRING_SITE_ID=your_site_id_here
# Optional: Your Searchspring secret key (required only for bulk indexing)
SEARCHSPRING_SECRET_KEY=your_secret_key_here
# Optional: Request timeout in milliseconds (defaults to 10000)
SEARCHSPRING_TIMEOUT=10000
Usage
Running the Server
Start the MCP server:
npm start
For development with auto-reload:
npm run dev
Available Tools
1. Search API Implementation (searchspring_search)
Get implementation guidance for product search integration:
{
"query": "running shoes",
"page": 1,
"resultsPerPage": 20,
"filters": {
"brand": ["Nike", "Adidas"],
"color": "blue"
},
"sort": {
"price": "asc",
"popularity": "desc"
}
}
Returns: Complete API endpoint URL, required parameters, JavaScript implementation example, and documentation links.
2. Autocomplete Implementation (searchspring_autocomplete)
Get implementation guidance for real-time search suggestions:
{
"query": "runn",
"resultsPerPage": 10
}
Returns: Complete autocomplete implementation with debouncing, error handling, and UI integration examples.
3. Search Suggestions (searchspring_suggest)
Get product discovery suggestions:
{
"query": "athletic wear",
"categories": ["shoes", "apparel"],
"limit": 10
}
4. IntelliSuggest Tracking (searchspring_intellisuggest_track)
Track behavioral events for IntelliSuggest analytics and personalization:
{
"type": "product",
"event": {
"sku": "ABC123",
"name": "Running Shoes",
"price": 99.99,
"category": "footwear"
}
}
Available event types:
product: Product page viewcart: Cart addition/viewsale: Purchase completion
5. Platform Implementation (searchspring_platform_implementation)
Get platform-specific IntelliSuggest tracking code:
{
"platform": "shopify",
"eventType": "product",
"sku": "ABC123",
"price": 99.99
}
Available platforms:
shopify,bigcommerce-stencil,magento2,custom, etc.
6. Search Result Click Guide (searchspring_search_result_click)
Get implementation guide for search result click tracking:
{
"intellisuggestData": "data-from-search-api",
"intellisuggestSignature": "signature-from-search-api"
}
7. Beacon Tracking (searchspring_beacon_track)
Track user events for recommendations analytics:
{
"type": "profile.impression",
"event": {
"profile": {
"tag": "similar-products",
"placement": "product-page"
}
},
"context": {
"website": {
"trackingCode": "abc123"
},
"userId": "user-123",
"sessionId": "session-456"
}
}
Available event types:
profile.render: Profile rendered on pageprofile.impression: Profile viewed by userprofile.click: Profile clicked by userprofile.product.render: Product rendered in profileprofile.product.impression: Product viewed in profileprofile.product.click: Product clicked in profile
8. Recommendations (searchspring_recommendations)
Get personalized product recommendations:
{
"tags": ["similar-products", "trending"],
"products": ["ABC123"],
"limits": [5, 10],
"shopper": "user123"
}
Required parameters:
tags: Array of recommendation profile tags/IDs
Optional parameters:
products: Product SKUs being viewed (for cross-sell/similar)limits: Maximum products per profileshopper: Logged-in shopper ID for personalizationcart: Product SKUs in current cartlastViewed: Recently viewed product SKUsbought_together: Frequently bought together
9. Trending Data (searchspring_trending)
Get trending products or search terms:
{
"type": "products",
"timeframe": "day",
"categoryId": "electronics",
"limit": 20
}
10. Finder API (searchspring_finder)
Get product facets for building product finder interfaces:
{
"filters": {
"color": "blue",
"brand": ["Nike", "Adidas"]
},
"includedFacets": ["color", "size", "brand"]
}
12. Code Validation (searchspring_code_validator)
NEW: Validate and troubleshoot your Searchspring implementation:
{
"code": "<script>if (typeof ss != 'undefined') { ss.track.product.view({sku: 'ABC123'}); }</script>",
"codeType": "tracking",
"platform": "shopify",
"issue": "Tracking events not appearing in analytics"
}
Returns:
- ✅ Validation results (what's working correctly)
- ⚠️ Warnings (potential issues)
- 💡 Suggestions (improvements)
- 🔧 Troubleshooting (specific issue diagnosis)
Supported code types:
tracking: IntelliSuggest event tracking validationsearch: Search API implementation validationautocomplete: Autocomplete implementation validationrecommendations: Recommendation integration validation
9. Finder API (searchspring_finder)
Advanced product discovery with faceting:
{
"query": "athletic wear",
"filters": {
"brand": ["Nike", "Adidas"],
"price": "25-100",
"size": ["M", "L"]
},
"facets": ["brand", "price", "size", "color"],
"sort": "popularity_desc",
"page": 1,
"resultsPerPage": 20,
"includeMetadata": true
}
Integration with MCP Clients
This server can be used with any MCP-compatible client. Here's how to configure it with Claude Desktop:
- Add to your MCP settings file (
claude_desktop_config.json):
{
"mcpServers": {
"searchspring": {
"command": "node",
"args": ["path/to/searchspring-mcp-server/dist/index.js"],
"env": {
"SEARCHSPRING_API_KEY": "your_api_key",
"SEARCHSPRING_SITE_ID": "your_site_id"
}
}
}
}
- Restart Claude Desktop
API Documentation
For detailed information about Searchspring APIs, visit:
Development
Project Structure
src/
├── index.ts # Main MCP server setup
├── searchspring-client.ts # Searchspring API client
└── config.ts # Configuration management
Adding New Tools
To add a new tool:
- Add the tool definition to the
toolsarray inindex.ts - Add the corresponding method to
SearchspringClient - Add the case handler in the tool call switch statement
Error Handling
The server includes comprehensive error handling:
- Configuration validation on startup
- API request/response error handling
- Proper error messages returned to MCP clients
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。