Listed from the MCP registry; nobody on Odel publishes it.
Exactly explainable classifiers for agents: train, tune, predict, explain on CSV or Excel.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
uvx glin-ml
MCP client config
{
"mcpServers": {
"glin": {
"command": "uvx",
"args": [
"glin-ml"
]
}
}
}☕ If glin is useful to you and you want to help maintain it, you can buy me a coffee.
glin lets your AI agent train a classifier on your data and then use it. You install glin into an agent such as Claude Code, Claude Desktop or Cursor. Then you talk to the agent in plain language. The agent trains the model, makes predictions and explains them. You do not write code.
glin trains an Explainable Boosting Machine (EBM) on a CSV or Excel file. Each prediction comes with an exact breakdown of the features that caused it. The breakdown comes from the additive structure of the model. It is not a SHAP or LIME approximation.
glin is an MCP server. It runs on your machine and talks to the agent over stdio. Your data and your models stay on your machine.
Changelog: CHANGELOG.md lists the changes in each release.
Case study: The segment of 100,000 sales leads. Claude with glin put 71% of new leads in the correct segment. Claude alone got 33%. With 1,000 labeled leads in the prompt, Claude got 60% and used 6.7 times more tokens.
~/.glin/models/<name>/.A saved model stays available. You can use it again in a new chat.
~/data/leads.csv that predicts converted. Call it leads_v1."leads_v1."Your MCP client starts glin with uvx. uvx downloads the PyPI package glin-ml and keeps it in a cache. You do not install glin with pip. (The PyPI name glin belongs to an unrelated project.)
Do step 1 for all clients. Then do step 2 for your client.
Install uv. Use one of these commands:
# macOS and Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# macOS with Homebrew
brew install uv
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Open a new terminal.
Run this command:
uvx --from 'glin-ml[excel]>=0.1.5' glin --version
The command shows glin-ml 0.1.5 or a later version. The first run downloads glin and its libraries into the cache. This can take approximately one minute.
Do not skip step 1.3. Some clients stop a server that does not start in 30 seconds. Claude Code is one of them. When the cache is full, glin starts in a few seconds.
Do the steps for one of these clients:
The plugin adds the glin MCP server and a skill. The skill tells the agent when and how to build, tune, predict with and explain a model. The plugin includes Excel support.
Start Claude Code.
Add the glin marketplace:
/plugin marketplace add AkashChatterjee/glin
Install the plugin:
/plugin install glin@glin-marketplace
If Claude Code tells you to restart it, restart it.
Run /mcp. Make sure that the list shows the glin server as connected.
The plugin starts uvx --from 'glin-ml[excel]>=0.1.5' glin serve. The plugin files are in .claude-plugin/marketplace.json and plugins/glin/.
Use this option to add only the MCP server, without the skill.
In a terminal, run this command:
claude mcp add --scope user glin -- uvx --from 'glin-ml[excel]>=0.1.5' glin serve
--scope user makes glin available in all your projects. To add glin to the current project only, remove --scope user.
Start Claude Code.
Run /mcp. Make sure that the list shows the glin server as connected.
Open Claude Desktop.
Open Settings > Developer and click Edit Config. This opens the file claude_desktop_config.json:
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.jsonAdd the glin entry to mcpServers. If the file has other servers, keep them:
{
"mcpServers": {
"glin": {
"command": "uvx",
"args": ["--from", "glin-ml[excel]>=0.1.5", "glin", "serve"]
}
}
}
Save the file.
Quit Claude Desktop fully, then start it again. On macOS, closing the window is not sufficient.
Make sure that the glin tools show in the tools menu of a new chat.
If Claude Desktop cannot find uvx (for example spawn uvx ENOENT), use the full path. Run which uvx (macOS and Linux) or where uvx (Windows), and put the result in "command".
Open the MCP config file of your client:
~/.cursor/mcp.json for all projects, or .cursor/mcp.json in one project.Add the same glin entry as for Claude Desktop:
{
"mcpServers": {
"glin": {
"command": "uvx",
"args": ["--from", "glin-ml[excel]>=0.1.5", "glin", "serve"]
}
}
}
Save the file and restart the client.
Make sure that the client shows glin as an enabled MCP server.
If the client cannot find uvx, use the full path to uvx in "command", as for Claude Desktop.
glin is in the official MCP Registry as io.github.AkashChatterjee/glin. The registry is a catalog of metadata. It is not an installer. MCP marketplaces and some clients read it and show glin in their server lists. For example, VS Code installs servers from the GitHub MCP Registry.
glin.io.github.AkashChatterjee/glin.The registry entry starts uvx glin-ml serve, without the excel extra. The registry format has no field for extras. To read Excel files, use the steps in Cursor and other MCP clients instead. If your client has no registry search, use those steps too.
[excel] from the arguments.--allow-dir after serve in the arguments. See Server flags.uvx --refresh --from 'glin-ml[excel]>=0.1.5' glin --version. Then restart your client.uv tool install 'glin-ml[excel]' or pipx install 'glin-ml[excel]', set "command" to glin and "args" to ["serve"]. You must update this copy yourself, for example with uv tool upgrade glin-ml.When glin is installed, talk to the agent in plain language. The agent selects the glin tools. You do not need to know the tool names. This section shows what you can ask and what you get. For the exact tool arguments, see MCP tools.
Give the agent a data file and the column to predict:
"Train a classifier on
~/data/churn.csvthat predictschurn. Call itchurn_v1."
The agent calls train_model. glin checks the data, prepares the columns and trains the model. Then glin returns:
The test results are log_loss, baseline_log_loss (a guess from the class shares only), train_log_loss, accuracy, balanced_accuracy and roc_auc. A useful model has a log_loss that is clearly lower than baseline_log_loss.
For a careful build, ask the agent to use the build_classifier prompt. The prompt tells the agent to clean the data, remove leakage, tune the model and report the honest performance. See MCP prompts.
If a model with the same name exists, training fails. To replace a model, for example with new data, ask the agent to retrain it with overwrite=True.
Ask about one case or many cases. Give the values that you know:
"I've got 3 deals to prioritize before quarter close: Northwind Systems ($42k, Opportunity stage, came from a referral, VP contact, owned by Carla Nguyen, 8 touches logged), Summit Retail Group ($8k, still a Lead, paid social source, owned by Brian Kessler), and Anchor Nonprofit ($3k, still a Lead, owned by Frank Suarez, no activity logged yet). Run them through deal_predictor_v1 and tell me which to prioritize."
The agent calls predict once for each deal. It gives a ranked answer with the reasons:
| Deal | Win probability | Why |
|---|---|---|
| Northwind Systems | 69% | The Opportunity stage, the referral and the VP contact all favor it. The $42k deal size is the one drag. |
| Summit Retail Group | 35% | It is still a Lead, and it came from paid social. Both are large drags with nothing against them. |
| Anchor Nonprofit | 34% | No activity is logged and it is still a Lead. Nothing in the record favors it. |
Each prediction has an audit. The audit gives the score of each feature, and the scores add up exactly to the probability. glin checks this sum in each prediction (additivity_verified).
Some important points:
Lead, Opportunity and Customer. Other spellings are new categories for the model.Ask what drives the outcome:
"What drives churn in
churn_v1?"
The agent calls explain_model. glin reads the answer directly from the model. It does not sample predictions. The result gives:
Ask the agent to tune the model:
"Tune
churn_v1, and tell me how good it really is."
The tune_model_hyperparameters prompt gives the agent a safe procedure:
The agent can get all settings, with defaults and ranges, from list_hyperparameters. glin rejects unknown settings and values out of range.
Rows from the same state, region, customer, site or user look alike. A random holdout then gives metrics that are too optimistic. In one real case, a model got 82% accuracy and 0.89 AUC on a random holdout. It got 63% and 0.77 on states that it did not see.
If your data has such a column, ask the agent to hold out by that column:
"Train on
~/data/districts.csv, predicthigh_stunting, and hold out bystate."
The agent passes holdout_group_column="state". glin then puts whole groups in the holdout. The test results then show the performance on groups that the model did not see. The prompts tell the agent to use this option when such a column exists.
holdout_fraction) in the holdout. It tries 25 group orders and keeps the one whose class shares are closest to the full data."S06" and "s06 " are one group. Blank text, nan and none are missing values. Missing values are one group.list_models.churn_v1 need as input?" The agent calls inspect_model. The result gives the features by type (numeric, categorical and date), the dropped columns, the target classes, the settings and the test results.churn_v1." The agent calls delete_model. The deletion is permanent. You can also remove the folder in ~/.glin/models/ yourself.Model names: A new model name has 1 to 64 characters. Use only letters, digits, -, _ and .. Do not start the name with .. To use or delete a model, the name must be one folder name in ~/.glin/models/. glin makes sure that a model name cannot read, write or delete files outside this folder.
The agent gives glin a file path (csv_path). glin reads the file itself, so the agent does not copy the data into the chat. csv_path takes .csv, .xlsx and .xls files.
glin reads a file only if it is in an allowed folder. By default, the allowed folders are:
/ and not a parent of your home folder.Claude Desktop on macOS starts the server from /. Then only your home folder is allowed. Claude Code starts the server from the project folder, so that folder is also allowed. For data in other places, for example /Volumes/data, use --allow-dir. See Server flags.
More rules:
--max-file-mb... in the path. The real path must be in an allowed folder.csv_content). Use this only for small data, because the data goes through the chat.The folder rules have two known limits. A hard link in an allowed folder to a file outside it is read. If the path changes between the check and the read, glin reads the new file. Thus, do not allow a folder that other users or processes can write to.
glin trains directly on Excel sheets, including sheets with title rows, merged headers and footnotes. Excel support needs the excel extra. The install steps above include it.
Tell the agent the sheet and the header rows if you know them:
"Train a classifier on
~/data/report.xlsx, sheetData 2023, header rows 3-4, that predictsoutcome."
The agent passes sheet and header_rows to train_model. These rules apply:
sheet. For a workbook with several sheets, glin gives an error that lists the sheets. glin ignores case and outer spaces in the name if only one sheet matches.4, "3-4", "3,4" or [3, 4]. If you do not give them, glin finds the header row. It skips title rows above it. If the header is not clear, glin stops and asks for header_rows. glin does not guess.2023 - sales. A blank cell under a merged label gets the label from the left. Duplicate names get _2, _3 and so on. A date in a header becomes an ISO date, for example 2024-01-01.Source, Note, Footnote, *, †, ‡ or ©, or it is a sentence of 6 words or more.The result shows the sheet, the header rows and the number of rows that glin read. sheet and header_rows are errors for a CSV file.
Before training, glin checks the data. A hard problem stops training with a clear error. A soft problem gives a warning, and training continues.
"1" to "5".glin prepares each column before training. It uses the same rules at prediction time.
| Data | What glin does |
|---|---|
| Numbers, with missing values | glin uses them as numbers. Missing values get their own bin. |
| Numbers stored as text, with blanks | glin converts the column to numbers if at least 80% of the values are numbers. Other values become missing. |
Currency and thousands separators ($1,234.56, €1.234,56, USD 100, Rs. 100) | glin removes the currency symbols and codes. It reads a decimal comma only if the column has clear European values, for example 1.234,56 or 12,5. A plain 1,234 is one thousand two hundred and thirty-four. If a value has both separators, the last one is the decimal mark. If a column mixes both styles, glin reads US style and gives a warning. |
Negative numbers (-5, −5, (1,234), 1234-) | glin reads the Unicode minus, brackets and a trailing minus as negative. |
Percents (44.98%) | glin removes the %. The value stays in percentage points: 44.98% becomes 44.98. |
Infinity (inf, -inf) | glin makes it missing and gives a warning. |
Codes for missing values (SUPP, NE, NP, z, *, ..) | In a numeric column, glin makes these codes missing. Case and outer spaces do not matter. To use other codes, give suppression_codes. If a numeric column has other short codes, for example x, glin makes them missing and gives a warning. If unknown codes are more than 20% of a column, the column becomes text, and the warning suggests the codes to add. glin does not use <5 and — as codes, because they can be real values. |
| Text categories, up to 250 values | glin uses each value as a category, without case and outer spaces. A new value at prediction time is a new category and gives a warning. |
| True/false | glin uses them as 0 and 1. |
| Dates and timestamps | glin splits them into date parts. See Dates and timestamps. |
glin finds date columns automatically. At least 80% of the values must be full dates, for example 2024-03-06, 2024-03-06 14:30:00, 03/06/2024, 6 Mar 2024 or Mar 6, 2024.
<col>__year, <col>__month (jan to dec), <col>__day_of_week (mon to sun), <col>__hour and <col>__days_since_start. days_since_start counts days from the earliest date in training.__hour for dates with no time.dd/mm or mm/dd from the values. If the values do not show the order, glin uses month first and gives a warning. Use ISO dates (YYYY-MM-DD) to prevent this."2024-03-06". glin warns if the date is out of the training range, if it is not a date, or if its day and month order is not clear. The warning shows the date that glin used (parsed_as).glin removes these columns before training. The result lists each removed column with the reason.
| Data | What glin does |
|---|---|
| Columns with one value | glin removes them. |
| Identifiers (row numbers, sequential IDs, UUIDs, hashes) | In data with more than 50 rows, glin removes a column of distinct whole numbers if the numbers fill a range (for example 1 to N) or if the name has an ID word (id, idx, key, uuid, guid, pk, or the name index). It also removes text columns where more than 95% of the values are different. Distinct numbers with large, uneven gaps, for example salaries, stay as numbers. |
| Text with more than 250 values, for example free text | glin removes it. glin does not process natural language. |
| Lists or JSON in a cell | glin does not read them. It uses the cell as one text value. |
Dates stored as numbers (2024, 20240306, epoch seconds) | glin uses them as numbers, not dates. Change them to date text if they are dates. |
A column leaks the target if it gives the answer directly. This often happens when someone made the target from that column, for example with a threshold. A model with such a column looks very good in tests but is not useful.
After preparation, glin checks each feature alone. If one feature predicts the target with 99% balanced accuracy or more, glin gives a Possible target leakage warning. The warning shows the evidence, for example > 62.5 -> 'yes' or {p, q} -> 'ok'. Training continues. The agent asks you about each warning. If the value is not known at the time of the prediction, remove the column and train again.
All tools have MCP annotations. train_model and delete_model are marked destructive, because they can replace or remove a model. The other tools are read-only. Thus a client can run the read-only tools automatically and ask you before the others.
train_model(target_column, model_name, csv_path=None, csv_content=None, overwrite=False, hyperparameters=None, holdout_fraction=0.2, holdout_group_column=None, suppression_codes=None, sheet=None, header_rows=None) trains a model and saves it.
csv_path or csv_content, not both.holdout_fraction=0 trains on all rows and gives no test results.hyperparameters takes EBM settings, for example {"interactions": 0}. See list_hyperparameters.rows_read, target_classes, features_kept, features_dropped, date_columns, warnings, hyperparameters, training_rows, training_seconds, terms and evaluation. For an Excel file, it also has sheet and header_rows.evaluation is null if holdout_fraction=0. A grouped holdout adds holdout_groups and train_groups.predict(model_name, features, top_n=10) gives the predicted class, the probabilities and the audit:
base_logit is the intercept. contributions gives the score of each term, the largest first.score_class, the second class in target_classes. A positive score pushes toward score_class. For a multiclass target, each term has score_by_class.additivity_verified is true if the scores add up to the model probability.1. The keys of the probability dictionaries are always text, for example "1".warnings lists inputs that the model did not see: unseen_category, out_of_range, unparseable_number, unparseable_date, ambiguous_date_format and date_order_mismatch.missing_features lists the inputs that are absent or blank.explain_model(model_name, top_n=15, include_shapes=True) gives the feature ranking, the top terms and, for a binary target, the shape of each feature.inspect_model(model_name) gives the features by type (numeric, categorical and date), the dropped columns, the target classes, the settings and the test results. For each date column, it gives the date parts and the start date of days_since_start.list_models() lists all saved models.list_hyperparameters() lists each EBM setting with its type, default, range and effect.delete_model(model_name) deletes a model permanently. The result has model_name, deleted and path.Prompts are ready-made instructions for the agent. In most clients, you select them in a prompt menu. Claude Desktop shows them in the attach (+) menu.
build_classifier(csv_path, target_column, model_name) does the full procedure: check and clean the data, remove leakage, tune with a fixed holdout and a budget of approximately 10 trials, train on all rows, and report the expected performance.tune_model_hyperparameters(model_name, target_column) gives the tuning procedure in Tune a model, with the current settings table.prepare_csv_for_training(target_column) is a checklist for the data before training: file problems, the choice of target, and what glin does and does not do to the columns.All arguments are optional. glin makes the prompts from its current defaults, so they agree with the code.
Put these flags after serve in the arguments of your client config, for example ["--from", "glin-ml[excel]>=0.1.5", "glin", "serve", "--allow-dir", "/Volumes/data"].
| Flag | Effect |
|---|---|
--allow-dir DIR | Allow csv_path to read files in DIR. You can use the flag more than once. It replaces the default folders. If DIR is /, glin gives a warning on stderr. |
--max-file-mb MB | Set the largest file that csv_path reads. The default is 200. |
glin --version shows the version. glin serve writes only MCP messages to stdout and writes log messages to stderr.
The segment of 100,000 sales leads uses glin on synthetic CRM data with known rules. Because the rules are known, the study can check each prediction and explanation against the truth.
Child stunting across Indian districts (NFHS-5) uses glin on real public data. A glin model predicts whether a district has high child stunting, and gives the exact reason for each prediction.
Install an editable copy from a clone of this repository:
git clone https://github.com/AkashChatterjee/glin.git
cd glin
pip install -e ".[dev]" # also installs the Excel libraries, and xlwt to build .xls test files
pytest
To try the checkout in an MCP client, set "command" to the glin program in your environment (for example /path/to/glin/.venv/bin/glin) and "args" to ["serve"].
mcp Python SDK 1.x and 2.x (mcp>=1.21.1,<3). To test one line, add a constraint, for example pip install -e ".[dev]" "mcp>=2,<3".Tests workflow (.github/workflows/test.yml) runs on each pull request and each push to main. It uses Python 3.10 and 3.12 with the latest mcp 1.x and 2.x, and Python 3.10 with mcp==1.21.1.glin/validation.py and glin/preprocessor.py. The EBM settings are in glin/hyperparameters.py. Add or change a setting there.EBMTabularPreprocessor takes suppression_codes and date_parse_threshold. A DataFrame with column names that are not text, for example 0, gets text names, for example "0".Only the Publish to PyPI GitHub Actions workflow (.github/workflows/publish.yml) publishes releases to PyPI. Nobody uploads from a local machine. Do not use twine upload, uv publish or personal API tokens. To release, push a tag of the form vX.Y.Z:
git tag vX.Y.Z
git push origin vX.Y.Z
The workflow runs the Tests workflow first (the same matrix as for pull requests). If a test fails, the workflow stops and does not publish. Then it builds the sdist and the wheel, and checks that both carry the version of the tag. Then it publishes them to PyPI as glin-ml at that exact version, and creates the GitHub Release from CHANGELOG.md.
hatch-vcs derives the package version from the git tag. pyproject.toml has no fixed version, so you do not bump the package version before a release. The plugin and registry files have their own versions (see Release steps).0.1.4.dev1+g3fa91a0. A source tree with no git metadata reports 0.0.0.glin.__version__ reads the installed package metadata.vX.Y.Z.The owner does these steps for each release:
CHANGELOG.md, move the entries under [Unreleased] to a new heading ## [X.Y.Z] - YYYY-MM-DD. Add the compare link at the bottom. Compare the entries with gh issue list --milestone vX.Y.Z --state closed.server.json (version and packages[0].version) and in plugins/glin/.claude-plugin/plugin.json (version). If the plugin needs the new release, also change the minimum version in plugins/glin/.mcp.json and in the commands and configs in Install. Merge these changes into main.git tag vX.Y.Z and git push origin vX.Y.Z.Publish to PyPI run and approve the pypi environment. The upload step starts only after this approval.CHANGELOG.md has no section for the version, or if server.json or plugin.json has a different version than the tag. If all is correct, it publishes to PyPI. Then it creates the GitHub Release with the CHANGELOG.md section of the version as the notes. Also, the mcp-registry job publishes to the MCP Registry (see Publishing to the MCP Registry).isLatest: true:curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.AkashChatterjee/glin"
If the mcp-registry job fails, use the manual fallback in Publishing to the MCP Registry.
To compare the changelog with the merged pull requests, open a draft release on GitHub and click "Generate release notes". .github/release.yml groups the pull requests by label.
The workflow publishes through PyPI trusted publishing (OIDC). This also makes local uploads impossible.
glin-ml project → Publishing: add a trusted publisher for owner AkashChatterjee, repository glin, workflow publish.yml and environment pypi.glin-ml. Do not create new tokens. With no tokens and 2FA on, the only credential that can publish is the short-lived OIDC identity of the workflow. Also review the collaborators of the project. Remove anyone who does not need upload rights.v*. Restrict who can create tags, and block deleting or moving them. A new matching tag starts a release.pypi: add required reviewers. Every release then needs a manual approval before the upload step runs.The registry holds metadata only. It checks that the PyPI package has the line mcp-name: io.github.AkashChatterjee/glin in its README. The README has this line as a hidden comment.
The mcp-registry job in publish.yml publishes to the registry. It runs after the publish job, so the version is on PyPI first. The job does these steps:
version and packages[0].version in server.json, and version in plugins/glin/.claude-plugin/plugin.json, equal the tag without the v. The build job does the same check, so a mismatch stops the run before the upload to PyPI. The check is in .github/scripts/check-versions.sh.mcp-publisher (Linux, amd64) and checks its SHA-256. The version is in MCP_PUBLISHER_VERSION in publish.yml. When you change it, also change MCP_PUBLISHER_SHA256 to the value in the registry_<version>_checksums.txt file of that release.mcp-publisher login github-oidc. The job has the id-token: write permission. No secret or token is stored in GitHub.mcp-publisher publish. The PyPI CDN can lag for a minute or more after an upload, and the registry then cannot see the new version. If the command fails, the job waits 60 seconds and tries again, up to 5 tries in total.isLatest: true.The registry rejects a version that already exists. If the job fails after the registry accepted the version, do not run it again. Check the listing instead.
If the job cannot publish, set the versions in server.json and run these commands from the repository root, after the version is on PyPI:
mcp-publisher login github
mcp-publisher publish
Then check the listing with the curl command in the release steps.
To check a build without publishing it, run uv build locally and inspect dist/. Never upload it. After a release, confirm that the public package works with a clean install:
uvx --refresh --from 'glin-ml==X.Y.Z' glin --version
uvx --from 'glin-ml==X.Y.Z' glin serve --help
Use the released version in place of X.Y.Z. The first command must show this version. A pinned version also prevents uvx from using an older copy from uv tool install. Then start the server from an MCP client, ask the agent to train a small model, and delete it with delete_model.