Skip to content

Commit ea9b247

Browse files
authored
Add @microsoft/vscode-inproc-mcp to support inproc MCP servers in VSCode (and beyond?) (#309)
1 parent 3b7a384 commit ea9b247

32 files changed

+2829
-34
lines changed

.azure-pipelines/release-npm.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ parameters:
1010
- microsoft-vscode-processutils
1111
- microsoft-vscode-container-client
1212
- microsoft-vscode-docker-registries
13+
- microsoft-vscode-inproc-mcp
1314
- name: publishVersion
1415
displayName: Publish Version
1516
type: string

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"eslint.workingDirectories": [
66
"./packages/vscode-processutils",
77
"./packages/vscode-container-client",
8-
"./packages/vscode-docker-registries"
8+
"./packages/vscode-docker-registries",
9+
"./packages/vscode-inproc-mcp",
910
],
1011
"files.trimTrailingWhitespace": true,
1112
"files.insertFinalNewline": true,

.vscode/tasks.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,23 @@
4747
"Build+Watch: vscode-processutils",
4848
]
4949
},
50+
{
51+
"label": "Build+Watch: vscode-inproc-mcp",
52+
"type": "npm",
53+
"script": "build:esm -- --watch",
54+
"path": "packages/vscode-inproc-mcp",
55+
"group": {
56+
"kind": "build"
57+
},
58+
"isBackground": true,
59+
"presentation": {
60+
"revealProblems": "onProblem"
61+
},
62+
"problemMatcher": "$tsc-watch",
63+
"dependsOn": [
64+
"Build+Watch: vscode-processutils",
65+
]
66+
},
5067
{
5168
"label": "Build+Watch: vscode-docker-registries",
5269
"type": "npm",

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ Library support for multiple container runtimes.
77
### [vscode-docker-registries](https://github.com/microsoft/vscode-docker-extensibility/tree/main/packages/vscode-docker-registries)
88
Unified container registry provider model.
99

10+
### [vscode-inproc-mcp](https://github.com/microsoft/vscode-docker-extensibility/tree/main/packages/vscode-inproc-mcp)
11+
Support for MCP servers in-proc in the extension host process.
12+
1013
### [vscode-processutils](https://github.com/microsoft/vscode-docker-extensibility/tree/main/packages/vscode-processutils)
1114
Library support for building command lines and running external processes, primarily for use in VS Code.
1215

package-lock.json

Lines changed: 1362 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
"workspaces": [
66
"packages/vscode-processutils",
77
"packages/vscode-container-client",
8-
"packages/vscode-docker-registries"
8+
"packages/vscode-docker-registries",
9+
"packages/vscode-inproc-mcp"
910
],
1011
"scripts": {
1112
"lint": "npm run --workspaces lint",
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
/**/*.js
2+
dist
3+
node_modules
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module",
7+
"project": "tsconfig.json"
8+
},
9+
"plugins": [
10+
"@typescript-eslint"
11+
],
12+
"rules": {
13+
"@typescript-eslint/naming-convention": [ // Naming is enforced with some exceptions below
14+
"warn",
15+
{ // Names should be either camelCase or PascalCase, both are extensively used throughout this project
16+
"selector": "default",
17+
"format": [
18+
"camelCase",
19+
"PascalCase"
20+
]
21+
},
22+
{ // const variables can also have UPPER_CASE
23+
"selector": "variable",
24+
"modifiers": [
25+
"const"
26+
],
27+
"format": [
28+
"camelCase",
29+
"PascalCase",
30+
"UPPER_CASE"
31+
]
32+
},
33+
{ // private class properties can also have leading _underscores
34+
"selector": "classProperty",
35+
"modifiers": [
36+
"private"
37+
],
38+
"format": [
39+
"camelCase",
40+
"PascalCase"
41+
],
42+
"leadingUnderscore": "allow"
43+
}
44+
],
45+
"@typescript-eslint/no-floating-promises": "warn", // Floating promises are bad, should do `void thePromise()`
46+
"@typescript-eslint/no-inferrable-types": "off", // This gets upset about e.g. `const foo: string = 'bar'` because it's obvious that it's a string; it doesn't matter enough to enforce
47+
"@typescript-eslint/no-unused-vars": [ // Unused variables aren't allowed, with an exception (below)
48+
"warn",
49+
{ // As a function parameter, unused parameters are allowed
50+
"args": "none"
51+
}
52+
],
53+
"@typescript-eslint/semi": "warn", // Elevate this to warning, we like semicolons
54+
"curly": "warn", // May have been a mistake to include a `{curly}` inside a template string, you might mean `${curly}`
55+
"eqeqeq": "warn", // Should use `===`, not `==`, nearly 100% of the time
56+
"no-extra-boolean-cast": "off", // We !!flatten a lot of things into booleans this way
57+
"no-throw-literal": "warn", // Elevate this from suggestion to warning
58+
"semi": "off", // Covered by @typescript-eslint/semi
59+
"@typescript-eslint/no-restricted-imports": [
60+
"error",
61+
{
62+
"patterns": [
63+
{
64+
"group": [
65+
"express",
66+
"@modelcontextprotocol/*",
67+
"@microsoft/vscode-azext*"
68+
],
69+
"message": "Please lazily import this package within the function that uses it to reduce extension activation time.",
70+
"allowTypeImports": true
71+
}
72+
]
73+
}
74+
]
75+
},
76+
"extends": [
77+
"eslint:recommended",
78+
"plugin:@typescript-eslint/eslint-recommended",
79+
"plugin:@typescript-eslint/recommended"
80+
]
81+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
!dist
2+
dist/*/test/**
3+
node_modules/
4+
.eslint*
5+
src
6+
tsconfig.json
7+
*.tgz
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.1.0 - 15 October 2025
2+
### Initial Release
3+
* This package adds support for building MCP servers, especially in-proc in the extension host process of VSCode.

0 commit comments

Comments
 (0)