Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multi-client support #38

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
6702fe6
feat: add multi-client support with client and transport fields
devin-ai-integration[bot] Dec 11, 2024
811f098
feat: implement client preference storage and detection
devin-ai-integration[bot] Dec 11, 2024
6bfa65d
test: add test suite for client adapters and config manager
devin-ai-integration[bot] Dec 11, 2024
20ea0be
chore: update jest config for ES modules
devin-ai-integration[bot] Dec 11, 2024
b9f48b5
chore: remove unused jest.config.mjs
devin-ai-integration[bot] Dec 11, 2024
19d7376
chore: update typescript and jest config for ES modules
devin-ai-integration[bot] Dec 11, 2024
9287434
fix: update jest setup with proper typescript types
devin-ai-integration[bot] Dec 11, 2024
8ebec03
feat: add multi-client support to mcp-get
devin-ai-integration[bot] Dec 11, 2024
3c89def
feat: add multi-client support with client and transport fields
devin-ai-integration[bot] Dec 11, 2024
c977796
feat: implement client preference storage and detection
devin-ai-integration[bot] Dec 11, 2024
4762203
fix: consolidate Jest config and update Node.js compatibility
devin-ai-integration[bot] Dec 11, 2024
1b7bdbc
fix: consolidate Jest config and update Node.js compatibility
devin-ai-integration[bot] Dec 11, 2024
cd8f882
chore: update Node.js to 18.x and add GitHub Actions workflow
devin-ai-integration[bot] Dec 11, 2024
bccd226
refactor: update Preferences class for async operations and add tests
devin-ai-integration[bot] Dec 11, 2024
bf06619
feat: add platform-specific config path resolution for Zed
devin-ai-integration[bot] Dec 11, 2024
e46943e
fix: resolve TypeScript errors and update tests
devin-ai-integration[bot] Dec 11, 2024
70b136b
fix: resolve TypeScript errors for async operations and type definitions
devin-ai-integration[bot] Dec 11, 2024
1dbe1cd
chore: resolve merge conflicts with main branch
devin-ai-integration[bot] Dec 11, 2024
e486325
chore: resolve merge conflicts and add missing client fields
devin-ai-integration[bot] Dec 11, 2024
b806db7
refactor: remove redundant client and transport fields, simplify vali…
devin-ai-integration[bot] Dec 11, 2024
f604f98
refactor: enhance client adapters and multi-client support
devin-ai-integration[bot] Dec 11, 2024
7413cba
feat: add clients command and improve test setup
devin-ai-integration[bot] Dec 11, 2024
0bc79c1
fix: resolve TypeScript errors and update client configuration
devin-ai-integration[bot] Dec 11, 2024
d5e0b14
fix: update Zed adapter to match official configuration format
devin-ai-integration[bot] Dec 11, 2024
86c04b4
fix: update Zed adapter configuration and improve client detection
devin-ai-integration[bot] Dec 11, 2024
05f2c13
test: remove existing tests for rewrite
devin-ai-integration[bot] Dec 12, 2024
c2c48f2
chore: resolve merge conflicts with main
devin-ai-integration[bot] Dec 12, 2024
50ad532
feat: implement readConfig method in client adapters
devin-ai-integration[bot] Dec 12, 2024
423f078
test: add client adapter tests and update types
devin-ai-integration[bot] Dec 12, 2024
b55adf5
chore: remove old jest.config.js in favor of jest.config.mjs
devin-ai-integration[bot] Dec 12, 2024
a137960
chore: add jsonc-parser and @types/glob dependencies
devin-ai-integration[bot] Dec 12, 2024
513039f
chore: add typecheck script to package.json
devin-ai-integration[bot] Dec 12, 2024
b1211e3
test: fix TypeScript errors in config-manager tests
devin-ai-integration[bot] Dec 12, 2024
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
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Test

on:
pull_request:
branches: [ main ]
push:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: '18.x'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

- name: Build
run: npm run build
26 changes: 21 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,38 @@ This tool helps you install and manage MCP servers that connect Claude to variou

