MCP server exposing SITS R package documentation, function reference, and references.
To run the sitsmcp, you need to have Python 3.11+ and uv installed. Then, to install it, first clone the repository:
git clone https://github.com/m3nin0-labs/sitsmcp.gitThen, access the repository downloaded:
cd sitsmcpFinally, you can sync the dependencies:
uv sync
To start using sitsmcp, you first need to create the database (SQLite) for it:
sitsmcp db initNext, index the reference, book and articles from sits:
sitsmcp index allThen, you can run the server:
sitsmcp serve The server listens on http://127.0.0.1:8000/mcp by default.
Settings are optional and read from environment variables (prefix SITSMCP_) or a .env file. See .env.example for the full list and defaults.
For production environments, you can run the server behind nginx and gunicorn (multiple workers) via Docker Compose:
docker compose up --buildThe Docker Compose builds an image for the sitsmcp, which bakes in the pre-built database and the embedding model. The Compose also stars an nginx, which exposes the server on port 80. The settings of the app (API keys, rate limits, rerankers) are passed from the .env file at runtime, so no key is baked into the image.
Note: Tune the number of gunicorn workers with WEB_CONCURRENCY (default 2). Each worker loads its own copy of the embedding model (~1.3 GB of RAM), so raise this only in line with available memory.
The sitsmcp currently implements the following tools:
| Tool | Purpose |
|---|---|
sits_get_function |
Full reference documentation for a named SITS function. |
sits_search_docs |
Semantic search over the SITS book. |
sits_search_functions |
Search the function reference by what a function does; call sits_get_function with the function_name of a hit. |
sits_search_references |
Search academic articles that use SITS. |
sits_index_info |
When each source was indexed, from which build and sits version, and how the server searches. It makes no network call. |
uv sync --extra dev
uv run pytest # run the test suite
uv run ruff check . # lint
uv run mypy sitsmcp # type-checkContributions are welcome. Please open an issue to discuss significant changes, and ensure tests, linting and type checks pass before submitting a pull request.
sitsmcp is distributed under the GPL-v3.0 license. See LICENSE for the full text.