Medifinder Mcp — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Medifinder Mcp (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
An MCP (Model Context Protocol) server for medicine inventory queries, designed to work with AI assistants like Claude.
The MedifinderMCP Server provides tools and resources for querying a medicine inventory database through the Model Context Protocol (MCP). It allows AI assistants and other clients to:
The application uses a normalized database schema:
Region
- region_id (PK)
- name
- code
- created_at
- updated_at
MedicalCenter
- center_id (PK)
- code
- name
- region_id (FK -> Region)
- category
- reporter_name
- institution_type
- reporter_type
- address
- latitude
- longitude
- created_at
- updated_at
ProductType
- type_id (PK)
- code
- name
- description
- created_at
- updated_at
Product
- product_id (PK)
- code
- name
- type_id (FK -> ProductType)
- description
- dosage_form
- strength
- created_at
- updated_at
Inventory
- inventory_id (PK)
- center_id (FK -> MedicalCenter)
- product_id (FK -> Product)
- current_stock
- avg_monthly_consumption
- accumulated_consumption_4m
- measurement
- last_month_consumption
- last_month_stock
- status_indicator
- cpma_12_months_ago
- cpma_24_months_ago
- cpma_36_months_ago
- accumulated_consumption_12m
- report_date
- status
- created_at
- updated_at
User
- user_id (PK)
- phone_number
- name
- preferred_location
- created_at
- updated_at
SearchHistory
- search_id (PK)
- user_id (FK -> User)
- product_query
- location_query
- search_radius
- results_count
- created_atmedifinder-mcp/
├── app/
│ ├── __init__.py
│ ├── config.py # Configuration management
│ ├── db/
│ │ ├── __init__.py
│ │ ├── connection.py # Database connection handling
│ │ └── queries.py # SQL queries
│ ├── models/
│ │ ├── __init__.py
│ │ ├── base.py # Base model with timestamp fields
│ │ ├── region.py # Region model
│ │ ├── medical_center.py # Medical center model
│ │ ├── product_type.py # Product type model
│ │ ├── product.py # Product model
│ │ ├── inventory.py # Inventory model
│ │ ├── user.py # User model
│ │ └── search_history.py # Search history model
│ ├── mcp/
│ │ ├── __init__.py
│ │ ├── server.py # MCP server setup
│ │ ├── tools.py # Tool implementations
│ │ ├── resources.py # Resource implementations
│ │ └── prompts.py # Prompt templates
│ └── utils/
│ ├── __init__.py
│ └── helpers.py # Helper functions
├── main.py # Application entry point
├── requirements.txt # Dependencies
└── README.md # Documentationsearch_medicines: Search for medicines by name or locationget_medicine_locations: Find locations where a medicine is availableget_medicine_stock: Get stock information for a specific medicineget_regional_statistics: Get medicine statistics by regionget_medicine_status: Get overall medicine statisticsdiagnose_database: Check database connectivity and contenttroubleshoot_connection: Detailed database connection diagnosticscreate_database_schema: Create database tables based on modelsproduct://{id}: Get product details by IDstock://{name}: Get stock information for a product by namelocations://{region}: Get medical centers in a specific regionstatistics://stock: Get overall stock statisticsstatistics://regions: Get regional statisticsmedicine_search_prompt: Template for searching medicines by namemedicine_availability_prompt: Template for checking medicine availabilitymedicine_statistics_prompt: Template for analyzing medicine statisticsregional_availability_prompt: Template for analyzing regional medicine availability git clone https://github.com/yourusername/medifinder-mcp.git
cd medifinder-mcp python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt.env file: DB_HOST=localhost
DB_PORT=5432
DB_NAME=medifinderbot
DB_USER=your_user
DB_PASSWORD=your_password
DEBUG=True
ENV=development
SERVER_NAME=MedifinderMCP
SERVER_VERSION=1.0.0
MCP_SERVER_NAME=MedifinderMCP
MCP_SERVER_DESCRIPTION=MCP server for medicine inventory queries
MAX_SEARCH_RESULTS=50
SEARCH_SIMILARITY_THRESHOLD=0.3 # Connect to PostgreSQL
psql -U postgres
# Create database and user
CREATE DATABASE medifinderbot;
CREATE USER your_user WITH PASSWORD 'your_password';
GRANT ALL PRIVILEGES ON DATABASE medifinderbot TO your_user;
# Exit PostgreSQL
\qAfter starting the server, use the create_database_schema tool to create the tables.
You can run the MCP server directly:
python main.pyFor development and testing, the MCP Inspector provides a convenient way to interact with the server:
pip install mcp[cli] python -m mcp dev main.pyTo use the server with Claude Desktop:
@echo off
cd /d %~dp0
call venv\Scripts\activate.bat
python main.py mcp install run-mcp-server.bat -f .env {
"mcpServers": {
"MedifinderMCP": {
"command": "C:\\path\\to\\project\\venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\project\\main.py"],
"env": {
"DB_HOST": "localhost",
"DB_PORT": "5432",
"DB_NAME": "medifinderbot",
"DB_USER": "your_user",
"DB_PASSWORD": "your_password",
"DEBUG": "True",
"ENV": "development",
"SERVER_NAME": "MedifinderMCP",
"SERVER_VERSION": "1.0.0",
"MCP_SERVER_NAME": "MedifinderMCP",
"MCP_SERVER_DESCRIPTION": "MCP server for medicine inventory queries",
"MAX_SEARCH_RESULTS": "50",
"SEARCH_SIMILARITY_THRESHOLD": "0.3"
}
}
}
}troubleshoot_connection tool to diagnose connection problemscreate_database_schema tool to create the database tablespip install -r requirements.txt to ensure all dependencies are installedWhen troubleshooting, use these built-in diagnostic tools:
diagnose_database: Checks if:troubleshoot_connection: Provides detailed information about:create_database_schema: Creates the database tables and provides:~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.