Skip to content
Open
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
4 changes: 2 additions & 2 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9"]
python-version: ["3.10"]

steps:
- name: Show OS
Expand All @@ -25,7 +25,7 @@ jobs:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python3 -m pip install ruff pyrefly msgpack asyncssh
run: python3 -m pip install ruff pyrefly msgpack asyncssh mcp

- name: Test kirk
run: ./kirk --help
Expand Down
36 changes: 34 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
run: python3 -m build

- name: Test with pytest
run: pytest -m "not qemu and not ssh and not ltx"
run: pytest -m "not qemu and not ssh and not ltx and not mcp"

python3:
runs-on: ubuntu-22.04
Expand Down Expand Up @@ -68,4 +68,36 @@ jobs:
run: python3 -m build

- name: Test with pytest
run: python3 -m pytest -m "not qemu and not ssh and not ltx"
run: python3 -m pytest -m "not qemu and not ssh and not ltx and not mcp"

python3-mcp:
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
python-version: [
"3.10",
"3.11",
"3.12",
"3.13",
"3.14"
]

steps:
- name: Show OS
run: cat /etc/os-release

- name: Git checkout
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: python3 -m pip install .[testing,mcp]

- name: Test with pytest
run: python3 -m pytest -m "mcp"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ htmlcov
.venv*
*.qcow2
.vscode
.mcp.json
9 changes: 9 additions & 0 deletions libkirk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,9 @@ def run(cmd_args: Optional[List[str]] = None) -> None:
generic_opts.add_argument(
"--plugins", "-P", type=str, help="Location of custom plugins"
)
generic_opts.add_argument(
"--mcp", action="store_true", help="Start MCP server (stdio transport)"
)

conf_opts = parser.add_argument_group("Configuration options")
conf_opts.add_argument(
Expand Down Expand Up @@ -553,6 +556,12 @@ def run(cmd_args: Optional[List[str]] = None) -> None:
if args.run_pattern and not args.run_suite:
parser.error("--run-pattern must be used with --run-suite")

if args.mcp:
from libkirk.mcp_server import start_server

start_server()
return

if not args.run_suite and not args.run_command:
parser.error("--run-suite/--run-command are required")

Expand Down
Loading
Loading