MCP (Model Context Protocol) Server
VajraM-dev
README
MCP (Model Context Protocol) Server
Project Structure
├── client.py # Client-side interaction script
├── server.py # Main MCP server implementation
├── pg_connect.py # PostgreSQL database connection
├── lm_config.py # Language model configuration
│
├── .env.example # Example environment configuration
├── .env.dev # Development environment configuration
├── requirements.txt # Project dependencies
└── .gitignore # Git ignore file
Prerequisites
- Python 3.10+
- PostgreSQL
- API access to AI providers (Anthropic, Google)
Installation
1. Clone the Repository
git https://github.com/VajraM-dev/Postgres-MCP-Server-With-SSE-Transport.git
2. Create Virtual Environment
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
3. Install Dependencies
pip install -r requirements.txt
4. Configure Environment
- Copy
.env.example
to.env.dev
- Fill in the required configuration:
cp .env.example .env.dev
nano .env.dev # or use your preferred text editor
Configuration Parameters
POSTGRES_USERNAME
: PostgreSQL database usernamePOSTGRES_PASSWORD
: PostgreSQL database passwordPOSTGRES_DB_NAME
: Database namePOSTGRES_HOST
: Database hostPOSTGRES_PORT
: Database portMCP_NAME
: Server nameMCP_HOST
: Server hostMCP_PORT
: Server portTRANSPORT
: Communication transport (sse/stdio)ANTHROPIC_API_KEY
: Anthropic API keyGOOGLE_API_KEY
: Google API keyUSE_PROVIDER
: Default AI provider
Running the Server
Development Mode
python server.py
Client Interaction
python client.py
Key Features
- 🔒 Secure configuration management
- 🗃️ PostgreSQL database integration
- 🤖 Multi-provider AI model support
- 📡 Flexible communication transport
- 🛡️ Extensible tool registration
Supported AI Providers
- Anthropic (Claude models)
- Google (Gemini models)
Tools and Endpoints
Available Tools
list_tables()
: Retrieve database tables- Custom tools can be easily added via decorators
Endpoints
/sse
: Server-Sent Events endpoint- Customizable routing and tool registration
Extending the Framework
Adding New Tools
@app.tool()
def custom_tool():
"""Custom tool implementation"""
# Your tool logic here
Configuring AI Providers
Modify lm_config.py
to add or configure new AI providers.
Recommended Servers
Crypto Price & Market Analysis MCP Server
A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.
MCP PubMed Search
Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.
dbt Semantic Layer MCP Server
A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Nefino MCP Server
Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
Mathematica Documentation MCP server
A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.
kb-mcp-server
An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded
Research MCP Server
The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.