Skip to content

Commit 71c18bd

Browse files
authored
Merge branch 'main' into max/chore-remove-debug-checks
2 parents 8cb3623 + 929c97c commit 71c18bd

File tree

9 files changed

+555
-29
lines changed

9 files changed

+555
-29
lines changed

.github/workflows/check.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,11 @@ jobs:
1818
with:
1919
node-version: 22
2020

21+
- name: Run type checking and formatting
22+
run: pnpm run check
23+
24+
- name: Run unit tests
25+
run: pnpm run test:unit
26+
2127
- name: Build
2228
run: pnpm build
23-
24-
- name: Run checks
25-
run: pnpm run check

AGENT.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# AGENT.md - mcp-remote Development Guide
2+
3+
## Commands
4+
5+
- **Build**: `pnpm build` (or `pnpm build:watch` for development)
6+
- **Type check**: `pnpm check` (runs prettier and tsc)
7+
- **Lint/Format**: `pnpm lint-fix` (prettier with write)
8+
- **Test**: `pnpm test:unit` (or `pnpm test:unit:watch` for watch mode)
9+
- **Run dev**: `npx tsx src/client.ts` or `npx tsx src/proxy.ts`
10+
11+
## Architecture
12+
13+
- **Project Type**: TypeScript ESM library for MCP (Model Context Protocol) remote proxy
14+
- **Main Binaries**: `mcp-remote` (proxy.ts), `mcp-remote-client` (client.ts)
15+
- **Core Libraries**: `/src/lib/` contains auth coordination, OAuth client, utils, types
16+
- **Transport**: Supports both HTTP and SSE transports with OAuth authentication
17+
- **Config**: Uses `~/.mcp-auth/` directory for credential storage
18+
19+
## Code Style
20+
21+
- **Formatting**: Prettier with 140 char width, single quotes, no semicolons
22+
- **Types**: Strict TypeScript, ES2022 target with bundler module resolution
23+
- **Imports**: ES modules, use `.js` extensions for SDK imports
24+
- **Error Handling**: EventEmitter pattern for auth flow coordination
25+
- **Naming**: kebab-case for files, camelCase for variables/functions
26+
- **Comments**: JSDoc for main functions, inline for complex auth flows

package.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mcp-remote",
3-
"version": "0.1.14",
3+
"version": "0.1.18",
44
"description": "Remote proxy for Model Context Protocol, allowing local-only clients to connect to remote servers using oAuth",
55
"keywords": [
66
"mcp",
@@ -9,7 +9,7 @@
99
"remote",
1010
"oauth"
1111
],
12-
"author": "Glen Maddern <glen@cloudflare.com>",
12+
"author": "Glen Maddern <glen@glenmaddern.com>",
1313
"repository": "https://github.com/geelen/mcp-remote",
1414
"type": "module",
1515
"files": [
@@ -26,20 +26,24 @@
2626
"build": "tsup",
2727
"build:watch": "tsup --watch",
2828
"check": "prettier --check . && tsc",
29-
"lint-fix": "prettier --check . --write"
29+
"lint-fix": "prettier --check . --write",
30+
"test:unit": "vitest run",
31+
"test:unit:watch": "vitest"
3032
},
3133
"dependencies": {
3234
"express": "^4.21.2",
33-
"open": "^10.1.0"
35+
"open": "^10.1.0",
36+
"strict-url-sanitise": "^0.0.1"
3437
},
3538
"devDependencies": {
36-
"@modelcontextprotocol/sdk": "https://pkg.pr.new/geelen/typescript-sdk/@modelcontextprotocol/sdk@cdf3508",
39+
"@modelcontextprotocol/sdk": "https://pkg.pr.new/geelen/typescript-sdk/@modelcontextprotocol/sdk@877f4bf",
3740
"@types/express": "^5.0.0",
3841
"@types/node": "^22.13.10",
3942
"prettier": "^3.5.3",
4043
"tsup": "^8.4.0",
4144
"tsx": "^4.19.3",
42-
"typescript": "^5.8.2"
45+
"typescript": "^5.8.2",
46+
"vitest": "^3.2.3"
4347
},
4448
"tsup": {
4549
"entry": [
@@ -54,5 +58,12 @@
5458
"outDir": "dist",
5559
"external": []
5660
},
61+
"vitest": {
62+
"environment": "node",
63+
"globals": true,
64+
"include": [
65+
"src/**/*.test.ts"
66+
]
67+
},
5768
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977"
5869
}

0 commit comments

Comments
 (0)