Provides user name resolution, team management, and calendar insights tools with a PostgreSQL backend, enabling fuzzy user search, team hierarchy navigation, meeting analysis, and calendar health assessments.
MCP PostgreSQL Server
A FastMCP server for user name resolution with PostgreSQL backend.
Prerequisites
Ensure .env file contains database credentials and auth token:
1. Running with STDIO Transport
a) Development Mode (with MCP Inspector)
This launches MCP Inspector automatically in your browser for interactive testing.
b) Direct Mode
Or:
2. Running with HTTP Transport
a) Start the HTTP Server
Server starts at: http://localhost:8000/mcp
b) Launch MCP Inspector
Open a new terminal:
c) Connect to Server in MCP Inspector
Change Transport Type to:
Streamable HTTPEnter URL:
http://localhost:8000/mcpClick Connect
3. Authentication
If MCP_AUTH_TOKEN is set in .env, all HTTP requests must include the token.
| Behavior |
Not set | No authentication (open access) |
Set | All requests require |
In MCP Inspector (HTTP)
Select Transport Type:
Streamable HTTPEnter URL:
http://localhost:8000/mcpIn the Headers section, add:
Header Name:
AuthorizationHeader Value:
Bearer your-secret-token-here
Click Connect
Without the correct token, you'll receive 401 Unauthorized.
In LangChain/LangGraph
In FastMCP Client (Python)
4. Claude Desktop Integration (Free Version)
Claude Desktop free version only supports STDIO transport. Use the proxy server to bridge to your HTTP server.
Architecture
Setup Steps
Step 1: Start the HTTP Server
Step 2: Run the Proxy Server (Optional - for manual testing)
Step 3: Configure Claude Desktop
Edit the Claude Desktop config file:
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
Add this configuration:
Important:
Replace
YOUR_USERNAMEwith your actual Windows username. Find youruvpath with:where uvReplace
your-secret-token-herewith the actualMCP_AUTH_TOKENfrom your.envfileThe
envvariables are required for the proxy to connect to the HTTP server
Step 4: Restart Claude Desktop
Close and reopen Claude Desktop. Look for the hammer icon (🔨) in the input box.
Step 5: Test
Ask Claude:
"Use the resolve_user tool to find shubham mishra"
Available Tools
Quick Reference
# | Tool | Input(s) | Purpose |
1 |
|
| Fuzzy find user → UUID |
2 |
|
| Batch fuzzy find |
3 |
|
| Exact email → UUID |
4 |
|
| Batch exact email lookup |
5 |
|
| Get all reports of manager |
6 |
|
| Get user's manager(s) |
7 |
|
| UUID → full user details |
8 |
|
| Scoped search within team |
9 |
|
| Complete calendar dashboard |
10 |
|
| Find/filter/sort meetings |
11 |
|
| Full meeting details with attendees |
Category 1: User Resolution Tools
1. resolve_user
Description:
Resolve a user name or email to their UUID using fuzzy matching. Returns the user's UUID if confidently resolved, or asks for verification/disambiguation if uncertain.
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | The user's name or email to resolve. Can be full name, partial name, email, or email prefix. |
Example:
2. resolve_users_batch
Description:
Resolve multiple user names or emails to their UUIDs in a single call. Efficiently processes a batch and returns results for each input.
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | List of names or emails to resolve. Maximum 50 items. |
Example:
3. confirm_user
Description:
Confirm a user by their exact email and get their UUID. Use this after verification/disambiguation when the user has confirmed which email is correct.
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | The exact email address to look up. |
Example:
4. confirm_users_batch
Description:
Confirm multiple users by their exact emails and get their UUIDs. More efficient than calling confirm_user multiple times.
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | List of exact email addresses to look up. Maximum 50 items. |
Example:
Category 2: Team Management Tools
5. get_team_members
Description:
Get all team members under a specific manager. Retrieves all users who report to the specified manager (including users under them as remote manager).
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | Manager's email (preferred), UUID, or name. Email is most reliable for exact matches. |
Example:
6. get_manager_of_user
Description:
Get the manager(s) of a specific user. Returns both primary manager and remote manager if applicable.
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | User's email (preferred) or UUID. |
Example:
7. get_user_by_uuid
Description:
Get complete user details by their UUID. Use this for quick lookups when you already have the UUID from a previous resolution.
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | The user's UUID. Format: |
Example:
8. resolve_user_in_team
Description:
Resolve a user name/email within a specific manager's team only. This is a SCOPED search that only returns users who report to the specified manager. Use for security/relevance when searches should stay within team boundaries.
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | The user's name or email to search for. |
|
| ✅ | Manager's email (preferred) or UUID to scope the search. |
Example:
Category 3: Calendar Insights Tools
9. get_user_calendar_insights
Description:
Get comprehensive calendar insights for a user - the complete dashboard. Provides health assessment, metrics, statistical extremes (longest/shortest/largest meetings), recurring meeting analysis, and quality metrics.
Input Parameters:
Parameter | Type | Required | Default | Description |
|
| ✅ | - | User's email (preferred) or UUID. |
|
| ❌ | - | Single date (YYYY-MM-DD) for day view. If provided, ignores start/end. |
|
| ❌ | Last 7 days | Range start (YYYY-MM-DD). |
|
| ❌ | Today | Range end (YYYY-MM-DD). Max range: 90 days. |
|
| ❌ |
| Include daily breakdown array. |
|
| ❌ |
| Include list of actual meetings. |
Returns:
health: Status (healthy/warning/at_risk), concerns, positives, suggestionstime: Total meeting hours, focus hours, percentagesaverages: Per-day metrics (meeting load %, focus minutes, meetings/day)by_type: Breakdown by meeting type (1:1, standup, review, planning, external)recurring: Recurring meeting count, percentage, top seriesquality: Agenda coverage, average quality, large meetings countextremes: Longest/shortest/largest meetings, busiest/lightest days
Example:
10. query_user_meetings
Description:
Query user's meetings with flexible filtering and sorting. Use this to find specific meetings, get sorted lists (longest, shortest, largest), filter by criteria, or search by title keyword.
Input Parameters:
Parameter | Type | Required | Default | Description |
|
| ✅ | - | User's email (preferred) or UUID. |
|
| ✅ | - | Start date (YYYY-MM-DD). |
|
| ✅ | - | End date (YYYY-MM-DD). |
|
| ❌ |
| Sort field: |
|
| ❌ |
| Sort order: |
|
| ❌ |
| Max results (max: 100). |
|
| ❌ | - | Filter: |
|
| ❌ | - | Filter by external flag. |
|
| ❌ | - | Filter by recurring flag. |
|
| ❌ | - | Filter by agenda presence. |
|
| ❌ | - | Minimum duration in minutes. |
|
| ❌ | - | Minimum attendee count. |
|
| ❌ | - | Title keyword search (case-insensitive). |
Example:
11. get_meeting_details
Description:
Get full details of a specific meeting. Use the event_id from query_user_meetings or get_user_calendar_insights to get complete information including attendee list, organizer, and agenda quality signals.
Input Parameters:
Parameter | Type | Required | Description |
|
| ✅ | The event ID from a previous query. |
Returns:
title: Meeting titleorganizer: Organizer's emailtime: Start, end, date, duration_minattendees: Total count, internal/external counts, full attendee listclassification: Meeting type, is_recurring, is_external, is_large_meetingquality: has_agenda, agenda_quality_index, agenda_signalsrecurring_info: series_id and instance_key (if recurring)tagged_priorities: Priority tags from title/description
Example: