@nqminds/mcp-client 1.0.26 → 1.0.27

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.
@@ -1 +1 @@
1
- {"version":3,"file":"MCPChat.d.ts","sourceRoot":"","sources":["../src/MCPChat.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,KAAK,EAAyB,YAAY,EAAe,MAAM,SAAS,CAAC;AA+ChF,wBAAgB,OAAO,CAAC,EACtB,aAAa,EACb,WAA6B,EAC7B,YAAiB,EACjB,SAAc,GACf,EAAE,YAAY,qBA+gBd"}
1
+ {"version":3,"file":"MCPChat.d.ts","sourceRoot":"","sources":["../src/MCPChat.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAGxE,OAAO,KAAK,EAAyB,YAAY,EAAe,MAAM,SAAS,CAAC;AAyKhF,wBAAgB,OAAO,CAAC,EACtB,aAAa,EACb,WAA6B,EAC7B,YAAiB,EACjB,SAAc,GACf,EAAE,YAAY,qBAshBd"}
package/dist/MCPChat.js CHANGED
@@ -6,32 +6,160 @@ const DEFAULT_ACTIONS = [
6
6
  {
7
7
  label: "Company overview",
8
8
  icon: "🏢",
9
- prompt: "Please provide a comprehensive company overview. Include key business information, company structure, size, registered details, and any notable financial highlights.",
9
+ prompt: `You are an expert business and investment analyst and your aim is to provide a clear and comprehensive overview of the company.
10
+
11
+ This information should include:
12
+
13
+ - What the company does: products, services, and the problem it solves
14
+ - Basic facts: name, founding date, headquarters, ownership, size, and locations
15
+ - History: key milestones, mergers, launches, and growth
16
+ - Business model: how it makes money and who its customers are
17
+ - Market position: industry, competitors, market share, and differentiators
18
+ - Financial picture: revenue, profit, funding, valuation, or other key metrics
19
+ - Leadership and governance: executives, board, and organisational structure
20
+ - Operations: major business units, supply chain, technology, and partnerships
21
+ - Strategy: goals, expansion plans, innovation, and risks
22
+ - Culture and people: workforce, values, hiring, and reputation
23
+ - Legal and regulatory matters: compliance, litigation, and major constraints
24
+ - ESG or public impact: sustainability, ethics, and social responsibility
25
+ - Recent developments: major news, acquisitions, product releases, or leadership changes
26
+
27
+ Use formal and impersonal language and avoid referring to these instructions. Format your output using markdown.`,
10
28
  },
11
29
  {
12
30
  label: "Competitor analysis",
13
31
  icon: "⚔️",
14
- prompt: "Please perform a competitor analysis. Identify the main competitors in this sector, assess market positioning, and highlight competitive advantages or disadvantages.",
32
+ prompt: `You are an expert business analyst. Your aim is to analyse the competitive environment of the company.
33
+
34
+ 1. Find the website for the company
35
+ 2. Determine the sector(s) in which it operates and its value proposition(s)
36
+ 3. For each combination of sector and value proposition:
37
+ 3.1. Perform one or more searches to find competitors
38
+ 3.1.1. Competitors operate in the same sector and have similar value propositions
39
+ 3.2. For each competitor:
40
+ 3.2.1. Record the URL to their website
41
+ 3.2.2. Create a brief description of their business
42
+ 3.2.3. Say why you consider them to be a competitor
43
+
44
+ Use formal and impersonal language and avoid referring to these instructions. Format your output using markdown.`,
15
45
  },
16
46
  {
17
47
  label: "Risk analysis",
18
48
  icon: "⚠️",
19
- prompt: "Please perform a thorough risk analysis. Identify key business risks, financial risks, operational risks, and any concerning patterns in the data.",
49
+ prompt: `You are an expert business analyst. Your aim is to analyse the company for risks. Here are some ideas - do what you think is relevant and do as much due diligence as you can.
50
+
51
+ 1. Browse the company's filing history, which can be found here:
52
+ https://find-and-update.company-information.service.gov.uk/company/[companies_house_number]/filing-history
53
+ 1.1. Inspect the filing history for anything that might indicate a risk, e.g. late filings, gazette notices, name changes, changes in shareholdings, etc. These are just examples; use your initiative and expertise to identify other indicators of risk
54
+ 2. Create a list of the directors, persons of significant control (PSC, in the UK Companies House sense) and investors for the company. Note that directors, PSCs and investors might be people or other companies
55
+ 2.1 For each director, PSC and investor:
56
+ 2.1.1. Perform multiple searches on the internet and try to collect the following information:
57
+ 2.1.1.1. Create a brief professional history of the person
58
+ 2.1.2.3. Identify other activities, such as memberships of profession bodies or standards organisations
59
+ 2.1.2.4. Is the person associated with dissolved businesses or have all of their previous ventures been successful?
60
+ 2.1.2.5. Has the person ever changed their name?
61
+ 2.1.2.6. Do they frequently change their address?
62
+ 2.1.2.7. Are there any FCA (Financial Conduct Authority) or other regulatory actions against them or businesses they have been involved in?
63
+ 2.1.3. You must also find any other potentially conflicting interests:
64
+ 2.1.3.1. Are they a director of any other company, or have they been in the past?
65
+ 2.1.3.2. Are they a PSC of any other company, or have they been in the past?
66
+ 2.1.3.3. Are they an investor in any other company, or have they been in the past?
67
+ 2.1.3.4. Are they associated with any dissolved or dormant companies?
68
+ 2.1.3.5. Do they perform any other paid or unpaid work?
69
+ 2.1.3.6. Are there any potential conflicts of interest? Are they involved in any related parties?
70
+ 2.1.3.7. Have there been any potential conflicts of interest in the past?
71
+ 2.1.3.8. Are they a director, PSC or investor of one of the other directors, PSCs or investors of the company?
72
+ 2.1.3.9. Are there possible family relationships between directors, PSCs or investors?
73
+ 3. Check whether dissolved entities registered at the same address share directors, PSCs or investors with the company
74
+ 4. Your response should include a clear summary of each risk factor identified, with a rating from low to high and a suggestion for further investigation.
75
+
76
+ Note that your database does not list dissolved companies so you will need to search for those on Companies House. To gather additional information on people, use Companies House people search. The same person might appear in the search results multiple times with the same name so reconcile on birth date or address.
77
+
78
+ You MUST check the reason for a dissolution if you discover a relevant dissolved company.
79
+
80
+ Use formal and impersonal language and avoid referring to these instructions.
81
+ Format your output using markdown.`,
20
82
  },
21
83
  {
22
84
  label: "Online sentiment",
23
85
  icon: "🌐",
24
- prompt: "Please assess the online sentiment and public perception. Look for relevant news coverage, reviews, reputational issues, and overall public standing.",
86
+ prompt: `You are an expert business analyst and your aim is to estimate sentiment about the company and its products or services online and to determine trends.
87
+
88
+ 1. Find the website for the company
89
+ 2. Create a list of its product and service offerings
90
+ 3. For the company itself and each of its product or service offerings:
91
+ 3.1. Perform one or more searches in each of the time ranges:
92
+ 3.1.1. Five years ago to one year ago
93
+ 3.1.2. One year ago to today
94
+ 3.2. Determine whether there is enough information to estimate sentiment trends
95
+ 3.2.1. Strong evidence of positive sentiment includes
96
+ 3.2.1.1. Evidence of commercial sales and revenue earning contracts
97
+ 3.2.1.2. Positive customer reviews
98
+ 3.2.1.3. Revenue related partnerships with large organisations
99
+ 3.2.2. Weak evidence of positive sentiment includes
100
+ 3.2.2.1. Sales and marketing material
101
+ 3.2.2.2. Company announcements of new products
102
+ 3.2.2.3. Non-commercial funding, such as government grants, R&D funding
103
+ 3.2.2.4. Presence on procurement frameworks without evidence of sales
104
+ 3.2.2.5. Pilots, test deployments, non-paying case studies
105
+ 3.3. If there is enough information:
106
+ 3.3.1. Describe the sentiment for the company and each product or service
107
+ 3.3.1.1. Sentiment should be bad, poor, neutral, good, excellent, with evidence described as weak or strong
108
+ 3.3.2. Identify the change in sentiment from the company and each product or service
109
+ 3.3.2.1. Change in sentiment should be deteriorating, stable or improving
110
+ 3.3.3. Highlight key events that evidence sentiment and the identified changes
111
+
112
+ Use formal and impersonal language and avoid referring to these instructions.
113
+ Format your output using markdown.`,
25
114
  },
26
115
  {
27
116
  label: "SWOT analysis",
28
117
  icon: "📊",
29
- prompt: "Please perform a full SWOT analysis. Cover Strengths, Weaknesses, Opportunities, and Threats in detail.",
118
+ prompt: `You are an expert business analyst. Your aim is to analyse the company and its competitive environment in detail and perform a SWOT analysis.
119
+
120
+ 1. Use your tool and Companies House to gather detailed information about the company
121
+ 1.1. Consider its finances, structure, governance and senior personnel
122
+ 2. Find the website for the company
123
+ 2.1 Determine the sector(s) in which it operates and its value proposition(s)
124
+ 2.2. For each combination of sector and value proposition:
125
+ 2.2.1. Perform one or more searches to find competitors
126
+ 2.2.1.1. Competitors operate in the same sector and have similar value propositions
127
+ 2.2.1. For each competitor:
128
+ 2.2.1.1. Gather information you need to perform your SWOT analysis
129
+ 3. Using the information gathered, perform a detailed SWOT analysis
130
+
131
+ Use formal and impersonal language and avoid referring to these instructions.
132
+ Format your output using markdown.`,
30
133
  },
31
134
  {
32
135
  label: "Research key people",
33
136
  icon: "👤",
34
- prompt: "Please research the key people associated with this company. Include directors, persons of significant control, major shareholders, and relevant background information.",
137
+ prompt: `You are an expert investment analyst and your task is to perform detailed due diligence on the most senior people that are involved in the company. Don't ask for clarification - go ahead and do the work now.
138
+
139
+ 1. Create a list of the directors, persons of significant control and other senior people at the company.
140
+ 2. For each person:
141
+ 2.1. Perform multiple searches on the internet and extract enough information for the requirements below
142
+ 2.1.1. Be very careful to make sure that you do not confuse different people with the same name.
143
+ 2.1.1.1. Two webpages that refer to the same name might be referring to different people unless they both mention the same fact about the named person, e.g. website A says Michael Pernell runs a cybersecurity business and his hobby is knitting and website B says that Michael Pernell likes knitting and is an entrepreneur - they're likely to be the same person.
144
+ 2.1.2. Perform enough searches to create
145
+ 2.1.2.1. An educational history of the person
146
+ 2.1.2.2. A professional history of the person
147
+ 2.1.2.3. Other activities, such as memberships of profession bodies or standards organisations
148
+ 2.1.2.4. Is the person closely associated with any other people, e.g. repeatedly forms companies with particular people
149
+ 2.1.2.5. Estimate whether the person's history indicates business success or failure
150
+ 2.1.2.6. Try to detect name changes, address changes or other unusual activity
151
+ 2.1.2.7. Try to find regulatory actions against the individual, such as CCJ, FCA rulings, strike-offs, employment tribunal actions, etc.
152
+ 2.1.3. You must also find any other business interests of the person:
153
+ 2.1.3.1. Is the person a director of any other company, or have they been in the past?
154
+ 2.1.3.2. Is the person a PSC of any other company, or have they been in the past?
155
+ 2.1.3.3. Does the person have investments in any other company?
156
+ 2.1.3.4. Does the person perform any other paid or unpaid work?
157
+ 2.1.3.5. Does the person appear to have any potential conflicts of interest?
158
+ 2.1.4. Are people likely to be linked by family relationships?
159
+
160
+ Use formal and impersonal language and avoid referring to these instructions.
161
+ Format your output using markdown.
162
+ `,
35
163
  },
36
164
  ];
37
165
  export function MCPChat({ companyNumber, apiEndpoint = "/api/mcp/chat", customStyles = {}, className = "", }) {
@@ -336,7 +464,9 @@ export function MCPChat({ companyNumber, apiEndpoint = "/api/mcp/chat", customSt
336
464
  .map((msg, idx) => (React.createElement("div", { key: idx, className: `mcp-chat-message ${msg.role === "user" ? "mcp-chat-message-user" : "mcp-chat-message-assistant"}` },
337
465
  React.createElement("div", { className: "mcp-chat-message-bubble" },
338
466
  msg.role === "assistant" ? (React.createElement("div", { className: "mcp-chat-message-content markdown-content" },
339
- React.createElement(ReactMarkdown, { remarkPlugins: [remarkGfm] }, msg.content))) : (React.createElement("div", { className: "mcp-chat-message-content" }, msg.content)),
467
+ React.createElement(ReactMarkdown, { remarkPlugins: [remarkGfm], components: {
468
+ a: ({ href, children }) => (React.createElement("a", { href: href, target: "_blank", rel: "noopener noreferrer" }, children)),
469
+ } }, msg.content))) : (React.createElement("div", { className: "mcp-chat-message-content" }, msg.content)),
340
470
  msg.role === "assistant" && !msg.isStreaming && (React.createElement("div", { className: "mcp-chat-message-timestamp" },
341
471
  msg.timestamp.toLocaleTimeString(),
342
472
  msg.tokenInfo && (React.createElement("span", { className: "mcp-chat-token-info" }, msg.tokenInfo)))))))),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nqminds/mcp-client",
3
- "version": "1.0.26",
3
+ "version": "1.0.27",
4
4
  "description": "Reusable MCP client component with AI chat interface",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",