nithin varghese commited on
Commit
7916bc9
·
unverified ·
2 Parent(s): 6b4d66c 74d2597

Merge pull request #2 from humandotlearning/update-readme-npi-mcp

Browse files
.gitignore ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ __pycache__/
2
+ *.pyc
3
+ .venv/
4
+ .env
README.md ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CredentialWatch: NPI MCP Server
2
+
3
+ This repository contains the **NPI (NPPES) Model Context Protocol (MCP) Server** for **CredentialWatch**, a demo product for the **Hugging Face MCP 1st Birthday / Gradio Agents Hackathon**.
4
+
5
+ ## 🩺 About CredentialWatch
6
+
7
+ **CredentialWatch** is an agentic system designed to manage healthcare provider credentials. It serves as a central radar to track expiries, license statuses, and compliance risks across multiple providers.
8
+
9
+ The system is composed of multiple independent MCP servers and a central agent:
10
+ 1. **`npi_mcp` (This Repo):** Read-only access to public provider data via the NPPES NPI Registry.
11
+ 2. `cred_db_mcp`: Internal provider & credential database operations (SQLite).
12
+ 3. `alert_mcp`: Alert logging and management.
13
+ 4. **Agent UI:** A Gradio-based interface powered by LangGraph.
14
+
15
+ ### Role of `npi_mcp`
16
+ This MCP server exposes tools to search for and retrieve healthcare provider information from the public [NPPES NPI Registry](https://npiregistry.cms.hhs.gov/api). It acts as a proxy, forwarding requests to a backend **Modal** FastAPI service (`NPI_API`) which handles the actual external API communication and normalization.
17
+
18
+ ## ✨ Tools
19
+
20
+ This server exposes the following MCP tools:
21
+
22
+ - **`search_providers(query, state?, taxonomy?)`**:
23
+ - Search for providers by name, organization, state, or taxonomy.
24
+ - Returns a list of matching providers with summaries.
25
+ - **`get_provider_by_npi(npi)`**:
26
+ - Retrieve detailed information for a specific provider using their 10-digit NPI number.
27
+
28
+ ## 🚀 Setup & Installation
29
+
30
+ ### Prerequisites
31
+ - Python 3.11+
32
+ - [`uv`](https://github.com/astral-sh/uv) package manager
33
+
34
+ ### Installation
35
+
36
+ 1. Clone the repository:
37
+ ```bash
38
+ git clone <repo-url>
39
+ cd npi-mcp-server
40
+ ```
41
+
42
+ 2. Install dependencies:
43
+ ```bash
44
+ uv sync
45
+ ```
46
+
47
+ ### Configuration
48
+
49
+ The server requires the URL of the backend Modal service. Set the following environment variable:
50
+
51
+ ```bash
52
+ export NPI_API_BASE_URL="https://your-modal-app-url.modal.run"
53
+ ```
54
+
55
+ *Defaults to `http://localhost:8000` if not set.*
56
+
57
+ ## 🏃 Usage
58
+
59
+ To run the MCP server:
60
+
61
+ ```bash
62
+ uv run python -m npi_mcp_server.main
63
+ ```
64
+
65
+ The server uses `FastMCP` and communicates over stdio (by default) or SSE depending on how it's invoked by the client.
66
+
67
+ ## 🧪 Development
68
+
69
+ Run tests using `pytest`:
70
+
71
+ ```bash
72
+ uv run pytest
73
+ ```
74
+
75
+ ## 🏗️ Architecture
76
+
77
+ - **Stack:** Python 3.11, `mcp`, `httpx`, `pydantic`.
78
+ - **Transport:** HTTP (to Modal backend), stdio/SSE (to MCP Client).
79
+
80
+ ## 📄 License
81
+
82
+ This project is part of a hackathon submission.
src/npi_mcp_server/__pycache__/__init__.cpython-312.pyc DELETED
Binary file (334 Bytes)
 
src/npi_mcp_server/__pycache__/config.cpython-312.pyc DELETED
Binary file (288 Bytes)
 
src/npi_mcp_server/__pycache__/main.cpython-312.pyc DELETED
Binary file (1.82 kB)
 
src/npi_mcp_server/__pycache__/mcp_tools.cpython-312.pyc DELETED
Binary file (2.93 kB)
 
src/npi_mcp_server/__pycache__/models.cpython-312.pyc DELETED
Binary file (2.78 kB)
 
src/npi_mcp_server/__pycache__/npi_client.cpython-312.pyc DELETED
Binary file (8.91 kB)
 
src/npi_mcp_server/__pycache__/schemas.cpython-312.pyc DELETED
Binary file (3.01 kB)
 
src/npi_mcp_server/__pycache__/tools.cpython-312.pyc DELETED
Binary file (4.66 kB)
 
tests/__pycache__/test_npi_mcp.cpython-312-pytest-8.4.2.pyc DELETED
Binary file (11.7 kB)
 
tests/__pycache__/test_npi_mcp.cpython-312-pytest-9.0.1.pyc DELETED
Binary file (11.7 kB)
 
tests/__pycache__/test_npi_mcp_server.cpython-312-pytest-8.4.2.pyc DELETED
Binary file (9.22 kB)
 
tests/__pycache__/test_npi_mcp_server.cpython-312-pytest-9.0.1.pyc DELETED
Binary file (9.22 kB)