Stock API MCP Server
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., "@Stock API MCP ServerShow me available BMWs under 30,000 euros"
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.
Stock API MCP Server
A Model Context Protocol server that provides discovery-first vehicle inventory search through the Stock API. Instead of simple vehicle listings, it offers comprehensive inventory insights with sample vehicles and intelligent refinement suggestions.
šÆ What Makes This Different
This POC implements a discovery-first approach that transforms vehicle search from a simple list into an informative inventory exploration:
š Inventory Overview: See total counts by make, fuel type, condition, and body type
š Representative Sample: View 10-15 example vehicles from available inventory
š” Smart Suggestions: Get refinement ideas based on actual inventory
š Transparent Sampling: Understand you're seeing examples, not exhaustive results
Related MCP server: MCP Advisor
Quick Start
Install dependencies:
npm installConfigure API access:
# .env file is already configured with: # STOCK_API_KEY=<replace with your API key> # STOCK_API_COUNTRY=it # STOCK_API_BASE_URL=https://stock-api.dealerk.comRun the server:
npm startTest manually:
npm test
Available Tools
š search_vehicles
Discover vehicle inventory with comprehensive overview and sample listings. Shows total counts by make, fuel, condition plus representative vehicle examples with refinement suggestions.
Example Response Format:
š INVENTORY OVERVIEW
Found 123 vehicles total across all dealers
š·ļø BY CONDITION: USED (115), NEW (7), KM0 (1)
ā½ BY FUEL TYPE: Diesel (68), Petrol (20), Hybrid (17)
š BY MAKE: Peugeot (11), Audi (9), BMW (8), Fiat (8)
š BY BODY TYPE: SUV (75), Sedan (29), Hatchback (7)
š SAMPLE VEHICLES (showing 15 of 123)
1. 2022 Volvo XC40 ⢠Diesel ⢠32,000km ⢠ā¬23,900
2. 2025 Dfsk Glory 500 ⢠Petrol ⢠5,000km ⢠ā¬16,500
3. 2021 Mercedes-Benz Classe A ⢠Hybrid ⢠28,000km ⢠ā¬19,900
š” REFINE YOUR SEARCH
⢠Try "Peugeot" for 11+ Peugeot vehicles
⢠Filter by "Diesel" for 68 diesel vehicles
⢠Add "under 25000" for budget-friendly optionsParameters:
make- Vehicle brand filter (BMW, Audi, Fiat, etc.)fuel- Fuel type (DIESEL, PETROL, HYBRID, ELECTRIC)maxPrice- Maximum price in EURminPrice- Minimum price in EURcondition- Vehicle condition (NEW, USED, KM0)limit- Sample size (default 10, max 15)
š get_vehicle_details (Coming Soon)
Get complete information about a specific vehicle by ID.
Usage with Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"stock-api-mcp": {
"command": "node",
"args": ["/path/to/stock-api-mcp/src/index.js"]
}
}
}Recent Updates
ā Discovery-First Implementation Complete (September 2025)
Fixed API Response Parsing: Now combines
promoResults+searchResults(38 vehicles vs 12 previously)Added Inventory Overview: Shows total counts with breakdowns by condition, fuel, make, body type
Smart Refinement Suggestions: Provides intelligent next steps based on available inventory
Transparent Sampling: Clear indication when showing sample vs total available vehicles
Technical Improvements
Proper deduplication of vehicle results by ID
Enhanced error handling and logging
User-friendly response formatting with emojis and structure
Discovery-first approach optimized for POC constraints
Testing the Server
Option 1: MCP Inspector (Recommended)
npx @modelcontextprotocol/inspector src/index.jsThen test with queries like:
{"make": "BMW", "limit": 5}{"fuel": "DIESEL", "maxPrice": 30000}{"limit": 10}(for full inventory overview)
Option 2: Direct API Testing
node test.jsOption 3: Claude Desktop Integration
Works seamlessly with Claude Desktop - just ask natural language queries like:
"Show me the available inventory"
"What BMWs are available?"
"Find diesel cars under 25000 euros"
Development Status
ā Phase 1-2 Complete: Core search functionality with discovery-first approach š Phase 3-6 Next: Vehicle details tool, natural language parsing, enhanced testing
Architecture Notes
The server implements a discovery-first design pattern that:
Embraces API pagination limitations transparently
Maximizes value from facet data for inventory insights
Provides actionable refinement suggestions
Sets clear expectations about sample vs comprehensive results
Perfect for POCs where comprehensive search isn't feasible but inventory discovery is valuable.
License
MIT
Available Tools
1 toolsearch_vehiclesB
Discover vehicle inventory with comprehensive overview and sample listings. Shows total counts by make, fuel, condition plus representative vehicle examples with refinement suggestions.
| Name | Required | Description | Default |
|---|---|---|---|
| fuel | No | Fuel type: DIESEL, PETROL, ELECTRIC, HYBRID | |
| make | No | Vehicle make/brand (e.g., BMW, Fiat, Audi) | |
| limit | No | Number of results to return (default 10, max 50) | |
| query | No | Natural language search query (e.g., 'BMW diesel under 30000') | |
| maxPrice | No | Maximum price in EUR | |
| minPrice | No | Minimum price in EUR | |
| condition | No | Vehicle condition: NEW, USED, KM0 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does disclose that the output includes total counts and representative examples, which is useful. However, it does not mention whether the operation is read-only, whether results are paginated, how 'refinement suggestions' behave, or any other side effects or limitations. It provides moderate transparency but lacks depth.
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 two sentences long and every word adds value. The first sentence states the core function, and the second clarifies the output structure (counts and sample listings). It is concise, front-loaded, and easy to parse for an AI agent. No unnecessary phrases or repetition.
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 has 7 parameters and no output schema, the description provides a high-level overview but not enough detail to fully understand the expected return shape or how to construct effective queries. It mentions counts and examples, but does not clarify whether the response is a JSON object with fields for counts and arrays for vehicles. It is adequate but leaves gaps for an agent to fully invoke the tool correctly.
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 provides detailed descriptions for all 7 parameters, so the description does not need to repeat them. The description mentions fields like make, fuel, and condition, which aligns with schema properties, but adds no additional semantics about how parameters interact or are formatted. With 100% schema coverage, the baseline of 3 is appropriate.
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 identifies the tool as a vehicle inventory discovery tool with a specific output: overview counts and sample listings. It goes beyond a mere restatement of the name, though the verb 'Discover' is less specific than 'Search'. With no sibling tools provided, it cannot distinguish from alternatives, so it misses the top 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?
No explicit guidance is given about when to use this tool over alternatives or when not to use it. The description implies it is for browsing/overviewing inventory, but does not state target use cases, prerequisites, or exclusions. Since there are no sibling tools, some implicit context may exist, but the description itself provides no usable comparison or situational guidance.
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.
1 tool update
v0.1.0- First observed
search_vehicles
TDQS
Scored across 1 tool
With only one tool, there is no possible ambiguity or overlap. The tool's purpose is clear and singular.
The single tool name 'search_vehicles' follows a clean verb_noun convention. Consistency is not an issue with one tool.
A single tool feels thin for a server named 'Stock API MCP Server', but the tool itself is comprehensive in scope, providing search, counts, and refinements. It borders on acceptable but likely needs more tools for full coverage.
The server only offers search functionality. Missing essential operations like creating, updating, or deleting vehicle records, making the surface severely incomplete for a stock/inventory management domain.
Maintenance
Related MCP Connectors
A Model Context Protocol server for Wix AI tools
Model Context Protocol server for Studex tools, notifications, and profile integrations
Remote MCP server for product discovery catalog and retrieving product details.
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseCqualityCmaintenanceA Model Context Protocol server enabling product searches across e-commerce platforms, price history tracking, and product specification-based searches using natural language prompts.219MIT
- AlicenseNot gradedqualityDmaintenanceA discovery and recommendation service that helps AI assistants find Model Context Protocol servers based on natural language queries.35 npm89MIT
- AlicenseDqualityDmaintenanceA Model Context Protocol server that enables LLMs to explore and interact with API specifications by providing tools for loading, browsing, and getting detailed information about API endpoints.411 npm14ISC
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI models to interact with Mobi instances, providing structured data exchange and command execution for ontology management, data retrieval, and content creation.2MIT