MCP server for Spanish Vehicle Tax Valuation API
Project description
Spanish Vehicle Tax Valuation MCP Server
The Spanish Vehicle Tax Valuation MCP is a Model Context Protocol (MCP) server that provides structured access to Spanish vehicle tax valuation data, including 2025 average sale prices and depreciation rates for vehicles, boats, motorcycles, and transport means per Orden HAC/1484/2024. It allows AI models to query tax valuation references for Spanish property transfer, inheritance, gift, and special transport taxes.
๐ Now available on PyPI! Install with a single command - no Python setup required.
๐ Quick Start for Claude Desktop
Simple 2-Step Setup (No Python Required!)
Step 1: Install UV (One-Time Setup)
Windows - Open PowerShell and run:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
macOS/Linux - Open Terminal and run:
curl -LsSf https://astral.sh/uv/install.sh | sh
Step 2: Configure Claude Desktop
-
Open your Claude Desktop configuration file:
- Windows: Press
Win+R, type%APPDATA%\Claude\claude_desktop_config.json, press Enter - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- Windows: Press
-
Add this configuration:
{
"mcpServers": {
"spanish-vehicle-tax": {
"command": "uvx",
"args": ["--pre", "--from", "spanish_vehicle_tax_valuation_mcp", "spanish-vehicle-tax-mcp"]
}
}
}
Note: The
--preflag installs the beta version. Remove it once version 1.0 is released.
-
Save the file and restart Claude Desktop
-
Done! ๐ You can now ask Claude about Spanish vehicle tax valuations
Example Questions
Try asking Claude:
- "What vehicle categories are available?"
- "Search for Toyota models from 2023"
- "Calculate the tax valuation for a 3-year-old BMW X5"
- "What's the depreciation rate for 5-year-old cars?"
Features
- Vehicle Categories: Query different types of vehicles (cars, motorcycles, trucks, boats, etc.)
- Vehicle Search: Search for vehicle models by make, year, and category
- Price Information: Access historical and current pricing data
- Depreciation Rates: Get official depreciation rates by vehicle category and age
- Tax Valuation: Calculate official tax valuations based on Spanish regulations
- Real-time Data: Connect to live API for up-to-date vehicle information
Available Tools
The MCP server exposes the following tools:
1. get_vehicle_categories
Get all available vehicle categories (cars, motorcycles, trucks, etc.).
2. search_vehicle_models
Search for vehicle models with optional filters:
make: Vehicle manufacturer (e.g., "Toyota", "Honda")year: Model year (e.g., 2023, 2024)category_id: Filter by categorypage,per_page: Pagination options
3. get_vehicle_model_details
Get detailed information about a specific vehicle model by ID.
4. get_vehicle_prices
Get vehicle price information with optional filters for model and year.
5. get_depreciation_rates
Get official depreciation rates filtered by category, age, or effective year.
6. calculate_vehicle_tax_valuation (Primary Tool)
Calculate the official tax valuation for a vehicle:
model_id: The vehicle model IDvehicle_age: Age in yearsvaluation_year: Optional year for calculation
Returns original price, depreciation rate, and taxable value.
7. get_stored_valuations
Get previously calculated valuations from the database.
8. check_api_health
Check the health and availability of the backend API.
Example Queries
Once integrated with your client, you can ask:
- "What are the available vehicle categories?"
- "Search for Toyota models from 2023"
- "Calculate the tax valuation for a 3-year-old Toyota Corolla"
- "What's the depreciation rate for 5-year-old cars?"
- "Show me prices for model ID 42"
๐ Documentation
- Installation Guide - Setup and access instructions
- Azure Deployment - Deploy to Azure App Service
- Architecture - Technical architecture and design
๐งช Testing
Run the test suite:
# Test all endpoints
python tests/test_server.py
# Run pytest suite
pytest tests/
๐ Project Structure
spanish-vehicle-tax-valuation-mcp/
โโโ src/ # Application source code
โ โโโ app.py # FastAPI wrapper for Azure
โ โโโ server.py # MCP server with 8 tools
โ โโโ api_client.py # HTTP client for backend API
โ โโโ config.py # Configuration settings
โโโ tests/ # Test files
โ โโโ test_server.py # Integration tests
โ โโโ test_api_client.py # Unit tests
โโโ docs/ # Documentation
โ โโโ INSTALL.md # Installation guide
โ โโโ AZURE_DEPLOY.txt # Deployment guide
โ โโโ ARCHITECTURE.md # Architecture docs
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
๐ Quick Start
- Access Production Server: See docs/INSTALL.md
- Deploy Your Own: See docs/AZURE_DEPLOY.txt
- Local Development:
pip install -r requirements.txt uvicorn src.app:app --reload --port 8000
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Support
For issues, questions, or contributions, please open an issue on GitHub
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spanish_vehicle_tax_valuation_mcp-0.1.0b4.tar.gz.
File metadata
- Download URL: spanish_vehicle_tax_valuation_mcp-0.1.0b4.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd39ccff2c1a00256394216b8ef33aeee505ba8a3a3dc61db15266b32ccf4daa
|
|
| MD5 |
49352e1041b9ca762ff6c3b48d84a6dd
|
|
| BLAKE2b-256 |
9afcb90089ee3b6b35498e106a3470e939b2726c494bef454976612dc803f4ab
|
File details
Details for the file spanish_vehicle_tax_valuation_mcp-0.1.0b4-py3-none-any.whl.
File metadata
- Download URL: spanish_vehicle_tax_valuation_mcp-0.1.0b4-py3-none-any.whl
- Upload date:
- Size: 13.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9b3ce43df78376f6ea645989f1797be3ae4ef99cdc5c4fbe73893ff500e92836
|
|
| MD5 |
3119fa09392d8a631b62a20ea30bc448
|
|
| BLAKE2b-256 |
52f5be449c10aefd6640c0a214870d8f2eb08db10f694d9f17f4b19c7da6dde4
|