quotation-mcp-server

celikhakan41/quotation-mcp-server

3.2

If you are the rightful owner of quotation-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Quotation MCP Server is a backend application designed to simulate quotation generation, pricing, and discount suggestions for B2B sales, utilizing the Model Context Protocol (MCP).

Tools
1
Resources
0
Prompts
0

Quotation MCP Server

A modular, clean-coded backend application that implements the Model Context Protocol (MCP) to simulate quotation generation, pricing, and discount suggestion for a B2B sales use case.

This project is ideal for developers exploring MCP tooling, handler-based architecture, or looking to integrate AI/LLM-driven tool invocation in an enterprise context.


✨ Features

  • āœļø Create new quotations with dynamic pricing rules
  • šŸ“‹ Retrieve quotation details by ID (UUID)
  • šŸ’ø Calculate discounted price based on product quantity
  • šŸ“‰ Suggest promotional discounts per product
  • āš™ļø Tool Discovery endpoint for MCP clients like Claude
  • šŸ” PostgreSQL-backed persistent storage
  • ✨ Clean architecture with handler abstraction (Open/Closed Principle)
  • šŸ“ƒ Extensive unit & edge-case testing using JUnit + Mockito

⚔ Tech Stack

  • Java 17
  • Spring Boot 3.x
  • PostgreSQL 15+
  • MCP (Model Context Protocol)
  • JPA (Hibernate)
  • JUnit 5, Mockito
  • IntelliJ IDEA, Postman, DBeaver

šŸ“‘ Tooling (MCP)

Tool Discovery Endpoint

GET /mcp/tools

Returns JSON describing all supported MCP tools:

[
  {
    "name": "createQuotation",
    "description": "Creates a new proposal.",
    "params": {
      "customerName": "Customer name",
      "currency": "Currency",
      "items": "Product and quantity list"
    }
  }
]

šŸš€ Getting Started

1. Clone & Build

git clone https://github.com/your-username/quotation-mcp-server.git
cd quotation-mcp-server
./mvnw clean install

2. Configure Database

Create PostgreSQL database:

createdb -U postgres quotationdb

Update src/main/resources/application.properties:

spring.datasource.url=jdbc:postgresql://localhost:5432/quotationdb
spring.datasource.username=postgres
spring.datasource.password=yourpassword

3. Run Locally

./mvnw spring-boot:run

4. Test via Postman

POST http://localhost:8080/mcp
Content-Type: application/json

{
  "jsonrpc": "2.0",
  "method": "createQuotation",
  "params": {
    "customerName": "ABC Ltd.",
    "currency": "TRY",
    "items": [
      {"product": "Premium Package", "quantity": 2},
      {"product": "Extra Module", "quantity": 3}
    ]
  },
  "id": "1"
}

šŸ“‚ Code Structure

.
ā”œā”€ā”€ controller/             # MCPController, ToolDiscovery
ā”œā”€ā”€ handler/               # Clean handlers for each MCP tool
ā”œā”€ā”€ dto/                   # All Request/Response models
ā”œā”€ā”€ model/                 # JPA Entities
ā”œā”€ā”€ repository/            # Spring Data Repositories
ā”œā”€ā”€ service/               # Business logic layer
└── test/                  # Unit tests per handler/service

šŸ“ License

MIT License


šŸ‘ Contributors


šŸš€ Coming Soon

  • OAuth2 / JWT authentication
  • Deployment via Docker
  • Tool Registry publishing (Claude, etc.)
  • Sample frontend client for testing (React)
  • OpenAPI 3.0 YAML documentation

🚫 Disclaimer

This project is a learning implementation of MCP and does not simulate real-time financial pricing logic or actual airline quotation systems.


🧠 Learn More