omnisearch-mcp 1.0.0 → 1.0.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.
Files changed (3) hide show
  1. package/README.md +96 -0
  2. package/dist/index.js +10 -6
  3. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,96 @@
1
+ # omnisearch-mcp
2
+
3
+ > Model Context Protocol (MCP) server for multi-provider web search retrieval, powered by [`omnisearch-sdk`](https://www.npmjs.com/package/omnisearch-sdk).
4
+
5
+ Give Claude Desktop, Cursor, and MCP-compatible AI agent runtimes real-time search across 15+ search providers (Brave, Google, Bing, DuckDuckGo, Tavily, Perplexity, PubMed, Arxiv, GitHub, and more) with automatic fallback and canonical deduplication.
6
+
7
+ ---
8
+
9
+ ## ⚡ Quick Setup
10
+
11
+ ### 1. Claude Desktop Setup
12
+
13
+ Add to your `claude_desktop_config.json`:
14
+
15
+ * **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`
16
+ * **Windows:** `%APPDATA%\Claude\claude_desktop_config.json`
17
+
18
+ ```json
19
+ {
20
+ "mcpServers": {
21
+ "omnisearch": {
22
+ "command": "npx",
23
+ "args": ["-y", "omnisearch-mcp"],
24
+ "env": {
25
+ "BRAVE_API_KEY": "YOUR_BRAVE_API_KEY",
26
+ "TAVILY_API_KEY": "YOUR_TAVILY_API_KEY"
27
+ }
28
+ }
29
+ }
30
+ }
31
+ ```
32
+
33
+ > **Note:** If no API keys are provided in `env`, the server automatically defaults to zero-config public providers (DuckDuckGo, PubMed, Arxiv, Semantic Scholar). If you run the server locally, it also automatically loads any `.env` file present in your current working directory.
34
+
35
+ ---
36
+
37
+ ### 2. Cursor IDE Setup
38
+
39
+ In Cursor Settings -> **Features** -> **MCP Servers** -> **Add New MCP Server**:
40
+
41
+ * **Name:** `omnisearch`
42
+ * **Type:** `command`
43
+ * **Command:** `npx -y omnisearch-mcp`
44
+
45
+ ---
46
+
47
+ ## 🛠 Available MCP Tools
48
+
49
+ The server automatically registers two tools:
50
+
51
+ ### `web_search`
52
+ Search the live web across multiple engines with automatic multi-provider fallback, canonical deduplication, and domain filtering.
53
+
54
+ | Argument | Type | Description |
55
+ | :--- | :--- | :--- |
56
+ | `query` | `string` | The search query string (**required**). |
57
+ | `maxResults` | `number` | Maximum number of results to return (default: `10`). |
58
+ | `freshness` | `string` | Recency filter: `'day'`, `'week'`, `'month'`, `'year'`. |
59
+ | `includeDomains` | `string[]` | Whitelist specific domains (e.g. `["github.com", "arxiv.org"]`). |
60
+ | `excludeDomains` | `string[]` | Blacklist specific domains (e.g. `["pinterest.com"]`). |
61
+ | `deduplicate` | `boolean` | Enable intelligent canonical URL deduplication (default: `true`). |
62
+
63
+ ### `news_search`
64
+ Search breaking news and recent journalistic coverage across supported news providers.
65
+
66
+ | Argument | Type | Description |
67
+ | :--- | :--- | :--- |
68
+ | `query` | `string` | The news query string (**required**). |
69
+ | `maxResults` | `number` | Maximum number of results to return (default: `10`). |
70
+ | `freshness` | `string` | Recency filter: `'day'`, `'week'`, `'month'` (default: `'week'`). |
71
+
72
+ ---
73
+
74
+ ## 🌐 Supported Provider Environment Variables
75
+
76
+ Configure any combination of API keys:
77
+
78
+ * `BRAVE_API_KEY` - Brave Search API
79
+ * `TAVILY_API_KEY` - Tavily Search API
80
+ * `GOOGLE_API_KEY` & `GOOGLE_CX` - Google Custom Search API
81
+ * `BING_API_KEY` - Azure Bing Search API
82
+ * `YOU_API_KEY` - You.com Search API
83
+ * `EXA_API_KEY` - Exa Neural Search API
84
+ * `PERPLEXITY_API_KEY` - Perplexity Search API
85
+ * `PARALLEL_API_KEY` - Parallel Search API
86
+ * `SERPAPI_KEY` (or `SERPAPI_API_KEY`) - SerpAPI
87
+ * `SEARXNG_URL` (or `SEARXNG_BASE_URL`) - Self-hosted SearXNG endpoint
88
+ * `GITHUB_TOKEN` - GitHub API Token (optional, raises rate limits)
89
+ * `SEMANTIC_SCHOLAR_API_KEY` - Semantic Scholar API Key (optional)
90
+ * `PUBMED_API_KEY` - PubMed / NCBI API Key (optional)
91
+
92
+ ---
93
+
94
+ ## 📄 License
95
+
96
+ MIT © [OmniSearch SDK Contributors](https://github.com/gbks121/omnisearch-sdk)
package/dist/index.js CHANGED
@@ -22,6 +22,10 @@ import {
22
22
  createYouProvider,
23
23
  webSearch
24
24
  } from "omnisearch-sdk";
25
+ try {
26
+ process.loadEnvFile();
27
+ } catch {
28
+ }
25
29
  function getActiveProviders() {
26
30
  const env = process.env;
27
31
  const providers = [];
@@ -51,16 +55,16 @@ function getActiveProviders() {
51
55
  if (env.PARALLEL_API_KEY) {
52
56
  providers.push(createParallelProvider({ apiKey: env.PARALLEL_API_KEY }));
53
57
  }
54
- if (env.SERPAPI_API_KEY) {
55
- providers.push(createSerpApiProvider({ apiKey: env.SERPAPI_API_KEY }));
58
+ if (env.SERPAPI_KEY || env.SERPAPI_API_KEY) {
59
+ providers.push(createSerpApiProvider({ apiKey: env.SERPAPI_KEY || env.SERPAPI_API_KEY }));
56
60
  }
57
- if (env.SEARXNG_BASE_URL) {
58
- providers.push(createSearXNGProvider({ baseUrl: env.SEARXNG_BASE_URL }));
61
+ if (env.SEARXNG_URL || env.SEARXNG_BASE_URL) {
62
+ providers.push(createSearXNGProvider({ baseUrl: env.SEARXNG_URL || env.SEARXNG_BASE_URL }));
59
63
  }
60
64
  providers.push(createDuckDuckGoProvider());
61
- providers.push(createPubMedProvider());
65
+ providers.push(createPubMedProvider({ apiKey: env.PUBMED_API_KEY }));
62
66
  providers.push(createArxivProvider());
63
- providers.push(createSemanticScholarProvider());
67
+ providers.push(createSemanticScholarProvider({ apiKey: env.SEMANTIC_SCHOLAR_API_KEY }));
64
68
  providers.push(createGitHubProvider({ apiKey: env.GITHUB_TOKEN || env.GITHUB_API_KEY }));
65
69
  return providers;
66
70
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnisearch-mcp",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Model Context Protocol server for OmniSearch SDK",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "dependencies": {
17
17
  "@modelcontextprotocol/sdk": "^1.6.1",
18
- "omnisearch-sdk": "5.0.1"
18
+ "omnisearch-sdk": "5.1.0"
19
19
  },
20
20
  "devDependencies": {
21
21
  "tsup": "^8.5.1",