Initial project structure for MCP interceptors (#3)

Establishes a multi-language monorepo structure for MCP interceptors
with Python and TypeScript SDKs alongside the existing Go
implementation. Implements an efficient CI/CD system that only tests
what changes.


#### 🏗️ SDK Scaffolding
- **Python SDK** (`python/sdk/`): Modern Python package using
`pyproject.toml`, aligned with official MCP Python SDK patterns
- **TypeScript SDK** (`typescript/sdk/`): ESM-based package structure,
compatible with official MCP TypeScript SDK
- **Monorepo structure**: Consistent `{language}/sdk/` pattern across
all implementations
  
 #### 🚀 CI/CD Pipeline
- **Path-based workflow triggering**: Only runs CI for languages that
actually changed
    - Change Python → only Python CI runs
    - Change multiple languages → only those CIs run
- **Status check workflow**: Single required check that dynamically
validates based on changes
- **Comment triggers**: Maintainers can run all checks with `/test all`
PR comment
This commit is contained in:
Kurt Degiorgio 2026-01-26 17:54:37 +00:00 • committed by GitHub
commit 20974b6fa0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 900 additions and 3 deletions

31
python/sdk/README.md Normal file
View file

@ -0,0 +1,31 @@
# MCP Interceptors Python SDK
Python implementation of the Model Context Protocol (MCP) interceptor framework.
## Installation
```bash
pip install mcp-ext-interceptors
```
## Usage
```python
from mcp_ext_interceptors import Interceptor
# Example usage will be added as the implementation progresses
```
## Development
```bash
# Install in development mode
pip install -e .
# Run tests (when available)
pytest
```
## License
Apache License 2.0 - See LICENSE file in the root directory for details.

71
python/sdk/pyproject.toml Normal file
View file

@ -0,0 +1,71 @@
[project]
name = "mcp-ext-interceptors"
version = "0.1.0"
description = "Python SDK for Model Context Protocol interceptors"
authors = [{name = "The MCP Interceptors Authors"}]
readme = "README.md"
license = {text = "Apache-2.0"}
requires-python = ">=3.10"
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"mcp>=1.0.0",
]
[project.urls]
"Homepage" = "https://github.com/modelcontextprotocol/ext-interceptors"
"Bug Reports" = "https://github.com/modelcontextprotocol/ext-interceptors/issues"
"Source" = "https://github.com/modelcontextprotocol/ext-interceptors"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/mcp_ext_interceptors"]
[tool.ruff]
line-length = 120
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"PERF", # Perflint
]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # Allow unused imports in __init__.py
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
[tool.mypy]
python_version = "3.10"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = true
[tool.pyright]
typeCheckingMode = "basic"
include = ["src/mcp_ext_interceptors", "tests"]
venvPath = "."
venv = ".venv"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
addopts = "--strict-markers --verbose"

View file

@ -0,0 +1,10 @@
# Copyright 2025 The MCP Interceptors Authors. All rights reserved.
# Use of this source code is governed by a Apache-2.0
# license that can be found in the LICENSE file.
"""
MCP Interceptors Python SDK
Implements MCP Interceptors based on SEP-1763:
https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1763
"""

View file

@ -0,0 +1,8 @@
# Copyright 2025 The MCP Interceptors Authors. All rights reserved.
# Use of this source code is governed by a Apache-2.0
# license that can be found in the LICENSE file.
"""
Package interceptors implements MCP Interceptors based on SEP-1763:
https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1763
"""

View file

@ -0,0 +1,2 @@
# Marker file for PEP 561
# This file indicates that this package supports type checking

View file

@ -0,0 +1 @@
# Tests for mcp-ext-interceptors

View file

@ -0,0 +1,10 @@
# Copyright 2025 The MCP Interceptors Authors. All rights reserved.
# Use of this source code is governed by a Apache-2.0
# license that can be found in the LICENSE file.
"""Tests for MCP interceptors."""
def test_placeholder():
"""Placeholder test to ensure pytest runs successfully."""
assert True