@mearl/mcp-server 2.20.0 → 2.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/configure.js CHANGED
@@ -109,7 +109,7 @@ function updateTomlMCPConfig(configPath, useNpx) {
109
109
  const sectionLines = ['[mcp_servers.mearl]', 'type = "stdio"'];
110
110
  if (useNpx) {
111
111
  sectionLines.push('command = "npx"');
112
- sectionLines.push('args = ["-y", "@mearl/mcp-server"]');
112
+ sectionLines.push(`args = ${JSON.stringify(getMCPServerConfig(false, true).args)}`);
113
113
  }
114
114
  else {
115
115
  sectionLines.push('command = "mearl-mcp-server"');
@@ -4,6 +4,7 @@
4
4
  import { join, dirname } from 'path';
5
5
  import { homedir, platform } from 'os';
6
6
  import { existsSync } from 'fs';
7
+ import { OFFICIAL_NPM_REGISTRY } from '@mearl/setup/npm-registry';
7
8
  /**
8
9
  * 获取跨平台的配置文件路径
9
10
  * @param paths 不同平台的路径配置
@@ -94,13 +95,19 @@ export function isNpxMode() {
94
95
  }
95
96
  // 获取 MCP Server 配置模板
96
97
  export function getMCPServerConfig(useServersFormat, useNpx) {
98
+ const npxArgs = [
99
+ '-y',
100
+ `--registry=${OFFICIAL_NPM_REGISTRY}`,
101
+ `--@mearl:registry=${OFFICIAL_NPM_REGISTRY}`,
102
+ '@mearl/mcp-server',
103
+ ];
97
104
  if (useServersFormat) {
98
105
  // VS Code 格式
99
106
  if (useNpx) {
100
107
  return {
101
108
  type: 'stdio',
102
109
  command: 'npx',
103
- args: ['-y', '@mearl/mcp-server'],
110
+ args: npxArgs,
104
111
  };
105
112
  }
106
113
  return {
@@ -112,7 +119,7 @@ export function getMCPServerConfig(useServersFormat, useNpx) {
112
119
  if (useNpx) {
113
120
  return {
114
121
  command: 'npx',
115
- args: ['-y', '@mearl/mcp-server'],
122
+ args: npxArgs,
116
123
  env: {},
117
124
  };
118
125
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mearl/mcp-server",
3
- "version": "2.20.0",
3
+ "version": "2.20.2",
4
4
  "description": "MCP Server for Mearl - enables AI to interact with Chrome browser requests and logs",
5
5
  "mcpName": "io.github.F-loat/mearl",
6
6
  "type": "module",
@@ -34,8 +34,9 @@
34
34
  "dependencies": {
35
35
  "commander": "^15.0.0",
36
36
  "prompts": "^2.4.2",
37
- "@mearl/client": "2.20.0",
38
- "@mearl/native-host": "2.20.0"
37
+ "@mearl/client": "2.20.2",
38
+ "@mearl/native-host": "2.20.2",
39
+ "@mearl/setup": "2.20.2"
39
40
  },
40
41
  "devDependencies": {
41
42
  "@modelcontextprotocol/sdk": "^1.0.4",