slinedev/SHOPLINE-Storefront-MCP
If you are the rightful owner of SHOPLINE-Storefront-MCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
The SHOPLINE-Storefront-MCP server connects AI agents to specific SHOPLINE store catalogs, shopping carts, and policies, enhancing customer shopping experiences.
SHOPLINE Storefront MCP (Third-Party Development)
⚠️ Important Notice: This is a third-party developer initiative. SHOPLINE has not officially released any MCP services. This project hopes for official support in developing related features.
Third-party MCP server providing AI shopping assistant functionality for SHOPLINE stores. Using the Model Context Protocol (MCP), AI assistants can access real-time commerce data from SHOPLINE stores to help customers search, browse, and purchase products through natural language conversations.
View Demo | Third-Party Service
Features
Core Capabilities
- Product Search: Natural language product discovery with context-aware recommendations
- Cart Management: Create, update, and manage shopping carts programmatically
- Store Information: Access policies, FAQs, shipping, and return information
- Real-time Data: Live product availability, pricing, and inventory status
Third-Party Implementation Notes
- Built on SHOPLINE's Storefront API
- Authentication requires StorefrontAccessToken (hoping for official support for simplified setup)
- Some advanced features may be limited by current API capabilities
- Community-maintained with hopes for official SHOPLINE support
Quick Start
Prerequisites
- SHOPLINE store with configured products
- StorefrontAccessToken for your store
- AI client that supports MCP (Claude Desktop, etc.)
Basic Setup
Use the third-party MCP endpoint:
https://sline.dev/mcp
Test connection:
const response = await fetch('https://sline.dev/mcp', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
jsonrpc: '2.0',
method: 'tools/call',
id: 1,
params: {
store: 'your-store-handle',
name: 'search_shop_catalog',
arguments: {
query: 'wireless headphones',
context: 'Customer looking for workout headphones under $150'
}
}
})
});
API Reference
Available MCP Tools
search_shop_catalog
Search products in the store catalog with intelligent context understanding.
Parameters:
query
(required) - Search query for productscontext
(optional) - Additional context like budget, use case, preferences
Example:
{
"name": "search_shop_catalog",
"arguments": {
"query": "wireless headphones",
"context": "Customer needs workout headphones under $150"
}
}
Returns: Product information including name, price, variants, images, and availability.
search_shop_policies_and_faqs
Query store policies, shipping information, and frequently asked questions.
Parameters:
query
(required) - Question about policies or store informationcontext
(optional) - Specific context for the inquiry
Example:
{
"name": "search_shop_policies_and_faqs",
"arguments": {
"query": "return policy for electronics",
"context": "Customer considering headphone purchase"
}
}
Returns: Relevant policy information and FAQ answers.
get_cart
(Hoping for official support)
Retrieve current cart contents and checkout information.
Parameters:
cart_id
(required) - Unique cart identifier
Returns: Cart contents, totals, and checkout URL.
update_cart
(Hoping for official support)
Add, remove, or modify items in the shopping cart.
Parameters:
cart_id
(optional) - Existing cart ID (creates new if not provided)lines
(required) - Array of cart line items with quantities
Example:
{
"name": "update_cart",
"arguments": {
"lines": [
{
"merchandise_id": "gid://shopline/ProductVariant/123456",
"quantity": 1
}
]
}
}
Returns: Updated cart information with totals and checkout options.
Usage Examples
Basic Product Search
Customer: "I need wireless headphones for working out"
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"store": "your-store-handle",
"name": "search_shop_catalog",
"arguments": {
"query": "wireless headphones",
"context": "Customer needs workout/sports headphones, sweat-resistant"
}
}
}
Response:
Found these workout-suitable wireless headphones:
1. [SportBuds Pro](https://store.com/sportbuds) - $89
• Sweat-resistant IPX7 rating
• 8-hour battery life
• Secure ear hook design
2. [FitSound Active](https://store.com/fitsound) - $129
• Noise cancellation
• 12-hour battery life
• Waterproof design
Cart Management
Customer: "Add the SportBuds to my cart"
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"store": "your-store-handle",
"name": "update_cart",
"arguments": {
"lines": [{
"merchandise_id": "gid://shopline/ProductVariant/sportbuds-pro",
"quantity": 1
}]
}
}
}
Response:
✅ SportBuds Pro added to cart!
Cart Summary:
• SportBuds Pro Wireless Headphones - $89
• Tax: $7.12
• Total: $96.12
[Proceed to Checkout](https://store.com/cart/checkout)
Policy Inquiry
Customer: "What's your return policy?"
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"store": "your-store-handle",
"name": "search_shop_policies_and_faqs",
"arguments": {
"query": "return policy electronics"
}
}
}
Response:
Electronics Return Policy:
• 30-day return window from purchase date
• Items must be in original packaging
• Original receipt required
• Free return shipping for defective items
• Refund processed within 3-5 business days
Integration Guide
AI Client Setup
Claude Desktop
Add to your Claude Desktop MCP configuration:
{
"mcpServers": {
"shopline-storefront": {
"command": "npx",
"args": ["-y", "@slinedev/storefront-mcp@latest"],
"env": {
"SHOPLINE_STORE_HANDLE": "your-store-handle",
"SHOPLINE_ACCESS_TOKEN": "your-storefront-access-token"
}
}
}
}
Custom Implementation
For custom AI applications, make direct HTTP requests to the third-party endpoint:
const mcpRequest = {
jsonrpc: '2.0',
method: 'tools/call',
id: Date.now(),
params: {
store: 'your-store-handle',
name: 'search_shop_catalog',
arguments: {
query: userQuery,
context: userContext
}
}
};
const response = await fetch('https://sline.dev/mcp', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(mcpRequest)
});
Authentication Setup
-
Obtain StorefrontAccessToken
- Create a custom app in your SHOPLINE admin
- Request storefront access permissions
- Generate access token for API calls
-
Configure Store Handle
- Use your store's unique handle (usually the subdomain)
- Format:
store-name
fromstore-name.shoplineapp.com
Deployment Considerations
- Rate Limiting: Respect SHOPLINE's API rate limits
- Error Handling: Implement robust error handling for API failures
- Caching: Consider caching product data for better performance
- Security: Keep access tokens secure and rotate regularly
Technical Specifications
Protocol
- MCP Version: 1.0
- Transport: JSON-RPC 2.0 over HTTP
- Authentication: Bearer token (StorefrontAccessToken)
- Content-Type:
application/json
Dependencies
- SHOPLINE Storefront API: Primary data source
- Node.js: ≥18.0.0 for local development
- MCP Client: Any MCP-compatible AI client
Limitations
- Third-party service with potential API limitations
- Some features require official SHOPLINE support
- Authentication complexity for customer account features
- Real-time data depends on SHOPLINE API update frequency
Resources
Documentation
- Third-Party MCP Documentation - Complete implementation guide
- SHOPLINE Storefront API - Official API reference
- Model Context Protocol - MCP specification
Community & Support
- GitHub Repository - Source code and issues
- SHOPLINE Partners Community - Developer community
- Third-Party Support - Technical assistance
Official SHOPLINE Resources
- SHOPLINE Platform - E-commerce platform
- SHOPLINE App Store - App marketplace
- SHOPLINE Partners Program - Partner opportunities
Contributing
We welcome contributions to improve this third-party SHOPLINE Storefront MCP implementation!
Development Setup
git clone https://github.com/slinedev/shopline-storefront-mcp
cd shopline-storefront-mcp
npm install
npm run dev
Contributing Guidelines
- Fork the repository and create a feature branch
- Follow existing code style and conventions
- Add tests for new functionality
- Update documentation as needed
- Submit a pull request with clear description
License
This project is licensed under the MIT License - see the file for details.
Support
- Documentation: sline.dev/mcp
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: hi@sline.dev
Built with ❤️ by third-party developers, hoping for SHOPLINE official support