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.0b2.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.0b2.tar.gz.

File metadata

File hashes

Hashes for spanish_vehicle_tax_valuation_mcp-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 a059c788541409e8f6d5a63ae86bccbdcf965d4610c2348819dd22adf3810fda
MD5 a1cbe7468c366a1f702d79f4177766d3
BLAKE2b-256 c7198c6f9bc05108c4066f0acb04c7165072f13a03ec7799abb91de4b17cb876

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for spanish_vehicle_tax_valuation_mcp-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 29682067763cd96081e383134fc3751eb78d0ef8e2735151be27a9300bf30f81
MD5 8dc9151af623a2833d4824972509d718
BLAKE2b-256 df720bb7be8e688fccccf194aa3b53bc5c1d63319521cae2b6215fc3f18a0038

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