FineRx MCP server
Give an AI assistant live access to FineRx drug-price data — the same
catalog, package, price-comparison, and nearest-pharmacy data shown on the
FineRx website — through the Model Context Protocol.
finerx-mcp is a thin client over the FineRx public REST API
(/api/public/v1). It has no direct database access and inherits the public
API's authentication and rate limits, so it adds zero extra attack surface.
Tools
search_drugs(query, limit=10) | Find drugs by name/alias → candidates with slugs + from-prices |
get_drug(slug) | A drug's stats + strength/form variants |
compare_prices(ndc, quantity) | Offer matrix (chain × savings program × price × observation date) |
find_nearby_pharmacies(zip, chains?, limit=3) | Nearest store locations per chain around a ZIP |
get_dataset_info() | Dataset coverage, freshness, and attribution/disclaimer terms |
Every result embeds a one-line disclaimer and, wherever a price appears, an
observedAt date. No tool ever returns hidden vendors or an operator reference
price.
Prerequisites
Configuration
The server reads two environment variables:
FINERX_API_KEY | yes | — | Your frx_live_... key |
FINERX_API_BASE | no | https://finerxfinder.com/api/public/v1 | Point at another host for local testing |
Install & run
Run directly with uvx (no manual install needed):
FINERX_API_KEY=frx_live_xxxxxxxx uvx finerx-mcp
The server speaks MCP over stdio by default.
Remote (HTTP) mode
The same tools can be served over Streamable HTTP — the transport that
connector catalogs (ChatGPT Apps, Claude connectors, Gemini, Grok) consume, so a
user adds FineRx by URL with no local install. Set the transport (and, for a
hosted deployment, the bind host/port):
FINERX_API_KEY=frx_live_xxxx \
FINERX_MCP_TRANSPORT=streamable-http \
FINERX_MCP_HOST=0.0.0.0 FINERX_MCP_PORT=9000 \
uvx finerx-mcp
Defaults stay stdio, so existing Claude Desktop/Code/Cursor configs are
unaffected. The HTTP endpoint calls the same public REST API with the server's
FINERX_API_KEY, so hosting it exposes no data beyond the already-public API.
Claude Desktop
Add to your claude_desktop_config.json
(macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"finerx": {
"command": "uvx",
"args": ["finerx-mcp"],
"env": {
"FINERX_API_KEY": "frx_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}
}
}
Restart Claude Desktop; the FineRx tools appear in the tools menu.
Claude Code
claude mcp add finerx --env FINERX_API_KEY=frx_live_xxxx -- uvx finerx-mcp
Or add it to .mcp.json in your project:
{
"mcpServers": {
"finerx": {
"command": "uvx",
"args": ["finerx-mcp"],
"env": { "FINERX_API_KEY": "frx_live_xxxxxxxx" }
}
}
}
Local development
Run against a local FineRx stack (e.g. the dev proxy on :8080):
export FINERX_API_KEY=frx_live_...
export FINERX_API_BASE=http://localhost:8080/api/public/v1
uv run --project packages/finerx-mcp finerx-mcp
A smoke test that drives one tool call end-to-end lives at
scripts/smoke_mcp.py in the FineRx repo.
Terms
Data is provided under the FineRx public API terms: attribution required
("Prices via FineRx"), prices are observed estimates (not guaranteed or insured
prices) and may be out of date, and nothing here is medical advice. Pharmacy
location coordinates are © OpenStreetMap contributors (ODbL).