This MCP server provides an API interface to extreme p-value calculation functions (z, t, F, chi-square, SAIGE) implemented in the R script extreme-P.R, via Python.
- Strongly depends on the R script
extreme-P.R(except for Wald). - Uses pyper to call R from Python.
- The API server is built with FastMCP.
extreme_p_helper.pyis a 1-to-1 wrapper for the R functions.server.pyprovides the API endpoints.
🚧 Under Active Development 🚧
This project is under active development. APIs and features may change without notice.
- uv
- pyper
- fastmcp
- mcp[cli]
+.
├── server.py # Main FastMCP server
├── extreme_p_helper.py # R function wrapper
├── extreme-P.R # R script for extreme p-value calculation (see acknowledgements)
├── pyproject.toml # Dependencies
└── README.md # This document
{
"mcpServers": {
"ExtremeP": {
"command": "uv",
"args": ["--directory", "where you cloned the repo", "run", "server.py"],
"env": {}
}
}
}# Install dependencies
uv sync
# Run MCP Inspector
uv --directory ./ run mcp dev server.py# Install dependencies
uv sync
# Run the MCP server
uv run server.pyfrom extreme_p_helper import ExtremePHelper
helper = ExtremePHelper()
result = helper.pvalue_extreme_z(10)
print(result) # {'mantissa': ..., 'exponent': ...}This MCP server is released under the Apache License 2.0.