- Node.js (version 14 or higher) for Node.js-based MCP servers
- Python (version 3.10 or higher) for Python-based MCP servers
- Claude Desktop app (for local MCP server usage)
- At least one supported MCP client installed:
- Claude Desktop app
- Zed editor
- Continue
- Firebase Genkit

The tool automatically detects installed clients by checking their configuration files:
- Claude Desktop: `~/Library/Application Support/Claude/claude_desktop_config.json` (MacOS/Linux) or `%AppData%\Claude\claude_desktop_config.json` (Windows)
- Zed: `~/.config/zed/settings.json` (MacOS/Linux) or `%AppData%\Zed\settings.json` (Windows)
- Continue: `~/.config/continue/config.json` (MacOS/Linux) or `%AppData%\Continue\config.json` (Windows)
- Firebase: `~/.config/firebase/config.json` (MacOS/Linux) or `%AppData%\Firebase\config.json` (Windows)

> **Note**: This tool has not been thoroughly tested on Windows systems yet. While it may work, you might encounter some issues. Contributions to improve Windows compatibility are welcome!

## Usage Examples

### Install a Package

```
```bash
npx @michaellatman/mcp-get@latest install @modelcontextprotocol/server-brave-search
```

The tool will automatically detect your installed MCP clients. If multiple clients are installed, you'll be prompted to select which client(s) to configure. If only one client is installed, it will be selected automatically.

Sample output:
```
Installing @modelcontextprotocol/server-brave-search...
Installation complete.
Found installed clients: Claude Desktop, Zed
? Select clients to configure (Space to select, Enter to confirm):
❯ ◯ Claude Desktop
◯ Zed
Installation complete. Server configured for selected clients.
```

### List Packages
Expand Down Expand Up @@ -109,7 +125,7 @@ There are two ways to add your MCP server to the registry:

If you want to maintain your own package:

1. **Create Your MCP Server**:
1. **Create Your MCP Server**:
- Develop your MCP server according to the [MCP protocol specifications](https://modelcontextprotocol.io)
- Publish it as either an NPM package (installable via npm) or a Python package (installable via uvx)

Expand Down Expand Up @@ -138,7 +154,7 @@ If you want to maintain your own package:

If you don't want to manage package deployment and distribution:

1. **Fork Community Repository**:
1. **Fork Community Repository**:
- Fork [mcp-get/community-servers](https://github.com/mcp-get/community-servers)
- This repository follows the same structure as the official MCP servers

Expand Down
25 changes: 13 additions & 12 deletions jest.config.mjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
const config = {
preset: 'ts-jest/presets/default-esm',
export default {
preset: 'ts-jest',
testEnvironment: 'node',
extensionsToTreatAsEsm: ['.ts'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1',
},
roots: ['<rootDir>/src'],
testMatch: ['**/__tests__/**/*.test.ts'],
moduleFileExtensions: ['ts', 'js', 'json', 'node'],
setupFilesAfterEnv: ['<rootDir>/src/__tests__/setup.ts'],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{
useESM: true,
},
],
isolatedModules: true
}
]
},
testMatch: ['**/__tests__/**/*.test.ts'],
testPathIgnorePatterns: ['/node_modules/', '/loaders/'],
moduleNameMapper: {
'^(\\.{1,2}/.*)\\.js$': '$1'
},
extensionsToTreatAsEsm: ['.ts']
};

export default config;
27 changes: 27 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"pr-check": "node src/scripts/pr-check.js",
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.mjs --watch",
"test:coverage": "NODE_OPTIONS=--experimental-vm-modules jest --config jest.config.mjs --coverage",
"typecheck": "tsc --noEmit",
"prepare": "npm run build"
},
"bin": {
Expand All @@ -39,11 +40,13 @@
"typescript": "^4.0.0"
},
"devDependencies": {
"@types/glob": "^8.1.0",
"@types/inquirer": "^8.2.4",
"@types/inquirer-autocomplete-prompt": "^3.0.3",
"@types/jest": "^29.5.14",
"@types/node": "^14.18.63",
"jest": "^29.7.0",
"jsonc-parser": "^3.3.1",
"ts-jest": "^29.2.5",
"ts-node": "^10.9.1"
},
Expand Down
Loading
Loading