NurseLex / MCP_SETUP.md
NurseCitizenDeveloper's picture
fix: resolve remaining merge conflicts across all affected files
27c849b

A newer version of the Gradio SDK is available: 6.9.0

Upgrade

πŸ₯ NurseLex MCP Server Setup Guide

Welcome to the NurseLex MCP Server! This server uses the Model Context Protocol (MCP) to inject the entire i.AI Lex UK legislative database directly into your favorite AI Assistant (like Claude Desktop or Cursor).

When connected, your AI assistant gains three powerful real-time tools:

  1. search_local_nursing_cache: Instantly retrieves the exact statutory text for 1,128 critical nursing sections (Mental Health Act, Care Act, etc.).
  2. get_official_explanatory_note: Fetches the official UK Government plain English explainer for a specific Act and section.
  3. vector_search_lex_api: A semantic search engine that maps clinical, plain-English scenarios (e.g., "patient lacks capacity to consent to treatment") to relevant national laws.

πŸ› οΈ Prerequisites

  1. You must have Python 3.10+ installed.
  2. Install the required dependencies:
    pip install mcp fastmcp httpx pandas
    

πŸ”Œ Connecting to Claude Desktop

To let Claude Desktop use NurseLex as a knowledge tool, you need to edit your claude_desktop_config.json file.

1. Locate your Config File

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json

2. Add the NurseLex Server

Open the file in a text editor and add the following configuration to your mcpServers block.

Make sure to replace /path/to/NurseLex with the actual folder path where you downloaded the project!

{
  "mcpServers": {
    "nurselex": {
      "command": "python",
      "args": [
        "/path/to/NurseLex/mcp_server.py"
      ]
    }
  }
}

3. Restart Claude

Fully close and restart the Claude Desktop app. You should now see a πŸ”¨ (hammer) icon in the chat bar indicating the tools are loaded!


πŸ–±οΈ Connecting to Cursor IDE

If you are a Nurse Citizen Developer building applications in Cursor, you can add NurseLex to help write legally compliant code!

  1. Open Cursor Settings (Cmd + Shift + J on Mac, Ctrl + Shift + J on Windows).
  2. Go to the Features -> MCP section.
  3. Click + Add New MCP Server.
  4. Set the following:
    • Name: NurseLex
    • Type: command
    • Command: python /path/to/NurseLex/mcp_server.py (Use the absolute path to your folder).
  5. Click Save and verify the connection is green.

You can now ask Cursor Agent: "Write a Python function that uses NurseLex to find the legal requirements for Section 136 of the MHA."