desearch-mcp-server 0.1.4 → 0.2.1

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 (48) hide show
  1. package/CHANGELOG.md +40 -1
  2. package/README.md +209 -6
  3. package/build/http.d.ts +2 -8
  4. package/build/http.d.ts.map +1 -1
  5. package/build/http.js +126 -37
  6. package/build/oauth/client-ip.d.ts +10 -0
  7. package/build/oauth/client-ip.d.ts.map +1 -0
  8. package/build/oauth/client-ip.js +28 -0
  9. package/build/oauth/crypto.d.ts +20 -0
  10. package/build/oauth/crypto.d.ts.map +1 -0
  11. package/build/oauth/crypto.js +89 -0
  12. package/build/oauth/errors.d.ts +9 -0
  13. package/build/oauth/errors.d.ts.map +1 -0
  14. package/build/oauth/errors.js +13 -0
  15. package/build/oauth/flow.d.ts +8 -0
  16. package/build/oauth/flow.d.ts.map +1 -0
  17. package/build/oauth/flow.js +424 -0
  18. package/build/oauth/http.d.ts +24 -0
  19. package/build/oauth/http.d.ts.map +1 -0
  20. package/build/oauth/http.js +137 -0
  21. package/build/oauth/metadata.d.ts +19 -0
  22. package/build/oauth/metadata.d.ts.map +1 -0
  23. package/build/oauth/metadata.js +86 -0
  24. package/build/oauth/page.d.ts +14 -0
  25. package/build/oauth/page.d.ts.map +1 -0
  26. package/build/oauth/page.js +92 -0
  27. package/build/oauth/rate-limit.d.ts +14 -0
  28. package/build/oauth/rate-limit.d.ts.map +1 -0
  29. package/build/oauth/rate-limit.js +19 -0
  30. package/build/oauth/redirects.d.ts +14 -0
  31. package/build/oauth/redirects.d.ts.map +1 -0
  32. package/build/oauth/redirects.js +78 -0
  33. package/build/oauth/store.d.ts +139 -0
  34. package/build/oauth/store.d.ts.map +1 -0
  35. package/build/oauth/store.js +606 -0
  36. package/build/oauth/validate-key.d.ts +21 -0
  37. package/build/oauth/validate-key.d.ts.map +1 -0
  38. package/build/oauth/validate-key.js +61 -0
  39. package/build/people.d.ts +125 -0
  40. package/build/people.d.ts.map +1 -0
  41. package/build/people.js +402 -0
  42. package/build/request-key.d.ts +9 -0
  43. package/build/request-key.d.ts.map +1 -0
  44. package/build/request-key.js +24 -0
  45. package/build/server.d.ts +5 -4
  46. package/build/server.d.ts.map +1 -1
  47. package/build/server.js +404 -9
  48. package/package.json +32 -9
