AightBits/mcp_server_example
If you are the rightful owner of mcp_server_example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A minimal MCP HTTP/SSE server example using FastMCP and SQLite to demonstrate exposing a local database through MCP.
Minimal MCP HTTP/SSE Server Example
A simple demonstration of the Model Context Protocol (MCP) using FastMCP and a SQLite database.
This project shows how to expose a local database through MCP so that clients (like Claude’s web interface) can call structured tools for data access.
Dependencies
- Python 3.9+
fastmcp(installed viarequirements.txt)- SQLite (bundled with Python)
- Caddy (for reverse proxy and automatic TLS if exposing over HTTPS)
Install requirements with:
pip install -r requirements.txt
Setup
Create a virtual environment and install dependencies:
./setup.sh
Initialize the database (only creates it if it does not exist):
python init_demo_db.py
Usage
Start the MCP server:
source start.sh
The server runs locally on http://127.0.0.1:8000/mcp.
If exposed via Caddy and a valid domain, it will be available over HTTPS.
Integrating with Claude Web
- Go to Claude.ai → Settings → Integrations → Add custom integration.
- Enter your public MCP endpoint, for example:
https://[address]/mcp - Enable the connector in a chat and try prompts such as:
Get customer 1List orders for customer 1call tool sql_select {"sql": "SELECT * FROM customers;"}
Files
setup.sh– Creates the Python virtual environment and installs dependencies.start.sh– Activates the environment and starts the MCP server.init_demo_db.py– Initializes a simple SQLite database with test data.mcp_server_example.py– MCP server exposing SQLite queries as tools.requirements.txt– Python dependencies.
Limitations
- Only demonstrates a toy SQLite database (customers and orders).
- No authentication — intended for local/demo use.
- Requires a working domain and TLS proxy (e.g., Caddy) for integration with Claude Web.
License
Apache 2.0 License.