Skip to main content

MCP server for Spanish Vehicle Tax Valuation API

Project description

Spanish Vehicle Tax Valuation MCP Server

PyPI version

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

  1. 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
  2. Add this configuration:

{
  "mcpServers": {
    "spanish-vehicle-tax": {
      "command": "uvx",
      "args": ["--pre", "spanish-vehicle-tax-mcp"]
    }
  }
}

Note: The --pre flag installs the beta version. Remove it once version 1.0 is released.

  1. Save the file and restart Claude Desktop

  2. 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 category
  • page, 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 ID
  • vehicle_age: Age in years
  • valuation_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

๐Ÿงช 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

  1. Access Production Server: See docs/INSTALL.md
  2. Deploy Your Own: See docs/AZURE_DEPLOY.txt
  3. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spanish_vehicle_tax_valuation_mcp-0.1.0b3.tar.gz (12.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file spanish_vehicle_tax_valuation_mcp-0.1.0b3.tar.gz.

File metadata

File hashes

Hashes for spanish_vehicle_tax_valuation_mcp-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 608bdebfcf23387d6a5010654b588a66027fe2e47ba61e5a6f71795fc8a4c757
MD5 d82b8e556034dfd9642f251954184d36
BLAKE2b-256 a8833c8804d4644db9b0638c920b71e173d2a84fe206cb08bea34711f9126c84

See more details on using hashes here.

File details

Details for the file spanish_vehicle_tax_valuation_mcp-0.1.0b3-py3-none-any.whl.

File metadata

File hashes

Hashes for spanish_vehicle_tax_valuation_mcp-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 981b88329d36214d2a827ee6bcfebf53fac0eb281430de69bbb284fc9773cad8
MD5 336740f45cfcafd5323708fceebf0a3b
BLAKE2b-256 a2180cbe2ccce28ab2d145979777ddd8e966039d63bbf2b70c33c6ca4149ec84

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page