FastMCP server for the Lingshu medical AI model, providing medical image analysis and report generation services
Project description
Lingshu FastMCP Medical AI Service
This project implements a FastMCP server for the Lingshu medical AI model and a corresponding client for testing and integration.
Components
mcp_server_lingshu.py: FastMCP server wrapping the Lingshu modelmcp_client_lingshu.py: Test client demonstrating interaction with the Lingshu FastMCP server
Server Features
- Medical image analysis
- Structured medical report generation
- Medical Q&A
Prerequisites
- FastMCP framework
- OpenAI API compatible LLM server (e.g., vLLM)
- Required Python packages (install via
pip install -r requirements.txt)
Setup
- Clone the repository
- Install dependencies:
pip install -r requirements.txt
Usage
Use vLLM to serve the Lingshu Model
vllm serve lingshu-medical-mllm/Lingshu-7B --dtype float16 --api_key api_key --port 8000 --max-model-len 32768
Wrap the server with FastMCP
export LINGSHU_SERVER_URL="http://localhost:8000/v1"
export LINGSHU_SERVER_API="api_key"
export LINGSHU_MODEL="lingshu-medical-mllm/Lingshu-7B" # the above config depends on your vllm server config
python mcp_server_lingshu.py --host 127.0.0.1 --port 4200 --path /lingshu --log-level info
Try connecting Lingshu with MCP
export LLM_SERVER_URL="xxx"
export LLM_SERVER_API="xxx"
export LLM_MODEL="xxx" ## this is your own model
python mcp_client_lingshu.py --mcp-url http://127.0.0.1:4200/lingshu # the mcp-url should depend on the mcp server you deployed in the last step
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iflow_mcp_alibaba_damo_academy_lingshu_mcp-0.1.1.tar.gz.
File metadata
- Download URL: iflow_mcp_alibaba_damo_academy_lingshu_mcp-0.1.1.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b10659284dc0631c4184f7d44c76187a6168a73169fe8f59b1d840f2cce80cb0
|
|
| MD5 |
39d9c05487b974af3e015e78259e52a1
|
|
| BLAKE2b-256 |
e7c4521285c54ff2e678cd812a842a20cac6f03d3a1f42466b72427566821611
|
File details
Details for the file iflow_mcp_alibaba_damo_academy_lingshu_mcp-0.1.1-py3-none-any.whl.
File metadata
- Download URL: iflow_mcp_alibaba_damo_academy_lingshu_mcp-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b01e7c2e033cbfd83142a63f05927ab353f67ba966d15197064b1c7c6e3c4f0c
|
|
| MD5 |
51b28bfcd7852a2f8bbc1fd1243382b4
|
|
| BLAKE2b-256 |
e9ba3c9aaad6765a3685f7a7f6fbc551d7fe3807dfec0105dcf4fe136f6d63f7
|