MCP Server Setup
Step-by-step guide to connect the Person CRUD MCP server to Claude Desktop, enabling AI-powered database operations through natural language.
What is MCP?
Model Context Protocol (MCP) is an open standard that allows AI models like Claude to connect to external tools and data sources. This MCP server exposes Person CRUD operations as tools that Claude Desktop can call directly.
Once configured, you can ask Claude things like "List all persons", "Create a person named John Doe", or "Delete person with ID 1" and Claude will execute the database operations automatically.
Available MCP Tools
list_personsREADGet all persons from the database
get_personREADGet a single person by ID
create_personCREATECreate a new person record
update_personUPDATEUpdate an existing person by ID
delete_personDELETEDelete a person record by ID
search_personsREADSearch persons by name or email
Setup Steps
Install Claude Desktop
Download and install Claude Desktop from the official Anthropic website.
https://claude.ai/downloadClone the MCP Server Repository
Clone the Person CRUD MCP server to your local machine.
git clone https://github.com/Pearlshaline/person_mcp_server.git cd person_mcp_server npm install
Configure Environment Variables
Create a .env file in the MCP server folder with your database connection.
DATABASE_URL=postgresql://neondb_owner:YOUR_PASSWORD@ep-your-project-pooler.c-6.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require DIRECT_URL=postgresql://neondb_owner:YOUR_PASSWORD@ep-your-project.c-6.us-east-1.aws.neon.tech/neondb?sslmode=require&channel_binding=require
Build the MCP Server
Compile the TypeScript MCP server to JavaScript.
npm run build
Configure Claude Desktop
Open your Claude Desktop config file and add the MCP server. Config location:
Windows: %APPDATA%\Claude\claude_desktop_config.json
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"person-crud": {
"command": "node",
"args": ["C:/path/to/person-mcp-server/dist/index.js"],
"env": {
"DATABASE_URL": "your-pooled-connection-string",
"DIRECT_URL": "your-direct-connection-string"
}
}
}
}Restart Claude Desktop
Fully quit and reopen Claude Desktop. You should see the MCP tools available.
# Look for the hammer icon in Claude Desktop # This confirms MCP tools are loaded
Verify It Works
After restarting Claude Desktop, test the MCP connection by typing these prompts:
List all persons in the databaseCreate a new person named John Doe with the email john.doe@email.com, age 25, phone number +63 946 882 2314, and address Ilagan City, IsabelaGet person with ID 2Update person 2's age to 36Search for persons named Ana ReyesDelete person with ID 1Troubleshooting
MCP tools not showing in Claude Desktop
Make sure you fully quit (not just close) and reopen Claude Desktop after editing the config file.
Database connection error
Double-check your DATABASE_URL and DIRECT_URL in the MCP server .env file. Make sure the Neon database is active.
Command not found: node
Install Node.js from nodejs.org. Make sure the path in claude_desktop_config.json points to the built dist/index.js file.
Config file not found
Create the file manually at the path shown above. Make sure the JSON is valid with no trailing commas.