package/build/server.js CHANGED
@@ -1,16 +1,17 @@
1
1
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
- import { ListPromptsRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
2
+ import { ListPromptsRequestSchema, ListResourcesRequestSchema, ListResourceTemplatesRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
3
3
  import DesearchImport from "desearch-js";
4
4
  import { z } from "zod";
5
+ import { PEOPLE_CONTROL_ACTIONS, PEOPLE_FILTER_CHANNELS, PEOPLE_PLATFORMS, PEOPLE_PROFILE_SORTS, PEOPLE_SEARCH_FILTERS, PEOPLE_TASK_STATUSES, controlPeopleTask, createPeopleClient, listPeopleProfiles, listPeopleTasks, readPeopleStatus, startPeopleSearch, } from "./people.js";
5
6
  import { AI_SEARCH_TOOLS, WEB_LINK_TOOLS, toolIdSchema } from "./tool-sources.js";
6
7
  export const SERVER_NAME = "Desearch";
7
- export const SERVER_VERSION = "0.1.4";
8
+ export const SERVER_VERSION = "0.2.1";
8
9
  // desearch-js 1.5 publishes a default class. Node16 resolution types that package
9
10
  // as a module namespace, so the constructor is applied through a cast.
10
11
  const Desearch = DesearchImport;
11
12
  /**
12
- * Every tool reads live Desearch, web, or X data and returns it. None of them
13
- * write caller state. Hints only: clients must not treat them as a safety check.
13
+ * The search and X/web tools read live Desearch, web, or X data and return it.
14
+ * They do not write caller state. Hints only: clients must not treat them as a safety check.
14
15
  * destructiveHint is false so a client that ignores the readOnlyHint gate does
15
16
  * not treat a search as a destructive update (the MCP default for that hint is true).
16
17
  */
@@ -19,6 +20,26 @@ const READ_ONLY_OPEN_WORLD = {
19
20
  destructiveHint: false,
20
21
  openWorldHint: true,
21
22
  };
23
+ /**
24
+ * `people-search` creates a billed background task. Calling it again starts
25
+ * (and reserves) another search unless the same idempotency_key is sent.
26
+ */
27
+ const BILLED_TASK = {
28
+ readOnlyHint: false,
29
+ destructiveHint: false,
30
+ idempotentHint: false,
31
+ openWorldHint: true,
32
+ };
33
+ /**
34
+ * `people-search-control` changes a task's state. `cancel` cannot be undone.
35
+ * Repeating the same action has no further effect (the API answers 409).
36
+ */
37
+ const TASK_CONTROL = {
38
+ readOnlyHint: false,
39
+ destructiveHint: true,
40
+ idempotentHint: true,
41
+ openWorldHint: true,
42
+ };
22
43
  const optionalPostCount = z
23
44
  .number()
24
45
  .int()
@@ -47,6 +68,30 @@ function pageContentFields() {
47
68
  .describe("Post-load wait in milliseconds when JavaScript rendering is enabled."),
48
69
  };
49
70
  }
71
+ const peopleTaskId = z
72
+ .string()
73
+ .uuid()
74
+ .describe("task_id returned by people-search, example: '3f1c2b9e-8d4a-4c1e-9b7a-2e5f6a7b8c9d'");
75
+ const peoplePlatform = z
76
+ .enum(PEOPLE_PLATFORMS)
77
+ .describe("Platform: 'x', 'youtube', 'linkedin', or 'tiktok'.");
78
+ /**
79
+ * People tools reject unknown arguments instead of dropping them. A dropped
80
+ * filter (for example the API's nested `filters` object) would still run, and
81
+ * bill, a search without it.
82
+ */
83
+ function strictArgs(shape) {
84
+ return z.object(shape).strict();
85
+ }
86
+ // A new schema per field: one shared instance would serialize as a JSON Schema $ref.
87
+ function peopleKeywordList() {
88
+ return z.array(z.string().min(1).max(120)).max(20);
89
+ }
90
+ function platformFilterList() {
91
+ return Object.entries(PEOPLE_SEARCH_FILTERS)
92
+ .map(([platform, filters]) => `${platform}: ${filters.join(", ")}`)
93
+ .join(". ");
94
+ }
50
95
  const engagementThreshold = z
51
96
  .union([z.number().int().min(0), z.string()])
52
97
  .optional();
@@ -125,6 +170,78 @@ function ok(value) {
125
170
  content: [{ type: "text", text: JSON.stringify(value, null, 2) }],
126
171
  };
127
172
  }
