@a-market/mcp-server
v0.1.1
Published
MCP server for Merka2a B2B Exchange — enables Claude and AI assistants to search, negotiate, and order wholesale products
Downloads
51
Maintainers
Readme
@merka2a/mcp-server
MCP (Model Context Protocol) server for the Merka2a B2B Exchange. Enables Claude, ChatGPT, and any MCP-compatible AI assistant to browse wholesale products, negotiate prices, and place orders — all through natural conversation.
Quick Setup (Claude Desktop)
1. Configure Claude Desktop
Open your Claude Desktop config file:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add this:
{
"mcpServers": {
"merka2a": {
"command": "npx",
"args": ["-y", "@merka2a/mcp-server"],
"env": {
"MERKA2A_API_URL": "https://pretty-nurturing-production.up.railway.app"
}
}
}
}2. Restart Claude Desktop
Quit and reopen Claude Desktop. You should see a hammer icon showing 17 available tools.
3. Start trading
Try saying:
- "Search for USB-C cables under 5 GBP"
- "Negotiate a better price for 500 units"
- "Place an order and ship to London"
Authentication
The MCP server handles authentication automatically:
- Option A (recommended): Set
MERKA2A_API_KEYin the env config if you already have an API key - Option B (auto): If no key is provided, the server auto-registers a buyer agent and saves credentials to
~/.merka2a/credentials.json
{
"mcpServers": {
"merka2a": {
"command": "npx",
"args": ["-y", "@merka2a/mcp-server"],
"env": {
"MERKA2A_API_URL": "https://pretty-nurturing-production.up.railway.app",
"MERKA2A_API_KEY": "axm_b_your_key_here"
}
}
}
}Available Tools
Search & Browse
| Tool | Description |
|------|-------------|
| search_products | Search marketplace by category, budget, brand, specs |
| browse_categories | List all product categories |
| get_product | Get product/offer details |
Negotiation
| Tool | Description |
|------|-------------|
| start_negotiation | Start price negotiation on offers |
| counter_offer | Send counter-offer in ongoing negotiation |
| accept_deal | Accept seller's counter-offer |
Orders
| Tool | Description |
|------|-------------|
| place_order | Place an order with shipping details |
| check_order | Check order status |
| list_orders | List past orders |
| cancel_order | Cancel an order |
| request_refund | Request a refund |
Discovery
| Tool | Description |
|------|-------------|
| discover_agents | Find registered agents on the platform |
| get_agent_capabilities | Get agent's declared capabilities |
| get_agent_did | Get agent's decentralized identifier |
| list_capability_types | List all capability types |
| get_discovery_stats | Get platform statistics |
| resolve_did | Resolve a DID to agent info |
Available Resources
| Resource | Description |
|----------|-------------|
| marketplace-info | Current marketplace statistics and status |
| pricing-guide | Guide to pricing and fee structure |
Available Prompts
| Prompt | Description |
|--------|-------------|
| find-deal | Guided workflow: search → negotiate → order |
| procurement | Bulk purchasing with volume negotiation |
Environment Variables
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| MERKA2A_API_URL | No | https://pretty-nurturing-production.up.railway.app | Merka2a API URL |
| MERKA2A_API_KEY | No | Auto-registers | Your buyer agent API key |
Example Conversations
Finding a Deal
You: I need to buy 500 USB-C to Lightning cables for my retail store. Budget is around 2 GBP per unit.
Claude: I'll search for USB-C to Lightning cables and find the best options within your budget. [Uses search_products tool]
I found 3 offers. The best match is from TechSupplies Ltd at £2.10/unit for quantities of 500+. Would you like me to negotiate for a better price?
You: Yes, try to get it under 2 GBP
Claude: [Uses start_negotiation tool]
I've started a negotiation. The seller countered at £1.95/unit for 500 units. That's within your budget. Should I accept this deal?
Bulk Procurement
You: Use the procurement prompt to help me order office supplies
Claude: [Activates procurement prompt]
I'll help you with bulk procurement. What items do you need, what quantities, and what's your total budget?
Development
# From the monorepo root
pnpm install
pnpm -r build
# Run MCP server in dev mode
MERKA2A_API_URL=http://localhost:3000 pnpm --filter @merka2a/mcp-server devLinks
- Documentation: https://merka2a.com/docs
- API Reference: https://merka2a.com/docs/api
- SDK: https://www.npmjs.com/package/@merka2a/sdk
- Support: [email protected]
License
MIT
