LOINC

v1.0.0APIsstable

This project provides a modular Python wrapper for the LOINC API, with an MCP server interface that integrates seamlessly with Claude Desktop for intelligent medical terminology lookup and standardization.

mcp-loincmcpai-integration
Share:
11
Stars
0
Downloads
0
Weekly
0/5

What is LOINC?

LOINC is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to this project provides a modular python wrapper for the loinc api, with an mcp server interface that integrates seamlessly with claude desktop for intelligent medical terminology lookup and standardiza...

This project provides a modular Python wrapper for the LOINC API, with an MCP server interface that integrates seamlessly with Claude Desktop for intelligent medical terminology lookup and standardization.

This server falls under the APIs and Search & Data Extraction categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • This project provides a modular Python wrapper for the LOINC

Use Cases

Look up medical terminology with the LOINC API.
Standardize clinical observation codes intelligently.
Kryzo

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedApr 18, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-loinc

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use LOINC

mcp-loinc is a Python-based MCP server that wraps the official LOINC API, providing Claude Desktop and other MCP clients with structured access to the Logical Observation Identifiers Names and Codes (LOINC) database. It supports searching for clinical codes, retrieving detailed term information, exploring panel structures, navigating term hierarchies, and accessing the top 2000 most-used codes—making it a powerful tool for healthcare informatics and clinical data standardization workflows.

Prerequisites

  • Python 3.8 or higher installed
  • A free LOINC.org account (register at loinc.org) with acceptance of the LOINC terms of use
  • pip or a virtual environment manager such as venv or conda
  • An MCP-compatible client such as Claude Desktop
1

Clone the repository

Clone the mcp-Loinc repository from GitHub to get the server code and requirements file.

git clone https://github.com/Kryzo/mcp-Loinc.git
cd mcp-Loinc
2

Create a virtual environment and install dependencies

Create an isolated Python environment and install the required packages from requirements.txt to avoid conflicts with system packages.

python3 -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
pip install -r requirements.txt
3

Configure LOINC credentials

The server authenticates against the LOINC API using your loinc.org username and password. Set these in the MCP client configuration or as environment variables.

export LOINC_USERNAME="your_loinc_username"
export LOINC_PASSWORD="your_loinc_password"
4

Add to Claude Desktop configuration

Edit your Claude Desktop config file to register the mcp-loinc server, passing credentials as environment variables.

{
  "mcpServers": {
    "loinc": {
      "command": "/path/to/mcp-Loinc/.venv/bin/python",
      "args": ["server.py"],
      "cwd": "/path/to/mcp-Loinc",
      "env": {
        "LOINC_USERNAME": "your_loinc_username",
        "LOINC_PASSWORD": "your_loinc_password"
      }
    }
  }
}
5

Restart Claude Desktop and verify connection

Restart Claude Desktop so the server is picked up. Ask Claude to search for a common LOINC code such as glucose to confirm connectivity.

LOINC Examples

Client configuration

Claude Desktop configuration for mcp-loinc with credentials passed as environment variables.

{
  "mcpServers": {
    "loinc": {
      "command": "/path/to/mcp-Loinc/.venv/bin/python",
      "args": ["server.py"],
      "cwd": "/path/to/mcp-Loinc",
      "env": {
        "LOINC_USERNAME": "your_loinc_username",
        "LOINC_PASSWORD": "your_loinc_password"
      }
    }
  }
}

Prompts to try

Natural-language prompts that exercise the LOINC API tools.

- "Search for LOINC codes related to glucose and return the top 5 results"
- "Give me the full details for LOINC code 2339-0"
- "Show me the panel structure for LOINC code 24331-1"
- "Find hemoglobin codes filtered by property 'MCnc' and system 'Bld'"
- "What are the answer list options for LOINC code 44249-1?"
- "List the top 10 most commonly used LOINC codes"

Troubleshooting LOINC

Authentication fails with 401 Unauthorized

Verify your loinc.org credentials by logging into loinc.org directly in a browser. Ensure you have accepted the LOINC license agreement, which is required before API access is granted.

Module not found errors on startup

Make sure you activated the virtual environment before running the server ('source .venv/bin/activate'). Confirm all dependencies installed successfully with 'pip list' and re-run 'pip install -r requirements.txt' if any are missing.

Server starts but Claude cannot connect to it

Double-check the 'command' and 'cwd' paths in claude_desktop_config.json are absolute paths. Run the Python command manually in a terminal to confirm it starts without errors before restarting Claude Desktop.

Frequently Asked Questions about LOINC

What is LOINC?

LOINC is a Model Context Protocol (MCP) server that this project provides a modular python wrapper for the loinc api, with an mcp server interface that integrates seamlessly with claude desktop for intelligent medical terminology lookup and standardization. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install LOINC?

Follow the installation instructions on the LOINC GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with LOINC?

LOINC works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is LOINC free to use?

Yes, LOINC is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-loinc": { "command": "npx", "args": ["-y", "mcp-loinc"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use LOINC?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides