Message Control Protocol (MCP) Server
A REST API server implementation for message handling with Oracle Database integration via ODBC, offering endpoints for creating and retrieving messages with comprehensive error handling.
README
Python Project
This is a Python project template with a basic structure.
Project Structure
.
├── README.md
├── requirements.txt
├── src/
│ └── main.py
└── .gitignore
Setup
-
Create a virtual environment (recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate -
Install dependencies:
pip install -r requirements.txt
Running the Project
To run the project:
python src/main.py
Development
- Add your Python code in the
srcdirectory - Add new dependencies to
requirements.txt - Update this README as needed
MCP Server with Oracle Database Integration
This is a Message Control Protocol (MCP) server implementation that provides a REST API for message handling with Oracle Database integration using ODBC.
Prerequisites
- Python 3.8 or higher
- Oracle Client installed and configured
- ODBC Driver for Oracle installed
Installation
- Clone the repository
- Install the required dependencies:
pip install -r requirements.txt
- Configure the database connection:
- Update the database settings in
config.py - Make sure your Oracle ODBC driver is properly configured
- Update the database settings in
Database Setup
Create the messages table in your Oracle database:
CREATE TABLE messages (
id NUMBER GENERATED ALWAYS AS IDENTITY PRIMARY KEY,
content VARCHAR2(4000) NOT NULL,
priority NUMBER DEFAULT 1,
metadata VARCHAR2(4000),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
Running the Server
Start the server with:
python main.py
The server will start on http://localhost:8000 by default.
API Endpoints
POST /messages/- Create a new messageGET /messages/- Retrieve all messagesGET /health- Health check endpoint
API Documentation
Once the server is running, you can access the interactive API documentation at:
- Swagger UI: http://localhost:8000/docs
- ReDoc: http://localhost:8000/redoc
Example Usage
Create a new message:
curl -X POST "http://localhost:8000/messages/" \
-H "Content-Type: application/json" \
-d '{"content": "Test message", "priority": 1, "metadata": {"key": "value"}}'
Get all messages:
curl "http://localhost:8000/messages/"
Error Handling
The server includes comprehensive error handling for:
- Database connection issues
- Query execution errors
- Invalid input data
- Server health monitoring
Security Considerations
- Update the default configuration in
config.pywith your secure credentials - Consider implementing authentication and authorization
- Use HTTPS in production
- Implement rate limiting for production use
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.