desearch-mcp-server 0.4.0 → 0.5.0
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/CHANGELOG.md +2 -0
- package/README.md +1 -1
- package/build/server.d.ts +2 -2
- package/build/server.d.ts.map +1 -1
- package/build/server.js +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- `extract` and `web-crawl` accept `format: "markdown"` (headings, lists, tables and code). `full_page` is described as `text`-only.
|
|
6
|
+
|
|
5
7
|
- `extract` and `web-crawl` take `full_page` (boolean). With `format: "text"` it returns all visible text of the page, every section, table and notice, instead of only the main content. The `extract` description says what the `js_required` and `blocked` errors mean.
|
|
6
8
|
|
|
7
9
|
- Server icon for connector UIs such as the ChatGPT mention chip. The `initialize` result `serverInfo` now has `title` ("Desearch"), `websiteUrl` (https://www.desearch.ai), and `icons`: `https://mcp.desearch.ai/icon-512.png` (512x512) and `https://mcp.desearch.ai/icon-64.png` (64x64), both `image/png`. The `MCP_PUBLIC_BASE_URL` environment variable changes the icon origin. `/icon-512.png`, `/icon-64.png`, `/favicon.png` (64x64), and `/favicon.ico` (16, 32, 48, 64) are served with no auth, `Cache-Control: public, max-age=86400`, `Access-Control-Allow-Origin: *`, and `Cross-Origin-Resource-Policy: cross-origin`. On Vercel they are static files in `public/`, served before any rewrite, with those headers and an explicit `Content-Type` set in `vercel.json`. The Node HTTP server (`npm run start:http`) serves the same bytes from `icons-data.ts` on GET and HEAD; other methods return 405. The icon matches the logo in the www.desearch.ai site header: the official Desearch glyph in black (`#000000`) centered on an opaque white (`#FFFFFF`) square, as the header renders it with CSS `brightness-0` on its white bar. Only the square glyph is used, since the header wordmark is wide. `scripts/gen-icons.py` composes each size separately with Pillow from `assets/desearch-mark-white.png` (byte-identical to https://www.desearch.ai/logo.png), recolors the glyph to black from its alpha channel, and only ever downscales it, writes them to `public/`, and embeds the same bytes in `icons-data.ts`.
|
package/README.md
CHANGED
|
@@ -65,7 +65,7 @@ Lookup tools, including `search` and `fetch`, set `readOnlyHint: true`, `destruc
|
|
|
65
65
|
- **Fetch Page** (`fetch`): Read a public page as text. Argument: `id` (required, an `http` or `https` URL from `search`).
|
|
66
66
|
- **Web Search** (`web-search`): SERP-style web search. Arguments: `query` (required), `start` (optional pagination offset).
|
|
67
67
|
- **Web Links Search** (`web-links-search`): Web link search. Arguments: `prompt` (required), `tools` (optional, only `web`, default `["web"]`; `Web Search` is accepted and rewritten to `web`), `count` (optional, 10–200). The links/web API rejects other sources, so they are not in the enum.
|
|
68
|
-
- **Extract** (`extract`): Read a public URL as text or HTML. Preferred over crawl. Arguments: `url` (required), `format` (optional, `
|
|
68
|
+
- **Extract** (`extract`): Read a public URL as text or HTML. Preferred over crawl. Arguments: `url` (required), `format` (optional, `text`, `markdown` or `html`), `js` (optional), `wait` (optional milliseconds), `full_page` (optional, `text` only: every visible section of the page instead of its main content). Errors carry an `error_code`: `js_required` (retry with `js: true`), `blocked` (the site refused or showed a bot check), `page_not_found`.
|
|
69
69
|
- **Web Crawl** (`web-crawl`): Same arguments as `extract`, on the legacy `/web/crawl` route. The SDK marks `webCrawl` deprecated in favor of `extract`; this tool stays so that route remains reachable. Prefer `extract` for new integrations.
|
|
70
70
|
- **X Links Search** (`x-links-search`): AI search for X post links. Arguments: `prompt` (required), `count` (optional, 10–200).
|
|
71
71
|
- **X Posts By URLs** (`x-posts-by-urls`): Full posts for a list of URLs. Argument: `urls` (required).
|
package/build/server.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
2
2
|
import { type Icon } from "@modelcontextprotocol/sdk/types.js";
|
|
3
3
|
import { type PeopleClient } from "./people.js";
|
|
4
4
|
export declare const SERVER_NAME = "Desearch";
|
|
5
|
-
export declare const SERVER_VERSION = "0.
|
|
5
|
+
export declare const SERVER_VERSION = "0.5.0";
|
|
6
6
|
export declare const SERVER_TITLE = "Desearch";
|
|
7
7
|
export declare const SERVER_WEBSITE_URL = "https://www.desearch.ai";
|
|
8
8
|
export declare const MCP_PUBLIC_BASE_URL: string;
|
|
@@ -26,7 +26,7 @@ interface XSearchPayload {
|
|
|
26
26
|
}
|
|
27
27
|
interface PageContentPayload {
|
|
28
28
|
url: string;
|
|
29
|
-
format?: "html" | "text";
|
|
29
|
+
format?: "html" | "text" | "markdown";
|
|
30
30
|
js?: boolean;
|
|
31
31
|
wait?: number;
|
|
32
32
|
full_page?: boolean;
|
package/build/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../server.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAKH,KAAK,IAAI,EAEZ,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAgBH,KAAK,YAAY,EACpB,MAAM,aAAa,CAAC;AAGrB,eAAO,MAAM,WAAW,aAAa,CAAC;AACtC,eAAO,MAAM,cAAc,UAAU,CAAC;AACtC,eAAO,MAAM,YAAY,aAAa,CAAC;AACvC,eAAO,MAAM,kBAAkB,4BAA4B,CAAC;AAG5D,eAAO,MAAM,mBAAmB,QAA6F,CAAC;AAE9H,eAAO,MAAM,YAAY,EAAE,IAAI,EAG9B,CAAC;AAEF,UAAU,cAAc;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,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GAAG,OAAO,CAYzD;AAgJD;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,MAAM,EACd,MAAM,CAAC,EAAE,cAAc,EACvB,YAAY,CAAC,EAAE,YAAY,GAC5B,SAAS,CA61BX"}
|
package/build/server.js
CHANGED
|
@@ -5,7 +5,7 @@ import { z } from "zod";
|
|
|
5
5
|
import { PEOPLE_FILTER_CHANNELS, PEOPLE_METADATA_KEY_PATTERN, PEOPLE_METADATA_MAX_FILTERS, PEOPLE_METADATA_MAX_KEYS, PEOPLE_METADATA_VALUE_MAX, PEOPLE_PLATFORMS, PEOPLE_PROFILE_SORTS, PEOPLE_SEARCH_FILTERS, PEOPLE_TASK_STATUSES, controlPeopleTask, createPeopleClient, listPeopleProfiles, listPeopleTasks, readPeopleStatus, startPeopleSearch, } from "./people.js";
|
|
6
6
|
import { AI_SEARCH_TOOLS, WEB_LINK_TOOLS, toolIdSchema } from "./tool-sources.js";
|
|
7
7
|
export const SERVER_NAME = "Desearch";
|
|
8
|
-
export const SERVER_VERSION = "0.
|
|
8
|
+
export const SERVER_VERSION = "0.5.0";
|
|
9
9
|
export const SERVER_TITLE = "Desearch";
|
|
10
10
|
export const SERVER_WEBSITE_URL = "https://www.desearch.ai";
|
|
11
11
|
// Public origin of the hosted server, which serves the icons below.
|
|
@@ -86,9 +86,9 @@ function pageContentFields() {
|
|
|
86
86
|
return {
|
|
87
87
|
url: z.string().describe("Public URL to read, example: 'https://desearch.ai'"),
|
|
88
88
|
format: z
|
|
89
|
-
.enum(["html", "text"])
|
|
89
|
+
.enum(["html", "text", "markdown"])
|
|
90
90
|
.optional()
|
|
91
|
-
.describe("Content format to return: '
|
|
91
|
+
.describe("Content format to return: 'text' (default), 'markdown' (headings, lists, tables and code) or 'html'."),
|
|
92
92
|
js: z.boolean().optional().describe("Render JavaScript before reading the page."),
|
|
93
93
|
wait: z
|
|
94
94
|
.number()
|
|
@@ -97,7 +97,7 @@ function pageContentFields() {
|
|
|
97
97
|
full_page: z
|
|
98
98
|
.boolean()
|
|
99
99
|
.optional()
|
|
100
|
-
.describe("
|
|
100
|
+
.describe("Only with format 'text': return all visible text of the page (every section, table and notice) instead of only its main content."),
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
const peopleTaskId = z
|
|
@@ -642,7 +642,7 @@ export function createDesearchMcpServer(apiKey, client, peopleClient) {
|
|
|
642
642
|
return fail("X Post Replies error", error);
|
|
643
643
|
}
|
|
644
644
|
});
|
|
645
|
-
registerTool(server, apiKey, "extract", "Extract Page Content", "Extract a public URL and return its content as plain text or HTML using Desearch. Text is the page's main content; set full_page for every section, such as opening hours or fee tables. A js_required error means the page needs js: true; blocked means the site refused or showed a bot check. Preferred over web-crawl for new integrations. API docs: https://www.desearch.ai/docs/api-reference/get-web-extract", pageContentFields(), async ({ url, format, js, wait, full_page }) => {
|
|
645
|
+
registerTool(server, apiKey, "extract", "Extract Page Content", "Extract a public URL and return its content as plain text, markdown or HTML using Desearch. Markdown keeps headings, lists and tables. Text is the page's main content; set full_page for every section, such as opening hours or fee tables. A js_required error means the page needs js: true; blocked means the site refused or showed a bot check. Preferred over web-crawl for new integrations. API docs: https://www.desearch.ai/docs/api-reference/get-web-extract", pageContentFields(), async ({ url, format, js, wait, full_page }) => {
|
|
646
646
|
try {
|
|
647
647
|
return ok(await desearch.extract({ url, format, js, wait, full_page }));
|
|
648
648
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "desearch-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"mcpName": "io.github.Desearch-ai/mcp-desearch",
|
|
5
5
|
"description": "AI search (web, Reddit, Hacker News, arXiv, Wikipedia, and Twitter), X (Twitter) search, web search, page extraction, X data, and People Search (find people and creators on X, YouTube, LinkedIn, and TikTok) tools for AI agents.",
|
|
6
6
|
"license": "MIT",
|