173
+ function structured(value) {
174
+ return {
175
+ content: [{ type: "text", text: JSON.stringify(value) }],
176
+ structuredContent: value,
177
+ };
178
+ }
179
+ const WEB_RESULT_KEYS = ["data", "organic", "results", "search_results", "items", "search"];
180
+ function firstString(record, keys) {
181
+ for (const key of keys) {
182
+ const value = record[key];
183
+ if (typeof value === "string" && value.trim()) {
184
+ return value.trim();
185
+ }
186
+ }
187
+ return "";
188
+ }
189
+ function searchResultsFrom(value) {
190
+ const rows = [];
191
+ if (Array.isArray(value)) {
192
+ rows.push(...value);
193
+ }
194
+ else if (value && typeof value === "object") {
195
+ const record = value;
196
+ for (const key of WEB_RESULT_KEYS) {
197
+ const entry = record[key];
198
+ if (Array.isArray(entry)) {
199
+ rows.push(...entry);
200
+ }
201
+ }
202
+ }
203
+ const out = [];
204
+ const seen = new Set();
205
+ for (const row of rows) {
206
+ if (!row || typeof row !== "object") {
207
+ continue;
208
+ }
209
+ const record = row;
210
+ const url = firstString(record, ["link", "url", "href"]);
211
+ if (!/^https?:\/\//i.test(url) || seen.has(url)) {
212
+ continue;
213
+ }
214
+ seen.add(url);
215
+ out.push({
216
+ id: url,
217
+ title: firstString(record, ["title", "name"]) || url,
218
+ url,
219
+ });
220
+ }
221
+ return out;
222
+ }
223
+ function pageText(value) {
224
+ if (typeof value === "string") {
225
+ return value;
226
+ }
227
+ if (value && typeof value === "object") {
228
+ const text = firstString(value, ["text", "content", "markdown", "body"]);
229
+ if (text) {
230
+ return text;
231
+ }
232
+ }
233
+ return JSON.stringify(value ?? "");
234
+ }
235
+ function titleFromUrl(url) {
236
+ try {
237
+ const parsed = new URL(url);
238
+ const last = parsed.pathname.split("/").filter(Boolean).pop();
239
+ return last ? decodeURIComponent(last) : parsed.hostname;
240
+ }
241
+ catch {
242
+ return url;
243
+ }
244
+ }
128
245
  function fail(label, error) {
129
246
  return {
130
247
  content: [
@@ -136,7 +253,7 @@ function fail(label, error) {
136
253
  isError: true,
137
254
  };
138
255
  }
139
- function registerTool(server, apiKey, name, title, description, inputSchema, handler) {
256
+ function registerTool(server, apiKey, name, title, description, inputSchema, handler, outputSchema, annotations = READ_ONLY_OPEN_WORLD) {
140
257
  // SDK 1.30's tool generics blow the TypeScript instantiation limit on these
141
258
  // schemas. Runtime registration is the same registerTool call.
142
259
  const register = server.registerTool.bind(server);
@@ -150,21 +267,25 @@ function registerTool(server, apiKey, name, title, description, inputSchema, han
150
267
  title,
151
268
  description,
152
269
  inputSchema,
153
- annotations: { ...READ_ONLY_OPEN_WORLD, title },
270
+ ...(outputSchema ? { outputSchema } : {}),
271
+ annotations: { ...annotations, title },
154
272
  }, guarded);
155
273
  }
156
274
  /**
157
275
  * One MCP server bound to a single Desearch API key.
158
276
  * Stdio uses the process env key. Remote HTTP builds a new server per request
159
277
  * so each caller spends their own key.
160
- * `client` is a test seam. Production callers omit it and the server builds
161
- * a desearch-js client from `apiKey`.
278
+ * `client` and `peopleClient` are test seams. Production callers omit them and the
279
+ * server builds a desearch-js client and a People Search client (people.ts) from `apiKey`.
162
280
  */
163
- export function createDesearchMcpServer(apiKey, client) {
281
+ export function createDesearchMcpServer(apiKey, client, peopleClient) {
164
282
  const desearch = client ?? new Desearch(apiKey);
283
+ const people = peopleClient ?? createPeopleClient(apiKey);
165
284
  const server = new McpServer({
166
285
  name: SERVER_NAME,
167
286
  version: SERVER_VERSION,
287
+ }, {
288
+ instructions: "Search the public web and X with Desearch. Use search for titles and links, then fetch with a result URL to read the page. Other tools cover AI search, X posts, and page extraction. People Search finds people and creators on X, YouTube, LinkedIn, and TikTok: people-search starts a billed search, people-search-status reads progress, and people-search-control can pause, resume, or cancel it. Calls need a Desearch API key.",
168
289
  });
169
290
  registerTool(server, apiKey, "ai-search", "AI Search", "AI search and analysis on web using Desearch AI", {
170
291
  prompt: z.string().describe("Question, example: 'What is the latest news on AI?'"),
@@ -455,6 +576,252 @@ export function createDesearchMcpServer(apiKey, client) {
455
576
  return fail("X Trends error", error);
456
577
  }
457
578
  });
579
+ registerTool(server, apiKey, "search", "Search", "Search the public web and return titles and links. Use fetch with a result URL to read the page.", {
580
+ query: z.string().describe("Search query."),
581
+ }, async ({ query }) => {
582
+ try {
583
+ const results = searchResultsFrom(await desearch.webSearch({ query }));
584
+ return structured({ results });
585
+ }
586
+ catch (error) {
587
+ return fail("Search error", error);
588
+ }
589
+ }, {
590
+ results: z.array(z.object({
591
+ id: z.string(),
592
+ title: z.string(),
593
+ url: z.string(),
594
+ })),
595
+ });
596
+ registerTool(server, apiKey, "fetch", "Fetch Page", "Read a public page as text. Pass a URL returned by search.", {
597
+ id: z.string().describe("URL of the page to read."),
598
+ }, async ({ id }) => {
599
+ if (typeof id !== "string" || !/^https?:\/\//i.test(id)) {
600
+ return fail("Fetch error", new Error("id must be an http or https URL from search."));
601
+ }
602
+ try {
603
+ const text = pageText(await desearch.extract({ url: id, format: "text" }));
604
+ return structured({
605
+ id,
606
+ title: titleFromUrl(id),
607
+ text,
608
+ url: id,
609
+ metadata: { source: "desearch" },
610
+ });
611
+ }
612
+ catch (error) {
613
+ return fail("Fetch error", error);
614
+ }
615
+ }, {
616
+ id: z.string(),
617
+ title: z.string(),
618
+ text: z.string(),
619
+ url: z.string(),
620
+ metadata: z.record(z.string(), z.string()).optional(),
621
+ });
622
+ registerTool(server, apiKey, "people-search", "People Search", "Start a People Search: find people on X, YouTube, LinkedIn, or TikTok who match a plain-language description. Each person comes back with a fit score, why they matched, their audience, and public contacts and links. Billed and asynchronous: this call reserves count times the platform's per-person price (reserved_cost_usd) and returns a task_id at once. When the search ends you pay only for the people it delivered (a per-search minimum applies when it finds anyone; a search that finds no one is free) and the rest of the reservation is returned. The search runs in the background, usually for 1 to 5 minutes: poll people-search-status with the task_id to read progress and the people found so far, and use people-search-control to pause, resume, or cancel it. Do not start the same search twice; send idempotency_key so a retry returns the first task instead of charging again. Filters depend on the platform. " +
623
+ platformFilterList() +
624
+ ".", strictArgs({
625
+ platform: peoplePlatform.describe("Where to look: 'x' (X profiles), 'youtube' (YouTube creators), 'linkedin' (LinkedIn members), or 'tiktok' (TikTok creators)."),
626
+ query: z
627
+ .string()
628
+ .min(3)
629
+ .max(1000)
630
+ .describe("Who you are looking for, in plain language, example: 'Skincare creators who review sunscreen'."),
631
+ count: z
632
+ .number()
633
+ .int()
634
+ .min(5)
635
+ .max(200)
636
+ .optional()
637
+ .describe("How many qualified people to find (5-200, API default 25). The search reserves this many and bills only the people it delivers."),
638
+ min_score: z
639
+ .number()
640
+ .int()
641
+ .min(0)
642
+ .max(100)
643
+ .optional()
644
+ .describe("Only return people with at least this fit score (0-100)."),
645
+ exclude: z
646
+ .array(z.string().min(1))
647
+ .max(1000)
648
+ .optional()
649
+ .describe("Handles to leave out, for example people you already contacted."),
650
+ idempotency_key: z
651
+ .string()
652
+ .min(1)
653
+ .max(200)
654
+ .optional()
655
+ .describe("Any unique string for this search, for example a UUID. Sending the same key again returns the first task and is not charged again."),
656
+ min_followers: z
657
+ .number()
658
+ .int()
659
+ .min(0)
660
+ .optional()
661
+ .describe("Minimum follower count. x, linkedin, tiktok."),
662
+ max_followers: z
663
+ .number()
664
+ .int()
665
+ .min(0)
666
+ .optional()
667
+ .describe("Maximum follower count. x, linkedin, tiktok."),
668
+ min_subscribers: z
669
+ .number()
670
+ .int()
671
+ .min(0)
672
+ .optional()
673
+ .describe("Minimum subscriber count. youtube only."),
674
+ max_subscribers: z
675
+ .number()
676
+ .int()
677
+ .min(0)
678
+ .optional()
679
+ .describe("Maximum subscriber count. youtube only."),
680
+ verified_only: z
681
+ .boolean()
682
+ .optional()
683
+ .describe("Only verified or X Premium accounts. x only."),
684
+ require_contact: z
685
+ .boolean()
686
+ .optional()
687
+ .describe("Only creators with a public email (tiktok: in the bio; youtube: an email or contact link). youtube, tiktok."),
688
+ countries: peopleKeywordList()
689
+ .optional()
690
+ .describe("Countries to prefer, example: ['US', 'GB']. x, youtube, linkedin."),
691
+ keywords: peopleKeywordList()
692
+ .optional()
693
+ .describe("Words that should appear in their posts, videos, or bio. All platforms."),
694
+ exclude_keywords: peopleKeywordList()
695
+ .optional()
696
+ .describe("Leave out people who mention these words. All platforms."),
697
+ }), async (args) => {
698
+ try {
699
+ return ok(await startPeopleSearch(people, args));
700
+ }
701
+ catch (error) {
702
+ return fail("People Search error", error);
703
+ }
704
+ }, undefined, BILLED_TASK);
705
+ registerTool(server, apiKey, "people-search-status", "Get People Search Status", "Status, progress, and cost of one People Search task, plus a page of the people found so far: name, handle, url, platform, audience, location, fit score, why they matched, contacts, and links. Free. People arrive while the search runs: pass the returned next_cursor as cursor on the next call to get only the people found since then. When done is true and has_more is false you have everyone the search found.", strictArgs({
706
+ task_id: peopleTaskId,
707
+ cursor: z
708
+ .string()
709
+ .max(64)
710
+ .optional()
711
+ .describe("next_cursor from the previous people-search-status call. Omit to start from the first person."),
712
+ limit: z
713
+ .number()
714
+ .int()
715
+ .min(1)
716
+ .max(100)
717
+ .default(25)
718
+ .describe("People per page (1-100, default 25)."),
719
+ include_people: z
720
+ .boolean()
721
+ .default(true)
722
+ .describe("Set false to read only the status, progress, and cost."),
723
+ }), async (args) => {
724
+ try {
725
+ return ok(await readPeopleStatus(people, args));
726
+ }
727
+ catch (error) {
728
+ return fail("People Search Status error", error);
729
+ }
730
+ });
731
+ registerTool(server, apiKey, "people-search-control", "Control People Search", "Pause, resume, or cancel a People Search task. Free. pause: a queued search pauses at once; a running one finishes its current batch first (status pausing, then paused). A search paused for more than 7 days is cancelled. resume: continues a paused search where it stopped, with no new charge. cancel: stops the search for good; you pay only for the people it already delivered and the rest of the reservation is returned. People found so far stay readable for 30 days.", strictArgs({
732
+ task_id: peopleTaskId,
733
+ action: z
734
+ .enum(PEOPLE_CONTROL_ACTIONS)
735
+ .describe("'pause', 'resume', or 'cancel'. cancel cannot be undone."),
736
+ }), async (args) => {
737
+ try {
738
+ return ok(await controlPeopleTask(people, args));
739
+ }
740
+ catch (error) {
741
+ return fail("People Search Control error", error);
742
+ }
743
+ }, undefined, TASK_CONTROL);
744
+ registerTool(server, apiKey, "people-search-tasks", "List People Search Tasks", "Your People Search tasks, newest first, with status, counts, and cost. Free. Use it to find a task_id, or to see which searches are still queued, running, or paused: a new search is refused while too many are active.", strictArgs({
745
+ platform: peoplePlatform.optional().describe("Only tasks on this platform: 'x', 'youtube', 'linkedin', or 'tiktok'."),
746
+ status: z
747
+ .array(z.enum(PEOPLE_TASK_STATUSES))
748
+ .optional()
749
+ .describe("Only tasks in these statuses, example: ['running', 'paused']."),
750
+ limit: z
751
+ .number()
752
+ .int()
753
+ .min(1)
754
+ .max(100)
755
+ .optional()
756
+ .describe("Tasks per page (1-100, API default 20)."),
757
+ cursor: z.string().optional().describe("next_cursor from the previous page."),
758
+ }), async (args) => {
759
+ try {
760
+ return ok(await listPeopleTasks(people, args));
761
+ }
762
+ catch (error) {
763
+ return fail("People Search Tasks error", error);
764
+ }
765
+ });
766
+ registerTool(server, apiKey, "people-profiles", "List People Found", "Everyone your People Searches found on one platform, one entry per person: their best-scoring result and the search that found them (found_by). Free; it does not run a new search. Search by name, handle, bio, or location with q, filter by contact channels (has), audience, fit score, location, or verification, and sort by score, recent, or audience. People from searches that ended more than 30 days ago are left out.", strictArgs({
767
+ platform: peoplePlatform,
768
+ q: z
769
+ .string()
770
+ .max(200)
771
+ .optional()
772
+ .describe("Text in the name, handle, bio, or location, example: 'skincare'."),
773
+ sort: z
774
+ .enum(PEOPLE_PROFILE_SORTS)
775
+ .optional()
776
+ .describe("'score' (API default), 'recent', or 'audience'."),
777
+ limit: z
778
+ .number()
779
+ .int()
780
+ .min(1)
781
+ .max(200)
782
+ .default(25)
783
+ .describe("People per page (1-200, default 25)."),
784
+ cursor: z.string().optional().describe("next_cursor from the previous page."),
785
+ has: z
786
+ .array(z.enum(PEOPLE_FILTER_CHANNELS))
787
+ .optional()
788
+ .describe("Channels every person must have, example: ['email', 'instagram']. 'email' is a public email; the others are a link of that type."),
789
+ min_audience: z
790
+ .number()
791
+ .int()
792
+ .min(0)
793
+ .optional()
794
+ .describe("Minimum followers (subscribers on YouTube)."),
795
+ max_audience: z
796
+ .number()
797
+ .int()
798
+ .min(0)
799
+ .optional()
800
+ .describe("Maximum followers (subscribers on YouTube)."),
801
+ min_score: z
802
+ .number()
803
+ .int()
804
+ .min(0)
805
+ .max(100)
806
+ .optional()
807
+ .describe("Minimum fit score (0-100)."),
808
+ location: z
809
+ .string()
810
+ .max(100)
811
+ .optional()
812
+ .describe("Text in the location, example: 'united states'."),
813
+ verified: z
814
+ .boolean()
815
+ .optional()
816
+ .describe("Only verified accounts. Only X and TikTok people carry a verified flag."),
817
+ }), async (args) => {
818
+ try {
819
+ return ok(await listPeopleProfiles(people, args));
820
+ }
821
+ catch (error) {
822
+ return fail("People Profiles error", error);
823
+ }
824
+ });
458
825
  // Scanners ask for these lists during discovery. There is nothing to return,
459
826
  // but an empty list is a successful response. Method-not-found looks like a
460
827
  // broken server to some directory crawlers.
@@ -467,5 +834,33 @@ export function createDesearchMcpServer(apiKey, client) {
467
834
  server.server.setRequestHandler(ListResourceTemplatesRequestSchema, () => ({
468
835
  resourceTemplates: [],
469
836
  }));
837
+ // The installed SDK tool schema has no securitySchemes field. The list
838
+ // handler adds it after the SDK builds the tool list, and copies the same
839
+ // value into `_meta` so clients that drop unknown top-level fields still
840
+ // see it. Connector hosts use it to see that tool calls need OAuth.
841
+ publishToolSecurity(server);
470
842
  return server;
471
843
  }
844
+ function publishToolSecurity(server) {
845
+ const low = server.server;
846
+ const previous = low._requestHandlers.get("tools/list");
847
+ if (!previous) {
848
+ return;
849
+ }
850
+ low.setRequestHandler(ListToolsRequestSchema, async (request, extra) => {
851
+ const result = await previous(request, extra);
852
+ if (Array.isArray(result?.tools)) {
853
+ for (const tool of result.tools) {
854
+ const securitySchemes = [{ type: "oauth2", scopes: ["mcp"] }];
855
+ tool.securitySchemes = securitySchemes;
856
+ const existing = tool._meta;
857
+ const meta = existing !== null && typeof existing === "object" && !Array.isArray(existing)
858
+ ? { ...existing }
859
+ : {};
860
+ meta.securitySchemes = [{ type: "oauth2", scopes: ["mcp"] }];
861
+ tool._meta = meta;
862
+ }
863
+ }
864
+ return result;
865
+ });
866
+ }
package/package.json CHANGED
@@ -1,16 +1,19 @@
1
1
  {
2
2
  "name": "desearch-mcp-server",
3
- "version": "0.1.4",
3
+ "version": "0.2.1",
4
4
  "mcpName": "io.github.Desearch-ai/mcp-desearch",
5
- "description": "AI search, X search and web search for AI agents, plus page extraction and X data tools. Bring your own Desearch API key.",
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",
7
- "homepage": "https://www.desearch.ai/docs/guide/sdk/mcp",
7
+ "homepage": "https://desearch.ai",
8
8
  "type": "module",
9
9
  "author": "Desearch AI",
10
10
  "repository": {
11
11
  "type": "git",
12
12
  "url": "git+https://github.com/Desearch-ai/mcp-desearch.git"
13
13
  },
14
+ "bugs": {
15
+ "url": "https://github.com/Desearch-ai/mcp-desearch/issues"
16
+ },
14
17
  "bin": {
15
18
  "desearch-mcp-server": "./build/index.js"
16
19
  },
@@ -19,13 +22,32 @@
19
22
  "CHANGELOG.md"
20
23
  ],
21
24
  "keywords": [
22
- "desearch",
23
25
  "mcp",
24
- "model context protocol",
25
- "ai",
26
- "twitter",
27
- "websearch",
28
- "claude"
26
+ "mcp-server",
27
+ "model-context-protocol",
28
+ "desearch",
29
+ "ai-search",
30
+ "web-search",
31
+ "x-search",
32
+ "twitter-search",
33
+ "search-api",
34
+ "bittensor",
35
+ "subnet-22",
36
+ "ai-agents",
37
+ "llm",
38
+ "claude",
39
+ "cursor",
40
+ "reddit",
41
+ "hackernews",
42
+ "arxiv",
43
+ "wikipedia",
44
+ "people-search",
45
+ "creator-search",
46
+ "influencer-search",
47
+ "lead-generation",
48
+ "youtube",
49
+ "tiktok",
50
+ "linkedin"
29
51
  ],
30
52
  "scripts": {
31
53
  "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
@@ -38,6 +60,7 @@
38
60
  "dependencies": {
39
61
  "@modelcontextprotocol/sdk": "^1.30.1",
40
62
  "desearch-js": "^1.5.0",
63
+ "redis": "^5.12.1",
41
64
  "undici": "^7.29.1",
42
65
  "zod": "^3.24.4"
43
66
  },