Skip to content

sanjayamirthraj/people-mcp-python

Repository files navigation

People MCP Server

A Python-based MCP (Model Context Protocol) server that enables AI assistants to search and retrieve people information from a Supabase database using natural language queries.

Features

  • Natural Language Search: Search for people using natural language queries
  • Detailed Person Information: Get comprehensive details about specific individuals
  • Image Search: Find images associated with people by email
  • List All People: Browse all people in the database with pagination

Tools Available

1. search_people

Search for people using natural language queries.

Examples:

  • "find John Smith"
  • "who works at Tech Corp"
  • "person with email john@example.com"
  • "people from San Francisco"
  • "software engineer position"

2. get_person_details

Get comprehensive information about a specific person by their email address.

3. search_by_image

Find images associated with a person by their email address.

4. list_all_people

List all people in the database with an optional limit (default: 10, max: 100).

Installation

  1. Install dependencies:
pip install -r requirements.txt
  1. Run the server:
python src/server.py

The server will start on http://localhost:8000/mcp

Testing with MCP Inspector

  1. Install MCP Inspector:
npm install -g @modelcontextprotocol/inspector
  1. Run MCP Inspector:
npx @modelcontextprotocol/inspector
  1. Connect to the server:
  • Go to http://localhost:3000
  • Select "Streamable HTTP" as transport
  • Enter URL: http://localhost:8000/mcp
  • Click "Connect"

Configuration

All configuration is hardcoded in src/server.py:

  • Supabase URL: https://afwpcbmhvjwrnolhrocz.supabase.co
  • Supabase Service Key: Hardcoded service role key with full access
  • Tables Used:
    • nyne_results: Main people data table
    • images_names: Image storage table

Database Schema

nyne_results Table

  • email (text) - Primary identifier
  • name (text) - Full name
  • phone (text) - Phone number
  • company (text) - Company name
  • title (text) - Job title
  • location (text) - Geographic location
  • data (json) - Extended structured data containing:
    • displayname, bio, gender
    • fullphone (array), altemails (array)
    • social_profiles (object)
    • organizations (array)

images_names Table

  • email (text) - Person's email
  • image (bytea) - Binary image data

Natural Language Query Processing

The server intelligently parses natural language queries to extract:

  • Email addresses: Detected using regex patterns
  • Phone numbers: Recognized in various formats
  • Company names: Keywords like "works at", "from company"
  • Job titles: Keywords like "title", "position", "role"
  • Locations: Keywords like "from", "in", "location"
  • Names: Default extraction when no specific fields detected

Deployment to Render

Deploy to Render

Option 1: One-Click Deploy

Click the "Deploy to Render" button above.

Option 2: Manual Deployment

  1. Fork or push this repository to GitHub
  2. Connect your GitHub account to Render
  3. Create a new Web Service on Render
  4. Connect your repository
  5. Render will automatically detect the render.yaml configuration

Your server will be available at: https://your-service-name.onrender.com/mcp

Local Development

Setup Environment

conda create -n people-mcp python=3.13
conda activate people-mcp
pip install -r requirements.txt

Run Server

python src/server.py

Run with Custom Port

PORT=3000 python src/server.py

Example Usage

Once connected via MCP Inspector or an AI assistant:

  1. Search for people:

    • Tool: search_people
    • Input: "find people who work at Google"
  2. Get detailed information:

  3. List people:

    • Tool: list_all_people
    • Input: 20 (to see 20 people)

Poke Integration

You can connect this MCP server to Poke at poke.com/settings/connections.

To test the connection explicitly, ask Poke something like: Tell the subagent to use the "People MCP" integration's "search_people" tool to find John Smith

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages