mcpField
P
Patient Search & Create Tasks MCP Server

Patient Search & Create Tasks MCP Server

Local
github.com/Flight-HealthSearch0Updated 74w ago

About Patient Search & Create Tasks MCP Server

This MCP server searches patients and creates tasks in the Flight Health Atlas system. Its V2 server uses Puppeteer for web automation and login handling.

Key features

  1. 01Search for patients by name
  2. 02Return detailed patient information
  3. 03Create tasks with a type and name
  4. 04Puppeteer-based web automation in V2

Use cases

  1. 01Find a patient in Flight Health Atlas
  2. 02Retrieve detailed information for a search
  3. 03Create a task with a description
  4. 04Automate patient search through the V2 server

MCP support

The server exposes patient search and task creation as tools for MCP clients, along with a connection test tool.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

Patient Search & Create Tasks MCP Server

This project provides a Model Context Protocol (MCP) server for searching patients in the Flight Health Atlas system and creating a new task.

Features

  • V2 Server (server-v2.ts): Uses Puppeteer for advanced web automation and more reliable login handling

Prerequisites

  • Node.js 18 or higher
  • npm or yarn package manager

Installation

  1. Clone the repository:
git clone <repository-url>
cd patient-search-mcp
  1. Install dependencies:
npm install
  1. Update Credentials Go to auth.ts and replace the email and password in LOGIN_CREDENTIALS with your credentials. For demo purposes these are hardcoded since by default Cursor AI cannot access a .env file (possible to work around this by creating a .cursorignore file and adding !.env to it).

  2. Build the servers:

npm build:v2      # only build the V2 server
npm run start     # Build and start V2 server

Configuration

For Cursor MCP

Add the following to your Cursor mcp.json file (found through Cursor Settings):

V2 Server (Recommended):

{
  "mcpServers": {
    "patient-search-v2": {
      "command": "node",
      "args": ["/path/to/mcp-search-and-create-task/dist/server-v2.js"]
    }
  }
}

Usage

Available Tools

Both servers provide the following tools:

hello_world
  • Description: Test MCP connection
  • Parameters:
    • name (optional): Name to greet
search_patient_v2 (V2 Server)
  • Description: Search for patients using Puppeteer web automation
  • Parameters:
    • patient_name (required): Name of the patient to search for
    • detailed (optional): Whether to return detailed information
create_new_task (V2 Server)
  • Description: Create a new task
  • Parameters:
    • task_type (required): Type of the task to create
    • task_name (required): Name of the task to create
    • description (optional): Any description you want to add to the task
Example Usage
// Test connection
await callTool("hello_world", { name: "Aakarsh" });

// Search for a patient (V2 server)
await callTool("search_patient_v2", { 
  patient_name: "John Smith",
  detailed: true 
});

Development

Running in Development Mode
npm run dev

### Starting the Server

```bash
# Latest server
npm start

### Testing

You can test the servers directly using JSON-RPC messages:

```bash
# Test V2 server initialization
echo '{"jsonrpc": "2.0", "id": 1, "method": "initialize", "params": {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test", "version": "1.0.0"}}}' | node dist/server-v2.js

I have also created a sample test file to test task creation called test-task-creation. You can run the test through the command node dist/test-task-creation.js once you have built the server.

Troubleshooting

Common Issues
  1. Browser launch fails (V2 server):

    • Ensure you have sufficient system resources
    • Try running with --no-sandbox flag (already included)
  2. Login fails:

    • Verify credentials are correct
    • Check if the Atlas staging site is accessible
    • Ensure network connectivity
  3. Patient search returns no results:

    • Verify the patient name spelling
    • Check if you're logged into the correct environment
    • Try with a partial name match
Debug Mode

Both servers log debug information to stderr. Monitor the console output for detailed error messages. Additionally if you need to clear the /dist folder you can run npm run clean.

Dependencies

  • @modelcontextprotocol/sdk: MCP TypeScript SDK
  • puppeteer: Web automation (V2 server)
  • dotenv: Environment variable management

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.