Fx
- python
0
GitHub Stars
python
Language
7 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You run a FastMCP-based PostgreSQL query service that exposes FAQ data and system menus through an MCP interface. It combines a Postgres database with a FastMCP application, supports multiple MCP connection methods, and provides ready-made queries to fetch data and statistics. This setup helps you build automations and integrations that retrieve targeted information quickly from your data sources.
How to use
Connect with an MCP client to explore data and run queries. You can use three connection modes depending on your needs: STDIO for local command-line tooling, HTTP for programmatic web calls, and SSE for live streaming updates. Once connected, you can execute tools to query FAQ data, query menu data, and fetch statistics.
Available MCP tools include querying the chery_exeedcars_faq data and the sys_menu data, as well as retrieving FAQ and menu statistics. Use the respective tool names to perform your tasks, for example to fetch FAQ records by keyword or category, or to list system menus by parent ID.
To connect via Python, you can use a client that supports the three modes: STDIO, HTTP, and SSE. For HTTP and SSE, point the client at the MCP URL and call the appropriate tools. The HTTP endpoint is http://localhost:8080/mcp and the SSE endpoint is http://localhost:8080/mcp/sse. For STDIO, run the local tool invocations as described in your client library documentation.
How to install
# Prerequisites
# - Docker and Docker Compose installed
# 1. Deploy the service
docker-compose up -d
# 2. Verify service endpoints
# MCP HTTP endpoint
# http://localhost:8080/mcp
# MCP SSE endpoint
# http://localhost:8080/mcp/sse
Configuration and notes
The service is configured via environment variables, either in a .env file or directly in the docker-compose.yml. Key variables include database credentials and server settings.
Database configuration:
- DB_USER: database username
- DB_PASSWORD: database password
- DB_HOST: database host
- DB_PORT: database port
- DB_NAME: database name
Server configuration:
- TRANSPORT_MODE: transport method, can be stdio or http (default is http)
- HOST: server host, default 0.0.0.0
- PORT: server port, default 8080
The service includes two data sources:
- cheery_exeedcars_faq: stores FAQ data with fields such as id, question, answer, ticket_type, and create_at
- sys_menu: stores system menu items with fields including menu_id, parent_id, menu_name, menu_type, is_disable, and timestamps
Data model and endpoints
Two main data sources are exposed through the MCP: the FAQ data from cheery_exeedcars_faq and the system menu data from sys_menu. You can query by keywords, ticket type, and issue module for FAQs, and by parent_id, menu_name, and menu_type for menus. Statistics for both datasets are available via dedicated tools.
End-to-end access is provided through HTTP at http://localhost:8080/mcp and SSE at http://localhost:8080/mcp/sse. The service also supports a local STDIO mode for command-line usage and a WebSocket-like streaming mode via SSE.
Available tools
query_faq
Query FAQ data by keywords, ticket type, or issue module to retrieve matching FAQ records.
query_menu
Query system menu data by parent ID, menu name, or menu type to retrieve matching menu records.
get_faq_statistics
Retrieve statistical information about FAQ data such as counts and distributions.
get_menu_statistics
Retrieve statistical information about menu data such as counts and distributions.