Bio Preferred MCP Server

Bio Preferred MCP Server

A Model Context Protocol server that provides AI agents with access to Bio Preferred product data from a PostgreSQL database, enabling product searches, category listings, and contract management via natural language.

Category
Visit Server

README

Bio Preferred MCP Server

A Model Context Protocol (MCP) server that provides AI agents with access to Bio Preferred product data from a PostgreSQL database.

๐Ÿš€ Quick Start

1. Install Dependencies

pip install -r requirements.txt

2. Start the MCP Server

python run_server_simple.py

3. Configure Claude Desktop

Add this configuration to Claude Desktop โ†’ Settings โ†’ Developer โ†’ MCP:

{
  "mcpServers": {
    "bio-preferred": {
      "command": "/Users/ginugeorge/miniconda3/bin/python",
      "args": ["/Users/ginugeorge/Report_mcp/run_server_simple.py"],
      "name": "Bio Preferred Database",
      "description": "Access to Bio Preferred product database with 9 products and 5 categories"
    }
  }
}

4. Test with Claude

Ask Claude: "What products are in the Bio Preferred database?"

๐Ÿ“Š Available Data

  • 9 Products: Biodegradable Soap, Plant-Based Degreaser, Soy-Based Paint, etc.
  • 5 Categories: Cleaning Agents, Lubricants, Paints & Coatings, Construction Materials, Office Supplies
  • 6 Tables: products, product_categories, category_product_map, acquisition, awards, contract_bio_entry
  • 4 Acquisition Records: Contract values and funding agencies

๐Ÿ› ๏ธ MCP Tools

The server provides 9 tools for AI agents:

Product & Category Tools

  1. search_products - Search for products by name
  2. list_categories - Show all product categories

Contract Management Tools

  1. list_contract_information - List all contract information including acquisition details, contract values, and funding agencies
  2. list_contracts_with_reports - List contracts that have submitted reports with submission details and report counts
  3. list_contracts_without_reports - List contracts that have NOT submitted reports yet

Database Tools

  1. list_tables - List all database tables
  2. get_table_schema - Explore table structure
  3. execute_custom_query - Execute custom SQL queries (read-only)

๐Ÿ“ Project Structure

Report_mcp/
โ”œโ”€โ”€ ๐Ÿš€ run_server_simple.py      # Main MCP server (Claude-compatible)
โ”œโ”€โ”€ ๐Ÿ”ง database.py               # Database connection and utilities
โ”œโ”€โ”€ โš™๏ธ  config.py                # Configuration management
โ”œโ”€โ”€ ๐Ÿƒ run_server.py             # Alternative server implementation
โ”œโ”€โ”€ ๐Ÿš€ start_for_chatgpt.py      # Easy startup script
โ”œโ”€โ”€ ๐Ÿ“ฆ requirements.txt          # Python dependencies
โ”œโ”€โ”€ ๐Ÿ“ tests/                    # Test suite
โ”‚   โ”œโ”€โ”€ test_all.py             # Run all tests
โ”‚   โ”œโ”€โ”€ test_database_connection.py
โ”‚   โ”œโ”€โ”€ test_local_mcp.py
โ”‚   โ”œโ”€โ”€ test_mcp_tools.py
โ”‚   โ””โ”€โ”€ test_chatgpt_integration.py
โ””โ”€โ”€ ๐Ÿ“ docs/                     # Documentation
    โ”œโ”€โ”€ CHATGPT_INTEGRATION.md
    โ”œโ”€โ”€ CHATGPT_SETUP_GUIDE.md
    โ”œโ”€โ”€ CONFIGURATION.md
    โ”œโ”€โ”€ TESTING.md
    โ””โ”€โ”€ mcp_config.json

๐Ÿงช Testing

Run All Tests

python tests/test_all.py

Individual Tests

# Test database connection
python tests/test_database_connection.py

# Test MCP server locally
python tests/test_local_mcp.py

# Test ChatGPT integration
python tests/test_chatgpt_integration.py

โš™๏ธ Configuration

The server is pre-configured with:

  • Database: biopref (localhost:5432)
  • User: ginugeorge
  • Schema: public
  • Connection Timeout: 10 seconds
  • Query Timeout: 30 seconds

No environment variables or additional configuration needed!

๐Ÿ”ง Database Schema

Products Table

  • id - UUID product identifier
  • name - Product name (e.g., "Biodegradable Soap")

Categories Table

  • id - UUID category identifier
  • name - Category name (e.g., "Cleaning Agents")

Additional Tables

  • category_product_map - Links products to categories
  • acquisition - Contract values and funding agencies
  • awards - Award information
  • contract_bio_entry - Contract bio entries

๐Ÿ’ฌ Example Claude Conversations

  • "Find all soap products in the Bio Preferred database"
  • "What categories are available?"
  • "Show me the structure of the products table"
  • "How many products are in each category?"

๐Ÿšจ Troubleshooting

Common Issues

  1. "Database connection failed"

    • Ensure PostgreSQL is running: psql -l
    • Check the biopref database exists
  2. "MCP server not found"

    • Verify the Python path in Claude Desktop configuration
    • Test locally: python tests/test_local_mcp.py
  3. "No tools available"

    • Check server logs in Claude Desktop
    • Run tests to verify functionality

Debug Commands

# Test database connection
python tests/test_database_connection.py

# Test MCP server
python tests/test_local_mcp.py

# Check server status
ps aux | grep python

๐Ÿ“š Documentation

๐ŸŽฏ Status

โœ… Production Ready - All tests passing, optimized for Claude Desktop

Your Bio Preferred MCP server is ready to provide AI agents with access to real product data! ๐ŸŽ‰

Recommended Servers

playwright-mcp

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured