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
9 changed files with 900 additions and 3 deletions

View file

@ -0,0 +1,24 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module",
"project": "./tsconfig.json"
},
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking"
],
"env": {
"node": true,
"es2022": true
},
"rules": {
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/no-explicit-any": "error",
"@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }]
}
}

1
typescript/sdk/.nvmrc Normal file
View file

@ -0,0 +1 @@
20

40
typescript/sdk/README.md Normal file
View file

@ -0,0 +1,40 @@
# MCP Interceptors TypeScript SDK
TypeScript implementation of the Model Context Protocol (MCP) interceptor framework.
## Installation
```bash
npm install @ext-modelcontextprotocol/interceptors
```
## Usage
```typescript
import { Interceptor } from '@ext-modelcontextprotocol/interceptors';
// The MCP SDK is available as a peer dependency
import { Client, Server } from '@modelcontextprotocol/sdk';
// Example usage will be added as the implementation progresses
```
## Development
```bash
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Lint
npm run lint
```
## License
Apache License 2.0 - See LICENSE file in the root directory for details.

View file

@ -0,0 +1,56 @@
{
"name": "@ext-modelcontextprotocol/interceptors",
"version": "0.1.0",
"description": "TypeScript SDK for Model Context Protocol interceptors",
"type": "module",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js"
}
},
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"engines": {
"node": ">=20"
},
"scripts": {
"build": "tsc",
"test": "vitest run",
"test:watch": "vitest",
"lint": "eslint src --ext .ts",
"prepublishOnly": "npm run build"
},
"keywords": [
"mcp",
"model-context-protocol",
"interceptors"
],
"author": "The MCP Interceptors Authors",
"license": "Apache-2.0",
"repository": {
"type": "git",
"url": "https://github.com/modelcontextprotocol/ext-interceptors.git",
"directory": "typescript/sdk"
},
"bugs": {
"url": "https://github.com/modelcontextprotocol/ext-interceptors/issues"
},
"homepage": "https://github.com/modelcontextprotocol/ext-interceptors",
"files": [
"dist",
"src",
"README.md"
],
"peerDependencies": {
"@modelcontextprotocol/sdk": "^1.0.0"
},
"devDependencies": {
"@types/node": "^20.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"eslint": "^8.0.0",
"typescript": "^5.0.0",
"vitest": "^2.0.0"
}
}

View file

@ -0,0 +1,12 @@
// 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 TypeScript SDK
*
* Implements MCP Interceptors based on SEP-1763:
* https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1763
*/
export * from './interceptors.js';

View file

@ -0,0 +1,11 @@
// 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.
import { describe, it, expect } from 'vitest';
describe('Interceptors', () => {
it('should be defined', () => {
expect(true).toBe(true);
});
});

View file

@ -0,0 +1,12 @@
// 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.
/**
* Core interceptor functionality for MCP
*
* Based on SEP-1763:
* https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1763
*/
// Placeholder for interceptor implementation

View file

@ -0,0 +1,22 @@
{
"compilerOptions": {
"target": "esnext",
"module": "NodeNext",
"lib": ["esnext"],
"outDir": "./dist",
"rootDir": "./src",
"declaration": true,
"declarationMap": true,
"sourceMap": true,
"strict": true,
"isolatedModules": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "NodeNext",
"resolveJsonModule": true
},
"include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}

View file

@ -0,0 +1,10 @@
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'node',
include: ['src/**/*.test.ts', 'test/**/*.test.ts'],
exclude: ['**/node_modules/**', '**/dist/**']
}
});