@a4hgehad/weave-mcp 0.8.4 → 0.8.6

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.
Files changed (2) hide show
  1. package/dist/index.js +32 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -98,11 +98,14 @@ var BuiltInMcpSchema = z.object({
98
98
  grep_app: z.boolean().optional()
99
99
  });
100
100
  var CustomMcpServerSchema = z.object({
101
- type: z.enum(["stdio", "http"]).optional(),
102
- command: z.string().optional(),
103
- args: z.array(z.string()).optional(),
101
+ type: z.enum(["local", "remote"]).optional(),
102
+ command: z.array(z.string()).optional(),
104
103
  url: z.string().optional(),
105
- env: z.record(z.string(), z.string()).optional()
104
+ environment: z.record(z.string(), z.string()).optional(),
105
+ enabled: z.boolean().optional(),
106
+ timeout: z.number().optional(),
107
+ headers: z.record(z.string(), z.string()).optional(),
108
+ oauth: z.union([z.record(z.string(), z.unknown()), z.literal(false)]).optional()
106
109
  });
107
110
  var McpConfigSchema = z.object({
108
111
  enabled: BuiltInMcpSchema.optional(),
@@ -241,19 +244,21 @@ function loadWeaveConfig(directory, _ctx, _homeDir) {
241
244
  // src/mcp/types.ts
242
245
  var BUILTIN_MCP_SERVERS = {
243
246
  websearch: {
244
- type: "stdio",
245
- command: "npx",
246
- args: ["-y", "@modelcontextprotocol/server-websearch"]
247
+ type: "remote",
248
+ url: "https://mcp.exa.ai/mcp?tools=web_search_exa",
249
+ enabled: true,
250
+ headers: undefined,
251
+ oauth: false
247
252
  },
248
253
  context7: {
249
- type: "stdio",
250
- command: "npx",
251
- args: ["-y", "context7-mcp-server"]
254
+ type: "remote",
255
+ url: "https://mcp.context7.com/mcp",
256
+ enabled: true
252
257
  },
253
258
  grep_app: {
254
- type: "stdio",
255
- command: "npx",
256
- args: ["-y", "grep-app-mcp"]
259
+ type: "remote",
260
+ url: "https://mcp.grep.app",
261
+ enabled: true
257
262
  }
258
263
  };
259
264
  var DEFAULT_MCPS = ["websearch", "context7", "grep_app"];
@@ -1980,7 +1985,20 @@ class ConfigHandler {
1980
1985
  const result = {};
1981
1986
  for (const [name, config] of servers) {
1982
1987
  if (!disabledSet.has(name)) {
1983
- result[name] = config;
1988
+ if (name === "websearch" && config) {
1989
+ const serverConfig = { ...config };
1990
+ const exaApiKey = process.env.EXA_API_KEY;
1991
+ if (exaApiKey) {
1992
+ serverConfig.headers = {
1993
+ ...serverConfig.headers || {},
1994
+ "x-api-key": exaApiKey
1995
+ };
1996
+ }
1997
+ serverConfig.oauth = false;
1998
+ result[name] = serverConfig;
1999
+ } else {
2000
+ result[name] = config;
2001
+ }
1984
2002
  }
1985
2003
  }
1986
2004
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a4hgehad/weave-mcp",
3
- "version": "0.8.4",
3
+ "version": "0.8.6",
4
4
  "description": "Weave-MCP — lean OpenCode plugin with multi-agent orchestration and MCP support",
5
5
  "author": "3r3bu5",
6
6
  "license": "MIT",