Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ env/

# IDE
.vscode/
!.vscode/
.vscode/*
!.vscode/mcp.json
.idea/
*.swp
*.swo
Expand Down Expand Up @@ -84,4 +87,4 @@ site/
*.log
*.tmp
temp/
tmp/
tmp/
9 changes: 9 additions & 0 deletions .vscode/mcp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"servers": {
"shortkit-ml": {
"type": "stdio",
"command": ".venv/bin/python",
"args": ["-m", "shortcut_detect.mcp_server"]
}
}
}
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,22 @@ Custom conditions can be registered via `@register_condition("name")`. See [Cond

## MCP Server

ShortKit-ML ships an [MCP](https://modelcontextprotocol.io/) server so AI assistants (Claude, Cursor, etc.) can call detection tools directly from chat — no Python script required.
ShortKit-ML ships an [MCP](https://modelcontextprotocol.io/) server so AI assistants (Claude, Cursor, GitHub Copilot in VS Code, etc.) can call detection tools directly from chat — no Python script required.

```bash
uv pip install -e ".[mcp]"
```

Full setup instructions for **Claude Code** and **Claude Desktop**, available tools, file-based input, and troubleshooting: [**criticaldata.github.io/ShortKit-ML/mcp-server**](https://criticaldata.github.io/ShortKit-ML/mcp-server/).
### GitHub Copilot in VS Code

1. After installing the MCP extra, open VS Code and go to Settings (Ctrl+,).
2. Search for "GitHub Copilot Chat: MCP" and open the JSON settings.
3. Copy the server configuration from the repo's `.vscode/mcp.json` file into the `github.copilot.chat.mcp` object in your settings.
4. Ensure the `"command"` path points to your virtual environment's Python (e.g., update `.venv/bin/python` to the full path if needed).
5. Restart VS Code or reload the GitHub Copilot Chat extension.
6. The ShortKit-ML tools will now be available in Copilot Chat sessions.

Full setup instructions for **Claude Code**, **Claude Desktop**, and **GitHub Copilot in VS Code**, available tools, file-based input, and troubleshooting: [**criticaldata.github.io/ShortKit-ML/mcp-server**](https://criticaldata.github.io/ShortKit-ML/mcp-server/).

## Paper Benchmark Datasets

Expand Down
38 changes: 35 additions & 3 deletions docs/mcp-server.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MCP Server

ShortKit-ML ships a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that exposes shortcut detection as callable tools. AI assistants like Claude can run full analyses — generate data, run detectors, compare methods — directly from chat, with no Python script required.
ShortKit-ML ships a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that exposes shortcut detection as callable tools. AI assistants like Claude and GitHub Copilot in VS Code can run full analyses — generate data, run detectors, compare methods — directly from chat, with no Python script required.

## Prerequisites

Expand All @@ -18,8 +18,6 @@ uv run python -m shortcut_detect.mcp_server

The server should start without errors. Press `Ctrl+C` to stop it.

---

## Option 1 — Claude Code (recommended)

Claude Code reads a `.mcp.json` file from the project root. This file is already committed to the repo, so no manual setup is needed after installing the package.
Expand Down Expand Up @@ -215,3 +213,37 @@ To reuse a previous run:
```
Get the summary for session_id "my-run-1"
```

---

## GitHub Copilot in VS Code

GitHub Copilot Chat in VS Code can consume the same MCP server through Agent mode. This repository includes a checked-in `.vscode/mcp.json` template so the ShortKit-ML server is ready to use once your `.venv` is installed.

### 1. Install dependencies

```bash
uv pip install -e ".[mcp]"
```

### 2. Open the workspace in VS Code

Make sure the repo root is open so VS Code can read `.vscode/mcp.json`.

### 3. Start Copilot Chat in Agent mode

Open Copilot Chat, switch the mode dropdown to **Agent**, and open the tools list. You should see the `shortkit-ml` MCP server and the ShortKit-ML tools.

### 4. Try a prompt

```text
Generate 200 synthetic samples with a linear shortcut and run probe, statistical, and hbac on them.
```

### 5. Customize the Python path if needed

Edit `.vscode/mcp.json` and point `command` at your workspace `.venv/bin/python` path. Use the same `shortcut_detect.mcp_server` module entry point as Claude Code and Claude Desktop.

### Manual verification

The repository-level config and tests are in place, but the Copilot Chat smoke test itself still needs to be confirmed in VS Code by opening the tools panel and running a real prompt.
160 changes: 160 additions & 0 deletions output/shortcut_report.html

Large diffs are not rendered by default.

201 changes: 201 additions & 0 deletions output/test_embeddings.csv

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions output/test_embeddings.json

Large diffs are not rendered by default.

201 changes: 201 additions & 0 deletions output/test_group_labels.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
group
0
1
0
0
0
1
0
0
0
1
0
0
0
0
1
0
1
1
1
0
1
0
1
1
1
1
1
1
1
1
0
0
1
1
1
0
1
0
0
0
0
0
1
1
1
1
1
0
1
1
0
1
0
1
0
1
1
0
0
0
0
0
0
0
0
1
1
0
1
1
1
1
0
1
0
1
1
1
0
1
0
1
0
1
0
0
1
0
1
1
1
1
1
1
1
1
1
1
1
0
0
1
1
1
1
1
1
1
1
0
1
0
1
1
0
1
0
1
1
0
1
0
1
0
0
1
1
0
1
1
1
0
0
0
0
0
0
0
0
0
1
0
1
1
1
0
0
0
0
1
0
0
0
0
0
1
0
1
0
1
0
0
1
1
1
0
1
0
0
1
1
0
0
1
1
1
0
0
0
0
0
0
1
0
0
0
1
0
0
1
0
0
0
0
0
1
1
1
0
0
1 change: 1 addition & 0 deletions output/test_group_labels.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0]
Loading
Loading