MCP-compatible travel recommendation service built with FastAPI featuring partner policy enforcement, REST APIs, and an interactive web interface.

Agentic Travel Recommendations Service

A working proof-of-concept for an agent-discoverable travel recommendations API.

What is included

  • FastAPI backend
  • Mock member profile and partner-configuration services
  • Partner-specific recommendation caps
  • Partner-specific category exclusions
  • MCP-compatible JSON-RPC endpoint
  • MCP tool discovery via tools/list
  • MCP tool invocation via tools/call
  • REST API
  • Minimal browser UI
  • Automated tests

Run locally

python -m venv .venv

# macOS/Linux
source .venv/bin/activate

# Windows PowerShell
.venv\Scripts\Activate.ps1

pip install -r requirements.txt
uvicorn app.main:app --reload

Open:

REST example

curl -X POST http://127.0.0.1:8000/api/recommendations \
  -H "Content-Type: application/json" \
  -d '{
    "member_id": "member-1001",
    "partner_id": "premium-bank",
    "destination": "Portland",
    "limit": 10
  }'

MCP discovery example

curl -X POST http://127.0.0.1:8000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'

MCP invocation example

curl -X POST http://127.0.0.1:8000/mcp \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "get_recommendations",
      "arguments": {
        "member_id": "member-1001",
        "partner_id": "premium-bank",
        "destination": "Portland",
        "limit": 10
      }
    }
  }'

Sample IDs

Members:

  • member-1001
  • member-1002
  • member-1003

Partners:

  • premium-bank
  • family-club
  • business-card

Partner-rule examples

  • premium-bank: maximum 5 results; excludes hostel
  • family-club: maximum 4 results; excludes nightlife and casino
  • business-card: maximum 3 results; excludes hostel, nightlife, and casino

Test

pytest

Design notes

The recommendation engine first scores candidates against a mocked member profile, then applies the partner policy before returning results. Policy enforcement is performed server-side, so a client or agent cannot bypass recommendation caps or excluded categories.

MCP Server · Populars

MCP Server · New

    bibinprathap

    veritasgraph

    VeritasGraph — open-source Knowledge Graph & GraphRAG framework on GitHub. Build multi-hop reasoning, ontology-aware retrieval, and verifiable attribution over your own data. Nodes, edges, RDF, linked-data — runs locally or in the cloud.

    Community bibinprathap
    sher1096

    KLinePic MCP Server and Agent API Examples

    MCP server and OpenAPI examples for AI agents that turn broker and exchange fills into annotated KLinePic trade-review charts

    Community sher1096
    zerx-lab

    FluxDown

    Rust 驱动的多协议下载管理器,支持 HTTP/FTP/BitTorrent 磁力链接及 HLS/DASH 流媒体,智能多线程加速与浏览器无缝集成。精美界面,极致性能,永久免费,零广告。

    Community zerx-lab
    MasihMoafi

    Project Elpis:

    You put an agent into an Elpis, and it becomes Elpis; Be Elpis my friend.

    Community MasihMoafi
    ROCTUP

    1C Metacode MCP Server

    MCP сервер с встроенным AI агентом для поиска по графу метаданных и кода конфигураций 1С

    Community ROCTUP