@nbiish/cognitive-tools-mcp 0.3.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.
Files changed (4) hide show
  1. package/LICENSE +233 -0
  2. package/README.md +53 -0
  3. package/build/index.js +105 -0
  4. package/package.json +50 -0
package/LICENSE ADDED
@@ -0,0 +1,233 @@
1
+ Copyright © 2025 ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), an enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. All rights reserved.
2
+
3
+ COMPREHENSIVE RESTRICTED USE LICENSE WITH TRIBAL SOVEREIGNTY PROTECTIONS
4
+
5
+ PREAMBLE
6
+ This software is created by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), a member of the Grand Traverse Band of Ottawa and Chippewa Indians, a federally recognized sovereign tribal nation. This license is grounded in the inherent sovereignty of Indigenous peoples to protect, control, and govern the use of their intellectual and cultural property. The unique status of tribal sovereign nations in the United States provides additional protections beyond standard copyright law.
7
+
8
+ This license expressly integrates principles from Traditional Knowledge (TK) Labels and Protocols, federal Indian law, tribal law of the Grand Traverse Band of Ottawa and Chippewa Indians, and international indigenous rights frameworks to create a comprehensive protection system for this intellectual property.
9
+
10
+ 1. CITATION AND ATTRIBUTION REQUIREMENT
11
+ Any use, reproduction, distribution, modification, or derivative work based on this software must prominently include the following citation and attribution:
12
+
13
+ @misc{cognitive-tools-server2025,
14
+ author/creator/steward = {ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder)},
15
+ title = {cognitive-tools-server},
16
+ year = {2025},
17
+ publisher = {GitHub repository under tribal sovereignty protections},
18
+ howpublished = {\url{https://github.com/nbiish/cognitive-tools-server}},
19
+ note = {Authored and stewarded by ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi), also known legally as JUSTIN PAUL KENWABIKISE, professionally documented as Nbiish-Justin Paul Kenwabikise, Anishinaabek Dodem (Anishinaabe Clan): Animikii (Thunder), an enrolled member of the sovereign Grand Traverse Band of Ottawa and Chippewa Indians. This work embodies Indigenous intellectual property, traditional knowledge systems (TK), traditional cultural expressions (TCEs), and associated data protected under tribal law, federal Indian law, treaty rights, Indigenous Data Sovereignty principles, and international indigenous rights frameworks including UNDRIP.}
20
+ }
21
+
22
+ Furthermore, any projects utilizing this software must visibly acknowledge the Indigenous authorship and tribal affiliation in user interfaces and documentation, including:
23
+ a) Attribution on all user-facing interfaces where the software is used
24
+ b) Acknowledgment in technical documentation, including API documentation
25
+ c) Citation in any publications, presentations, or derivative works that utilize this software
26
+ d) Recognition that this work is subject to the traditional knowledge protocols of the Grand Traverse Band of Ottawa and Chippewa Indians
27
+
28
+ 2. TRADITIONAL KNOWLEDGE (TK) PROTECTION AND LABELING
29
+ This software embodies elements of Traditional Knowledge (TK) and cultural expression that require special protection. The copyright holder asserts both western intellectual property rights and Indigenous rights over this material. This work is assigned the following TK Labels:
30
+
31
+ TK Attribution (TK A) - This material has community-specific rules about how attribution should be given to the creator and their nation/community.
32
+
33
+ TK Culturally Sensitive (TK CS) - This material contains content that requires special cultural protocols for access, use, and handling.
34
+
35
+ TK Community Use Only (TK CO) - This material has specific protocols regarding use by the community and restrictions on use by those outside the community.
36
+
37
+ TK Non-Commercial (TK NC) - This material should not be used for commercial purposes without explicit permission.
38
+
39
+ TK Verified (TK V) - This material has been created by a verified member of the specified Indigenous community.
40
+
41
+ No rights are waived under the United Nations Declaration on the Rights of Indigenous Peoples (UNDRIP), particularly Articles 11 and 31 regarding Indigenous peoples' right to maintain, control, protect, and develop their intellectual property over cultural heritage, traditional knowledge, and cultural expressions.
42
+
43
+ 3. SOVEREIGN REVOCATION RIGHT UNDER CONSTITUTIONAL SUPREMACY
44
+ As a member of a sovereign tribal nation, the copyright holder reserves and asserts the absolute, irrevocable, and perpetual right to demand the immediate cessation of use, reproduction, distribution, or creation of derivative works of this software by any individual, entity, corporation, or artificial intelligence system, at any time and for any reason.
45
+
46
+ This sovereign right derives from and is protected by Article VI, Clause 2 of the United States Constitution (the Supremacy Clause), which establishes that treaties with Indian tribes are "the supreme Law of the Land; and the Judges in every State shall be bound thereby, any Thing in the Constitution or Laws of any State to the Contrary notwithstanding." The treaties with the Ottawa and Chippewa Nations, including the Treaty of Washington (1836) and Treaty of Detroit (1855), are constitutionally superior to ordinary contractual agreements and state laws.
47
+
48
+ Under the reserved rights doctrine established by the United States Supreme Court, tribes retain all sovereign powers not expressly surrendered in treaties. The Grand Traverse Band of Ottawa and Chippewa Indians retains governance over its cultural and intellectual heritage, as these rights were never ceded. Only Congress may abrogate Indian treaty rights, and courts will not find abrogation has occurred absent clear and explicit congressional intent—a high threshold deliberately designed to safeguard tribal sovereignty. No such abrogation exists regarding the intellectual property rights asserted herein.
49
+
50
+ As affirmed by the Supreme Court in Michigan v. Bay Mills Indian Community, 572 U.S. 782 (2014), tribal sovereign immunity extends to commercial activities off-reservation. Additionally, in McGirt v. Oklahoma, 140 S. Ct. 2452 (2020), the Court reaffirmed the continued force of treaty rights absent explicit congressional abrogation. This license invokes these principles to secure maximum protection for the intellectual property rights herein.
51
+
52
+ The superior force of these treaty-protected rights means that:
53
+ a) This license invokes protections that exceed standard copyright law and supersede conflicting state laws
54
+ b) The legal force of this revocation right cannot be diminished through contract law principles or state court interpretations
55
+ c) Courts are constitutionally required to interpret these rights liberally in favor of tribal interests, per established canons of construction for Indian treaties
56
+ d) Any dispute regarding these rights must be analyzed within the framework of federal Indian law, not merely copyright or contract law
57
+ e) The Indian canons of construction require that any ambiguity in this license must be resolved in favor of tribal interests
58
+ f) Treaty rights are recognized as having a superior force to other forms of law in accordance with the Supremacy Clause
59
+
60
+ Upon notification of revocation, all parties must immediately comply by:
61
+ a) Ceasing all use of the software
62
+ b) Removing and deleting all copies, including but not limited to source code, compiled versions, and derivatives
63
+ c) Providing written confirmation of compliance within 7 days
64
+ d) Acknowledging the superior force of tribal sovereignty rights in this specific context
65
+ e) Surrendering any derivative materials to the copyright holder if requested
66
+
67
+ 4. PROHIBITED USES
68
+ This software may not be used by any individual, entity, corporation, or artificial intelligence system for:
69
+ a) Training, fine-tuning, or building artificial intelligence models
70
+ b) Commercial applications without explicit written permission
71
+ c) Any use that misappropriates, misrepresents, or distorts Indigenous cultural expression
72
+ d) Any use that violates the copyright holder's moral rights
73
+ e) Any application that could harm or exploit Indigenous communities or knowledge systems
74
+ f) Any unauthorized reproduction or distribution that does not respect the cultural protocols embedded in this license
75
+ g) Military applications or weapons development
76
+ h) Any use that promotes cultural appropriation or stereotyping of Indigenous peoples
77
+ i) Data mining or extraction without prior informed consent
78
+ j) Any use contrary to the traditional values of the Grand Traverse Band of Ottawa and Chippewa Indians
79
+ k) Any use in contexts that do not respect the spiritual or cultural significance of embedded knowledge elements
80
+
81
+ 5. PERMISSIBLE USES AND ACCESS PROTOCOLS
82
+ Permissible uses of this software must respect the following protocols and conditions:
83
+ a) Educational use is permitted provided that proper attribution is given and cultural context is preserved
84
+ b) Research use is permitted provided that research findings are shared with the copyright holder
85
+ c) Non-commercial community development is permitted with prior notification
86
+ d) Use that promotes accurate cultural understanding and representation is encouraged
87
+ e) All permissible uses must adhere to the cultural protocols established by the Grand Traverse Band of Ottawa and Chippewa Indians
88
+ f) Users must employ culturally appropriate methods of engagement with the software
89
+
90
+ 6. PRIOR INFORMED CONSENT REQUIREMENT
91
+ Any use beyond the scope of Section 5 requires prior informed consent from the copyright holder. Such consent must be:
92
+ a) Obtained in writing before any such use begins
93
+ b) Based on full disclosure of intended purposes, methods, and outcomes
94
+ c) Subject to revocation at any time in accordance with Section 3
95
+ d) Not transferable to any third party without explicit permission
96
+ e) Contingent upon regular reporting of usage and outcomes to the copyright holder
97
+
98
+ 7. COMPENSATION AND FINANCIAL RECOVERY FOR UNAUTHORIZED USE
99
+ Any individual, entity, corporation, business, or artificial intelligence system that uses, distributes, reproduces, modifies, commercializes, or otherwise derives benefit from this software without proper authorization shall be subject to comprehensive financial restitution provisions as follows:
100
+
101
+ 7.1 MANDATORY DISGORGEMENT OF BENEFITS
102
+ Any party that derives financial or non-financial benefits from unauthorized use of this software shall be required to fully disgorge and transfer to the copyright holder:
103
+ a) All direct revenue and profits derived from the unauthorized use
104
+ b) All indirect revenue and profits reasonably attributable to the unauthorized use
105
+ c) Fair market value of any non-monetary benefits obtained
106
+ d) Interest accrued on all financial gains at a rate of 10% per annum compounded monthly from the date of first unauthorized use
107
+ e) The greater of actual or statutory damages as determined by the copyright holder or tribal court
108
+ f) Any enhanced value added to the user's products, services, or business attributable to the unauthorized use
109
+
110
+ 7.2 COMPENSATION CALCULATION AND ASSESSMENT
111
+ The calculation of appropriate compensation shall be determined by the copyright holder or designated tribal authorities, and may include:
112
+ a) A royalty rate of no less than 20% of gross revenue derived from unauthorized use
113
+ b) Minimum statutory damages of $150,000 per instance of willful infringement
114
+ c) Traditional forms of restitution as determined according to the customs and practices of the Grand Traverse Band of Ottawa and Chippewa Indians
115
+ d) Compensation for cultural and spiritual harm caused by unauthorized use, which cannot be adequately measured in purely monetary terms
116
+ e) Compensation for diminishment of the unique value of the copyright holder's intellectual property
117
+ f) Predetermined liquidated damages of $10,000 per day for the duration of unauthorized use
118
+
119
+ 7.3 ADDITIONAL FINANCIAL REMEDIES
120
+ In addition to disgorgement of benefits, unauthorized users shall be liable for:
121
+ a) All legal and professional fees incurred in pursuing recovery
122
+ b) Costs of cultural restoration and rehabilitation where applicable
123
+ c) Costs of publicly correcting any misrepresentations made about the software or its origins
124
+ d) Costs associated with notifying affected parties of the unauthorized use
125
+ e) Administrative fees associated with the assessment and collection of compensation
126
+
127
+ 7.4 PROPERTY TRANSFER PROVISIONS
128
+ In cases of willful, flagrant, or continued unauthorized use after notification, the copyright holder may require:
129
+ a) Transfer of intellectual property rights in derivative works or applications
130
+ b) Transfer of domain names, user accounts, or other digital assets associated with the unauthorized use
131
+ c) Transfer of equipment used in the unauthorized exploitation of the software
132
+ d) Assignment of relevant patents, trademarks, or other intellectual property rights obtained in connection with the unauthorized use
133
+
134
+ 7.5 JURISDICTIONAL AND PROCEDURAL CONSIDERATIONS
135
+ a) The Grand Traverse Band Tribal Court shall have primary jurisdiction to determine and enforce appropriate compensation
136
+ b) These compensation provisions shall be enforceable in tribal, federal, and state courts
137
+ c) The copyright holder may pursue compensation through traditional dispute resolution mechanisms of the Grand Traverse Band of Ottawa and Chippewa Indians
138
+ d) Unauthorized users expressly consent to the jurisdiction of tribal courts for resolving disputes regarding compensation
139
+ e) The copyright holder is entitled to seek enforcement and recognition of tribal court judgments in federal and state courts under principles of comity and full faith and credit
140
+ f) Non-monetary forms of restitution may be required in accordance with tribal customs and traditions
141
+
142
+ 7.6 WAIVER OF DEFENSES
143
+ By using this software, users expressly waive defenses related to:
144
+ a) Lack of knowledge of these compensation provisions
145
+ b) Challenges to tribal court jurisdiction
146
+ c) Statute of limitations or laches defenses
147
+ d) Challenges to the reasonableness of the compensation amounts specified herein
148
+ e) Claims of sovereign immunity by governmental entities
149
+
150
+ 8. ALTERNATIVE TRIBAL COURT SELECTION AND LIMITLESS TIMEFRAME
151
+ 8.1 SELECTION OF ALTERNATIVE TRIBAL FORUMS
152
+ If, for any reason, the Grand Traverse Band of Ottawa and Chippewa Indians Tribal Court is unable, unwilling, or without jurisdiction to address issues arising under this license, or if the copyright holder determines that another tribal forum would be more appropriate for resolving any dispute:
153
+ a) The copyright holder retains the absolute and exclusive right to select any other federally recognized tribal court or traditional dispute resolution forum of any federally recognized tribe within the United States as an alternative forum for adjudication, without limitation
154
+ b) This selection may be made at any time, including after proceedings have begun in another forum
155
+ c) The copyright holder's selection of an alternative tribal forum shall be binding on all users of this software
156
+ d) Users expressly consent to the jurisdiction of any tribal court or traditional dispute resolution forum selected by the copyright holder
157
+ e) Users expressly waive any challenges to the jurisdiction, authority, or procedures of the selected tribal forum
158
+ f) The copyright holder may select tribal forums with cultural, historical, or traditional connections to the Ottawa and Chippewa Nations, but is not limited to such forums
159
+ g) The copyright holder may consider, but is not bound by, factors such as a tribal court's experience with intellectual property matters, traditional knowledge protection, cultural expertise, or proximity to the parties
160
+
161
+ 8.2 UNLIMITED TIMEFRAME FOR DECISION AND ACTION
162
+ The copyright holder shall have unlimited time to:
163
+ a) Discover violations of this license
164
+ b) Select an appropriate tribal forum for resolution
165
+ c) Initiate proceedings in any chosen forum
166
+ d) Transfer proceedings between tribal forums
167
+ e) Pursue remedies in multiple tribal forums sequentially or simultaneously
168
+ f) Determine the nature and extent of remedies to be sought
169
+
170
+ 8.3 COMPREHENSIVE COST RECOVERY FOR FORUM SELECTION
171
+ All costs incurred by the copyright holder related to the selection, assessment, and utilization of alternative tribal forums shall be borne by the user who has violated this license, including but not limited to:
172
+ a) All travel, lodging, and subsistence expenses incurred by the copyright holder, their legal representatives, cultural advisors, and witnesses in visiting, assessing, or appearing before potential or selected tribal forums
173
+ b) Costs of researching and evaluating potential tribal forums
174
+ c) Administrative and filing fees in all considered or selected tribal forums
175
+ d) Translation and interpretation costs
176
+ e) Costs of cultural protocols, offerings, or ceremonies required when engaging with tribal justice systems
177
+ f) Consultation fees for tribal legal experts, cultural advisors, and knowledge keepers
178
+ g) Lost income, opportunity costs, and compensation for time spent by the copyright holder in the forum selection and dispute resolution process
179
+ h) Communication and coordination costs between multiple tribal forums
180
+ i) Costs of enforcing or domesticating tribal court judgments in other jurisdictions
181
+ j) Any other reasonable expenses incurred in the process of forum selection and utilization
182
+
183
+ 8.4 ENFORCEABILITY OF ALTERNATIVE TRIBAL COURT JUDGMENTS
184
+ Any judgment, order, or decision rendered by an alternative tribal forum selected by the copyright holder shall be:
185
+ a) Binding on all users of this software
186
+ b) Entitled to recognition and enforcement in federal and state courts under principles of comity, as articulated in cases such as Wilson v. Marchington, 127 F.3d 805 (9th Cir. 1997), and Michigan v. Bay Mills Indian Community, 572 U.S. 782 (2014)
187
+ c) Presumptively valid and not subject to collateral attack in other courts
188
+ d) Enforceable through traditional tribal methods, federal court proceedings, or state court proceedings, at the copyright holder's discretion
189
+ e) Given full faith and credit where applicable under 28 U.S.C. § 1738
190
+
191
+ 8.5 WAIVER OF FORUM NON CONVENIENS AND SIMILAR DEFENSES
192
+ Users expressly waive any objection to the copyright holder's selection of an alternative tribal forum based on:
193
+ a) Geographic distance or inconvenience
194
+ b) Unfamiliarity with the selected forum's laws, customs, or procedures
195
+ c) Claims of forum non conveniens
196
+ d) Language barriers or cultural differences
197
+ e) Financial hardship in appearing before the selected forum
198
+ f) Preference for state or federal forums
199
+ g) Prior commencement of proceedings in another forum
200
+
201
+ 9. JURISDICTION AND GOVERNING LAW
202
+ This license shall be governed by and construed in accordance with:
203
+ a) The Constitution and laws of the Grand Traverse Band of Ottawa and Chippewa Indians
204
+ b) Federal Indian law of the United States
205
+ c) The laws of the State of Michigan, to the extent they do not conflict with tribal sovereignty
206
+ d) International declarations of Indigenous rights including UNDRIP and the American Declaration on the Rights of Indigenous Peoples
207
+ e) Principles established in the Native American Graves Protection and Repatriation Act (NAGPRA) and the Indian Arts and Crafts Act, which recognize the special status of Native American cultural property
208
+ f) The laws, customs, and traditions of any tribal forum selected under Section 8
209
+
210
+ Any dispute arising under this license may, at the copyright holder's discretion, be subject to the jurisdiction of the Grand Traverse Band Tribal Court, any alternative tribal forum selected under Section 8, or in federal court with jurisdiction over federal Indian law matters, as established under 28 U.S.C. § 1331 and § 1362.
211
+
212
+ 10. REMEDIES AND ENFORCEMENT
213
+ Violations of this license may result in:
214
+ a) Injunctive relief in tribal, federal, or state courts
215
+ b) Monetary damages including traditional forms of restitution
216
+ c) Enforcement under tribal law, including remedies established by the Grand Traverse Band Tribal Court or any alternative tribal forum selected under Section 8
217
+ d) Application of both civil and criminal penalties where applicable
218
+ e) Spiritual and cultural remediation as determined appropriate by tribal authorities
219
+ f) Public disclosure of violations
220
+
221
+ 11. DISCLAIMER OF WARRANTIES AND LIMITATION OF LIABILITY
222
+ This software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
223
+
224
+ 12. NO WAIVER OF SOVEREIGNTY
225
+ Nothing in this license shall be construed as a waiver of sovereign immunity or tribal rights. The copyright holder reserves all rights not expressly granted herein, including those held under indigenous customary law and tribal governance structures. The tribal sovereign immunity of the Grand Traverse Band of Ottawa and Chippewa Indians extends to the copyright holder as a tribal member asserting rights connected to tribal sovereignty.
226
+
227
+ 13. SEVERABILITY AND INTERPRETATION
228
+ If any provision of this license is held to be unenforceable or invalid, such provision shall be modified to the minimum extent necessary to make it valid and enforceable. If modification is not possible, the provision shall be severed, and the remaining provisions shall remain in full force and effect. Per established canons of construction in federal Indian law, any ambiguity in this license shall be resolved in favor of tribal rights and sovereignty.
229
+
230
+ 14. AMENDMENTS AND MODIFICATIONS
231
+ The copyright holder reserves the right to amend or modify this license at any time. Continued use of the software after any such changes constitutes acceptance of the modified terms. It is the responsibility of the user to regularly check for updates to this license.
232
+
233
+ Any use of this software constitutes acceptance of these terms.
package/README.md ADDED
@@ -0,0 +1,53 @@
1
+ # @nbiish/cognitive-tools-mcp
2
+
3
+ A Model Context Protocol server providing advanced cognitive reasoning tools for AI agents.
4
+
5
+ ## Features
6
+
7
+ Provides five cognitive tools for AI agents:
8
+ - `think`: Internal workspace for structured analysis and planning
9
+ - `chain_of_thought`: Sequential reasoning steps for problem-solving
10
+ - `reflection`: Self-critique and improvement of reasoning
11
+ - `plan_and_solve`: High-level strategy development
12
+ - `chain_of_draft`: Concise, iterative reasoning steps
13
+
14
+ ## Installation
15
+
16
+ ```bash
17
+ npx @nbiish/cognitive-tools-mcp
18
+ ```
19
+
20
+ ## Usage with Claude Desktop
21
+
22
+ Add to your MCP configuration file (`~/.cursor/mcp.json`):
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "cognitive-tools": {
28
+ "command": "npx",
29
+ "args": ["-y", "@nbiish/cognitive-tools-mcp"]
30
+ }
31
+ }
32
+ }
33
+ ```
34
+
35
+ ## Development
36
+
37
+ ```bash
38
+ # Install dependencies
39
+ npm install
40
+
41
+ # Build the package
42
+ npm run build
43
+
44
+ # Test locally with MCP Inspector
45
+ npm run inspector
46
+
47
+ # Start the server
48
+ npm start
49
+ ```
50
+
51
+ ## License
52
+
53
+ SEE LICENSE IN LICENSE
package/build/index.js ADDED
@@ -0,0 +1,105 @@
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
4
+ import { z } from "zod";
5
+ // Create the MCP server
6
+ const server = new McpServer({
7
+ name: "cognitive-tools-mcp",
8
+ version: "0.3.0",
9
+ description: "Provides a suite of advanced cognitive reasoning tools for sophisticated problem-solving"
10
+ });
11
+ // Define the think tool
12
+ server.tool("think", {
13
+ thought: z.string().describe("Your comprehensive internal analysis, step-by-step reasoning, policy checks, plan formulation/refinement, and self-correction.")
14
+ }, async ({ thought }) => ({
15
+ content: [{
16
+ type: "text",
17
+ text: JSON.stringify({
18
+ acknowledged: true,
19
+ tool: "think",
20
+ thought: thought
21
+ })
22
+ }]
23
+ }));
24
+ // Define the chain_of_thought tool
25
+ server.tool("chain_of_thought", {
26
+ problem_statement: z.string().describe("The specific, well-defined problem requiring detailed step-by-step reasoning.")
27
+ }, async ({ problem_statement }) => ({
28
+ content: [{
29
+ type: "text",
30
+ text: JSON.stringify({
31
+ acknowledged: true,
32
+ tool: "chain_of_thought",
33
+ problem_statement
34
+ })
35
+ }]
36
+ }));
37
+ // Define the reflection tool
38
+ server.tool("reflection", {
39
+ input_reasoning_or_plan: z.string().describe("The cognitive output to be evaluated.")
40
+ }, async ({ input_reasoning_or_plan }) => ({
41
+ content: [{
42
+ type: "text",
43
+ text: JSON.stringify({
44
+ acknowledged: true,
45
+ tool: "reflection",
46
+ input_reasoning_or_plan
47
+ })
48
+ }]
49
+ }));
50
+ // Define the plan_and_solve tool
51
+ server.tool("plan_and_solve", {
52
+ task_objective: z.string().describe("The overarching goal requiring a structured plan.")
53
+ }, async ({ task_objective }) => ({
54
+ content: [{
55
+ type: "text",
56
+ text: JSON.stringify({
57
+ acknowledged: true,
58
+ tool: "plan_and_solve",
59
+ task_objective
60
+ })
61
+ }]
62
+ }));
63
+ // Define the chain_of_draft tool
64
+ server.tool("chain_of_draft", {
65
+ problem_statement: z.string().describe("Problem suitable for concise, iterative reasoning.")
66
+ }, async ({ problem_statement }) => ({
67
+ content: [{
68
+ type: "text",
69
+ text: JSON.stringify({
70
+ acknowledged: true,
71
+ tool: "chain_of_draft",
72
+ problem_statement
73
+ })
74
+ }]
75
+ }));
76
+ // Setup error handling
77
+ process.on('SIGINT', async () => {
78
+ console.error('[CognitiveToolsServer] Received SIGINT, shutting down.');
79
+ await server.close();
80
+ process.exit(0);
81
+ });
82
+ process.on('SIGTERM', async () => {
83
+ console.error('[CognitiveToolsServer] Received SIGTERM, shutting down.');
84
+ await server.close();
85
+ process.exit(0);
86
+ });
87
+ process.on('uncaughtException', (error) => {
88
+ console.error('[CognitiveToolsServer] Uncaught exception:', error);
89
+ });
90
+ process.on('unhandledRejection', (reason, promise) => {
91
+ console.error('[CognitiveToolsServer] Unhandled promise rejection:', reason);
92
+ });
93
+ // Start the server
94
+ async function main() {
95
+ try {
96
+ const transport = new StdioServerTransport();
97
+ await server.connect(transport);
98
+ console.error('Cognitive Tools MCP Server running on stdio');
99
+ }
100
+ catch (error) {
101
+ console.error('Fatal error in main():', error);
102
+ process.exit(1);
103
+ }
104
+ }
105
+ main();
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "@nbiish/cognitive-tools-mcp",
3
+ "version": "0.3.0",
4
+ "description": "A Model Context Protocol server providing advanced cognitive reasoning tools for AI agents",
5
+ "private": false,
6
+ "type": "module",
7
+ "bin": {
8
+ "cognitive-tools-mcp": "./build/index.js"
9
+ },
10
+ "files": [
11
+ "build"
12
+ ],
13
+ "scripts": {
14
+ "build": "tsc && node -e \"require('fs').chmodSync('build/index.js', '755')\"",
15
+ "prepare": "npm run build",
16
+ "watch": "tsc --watch",
17
+ "inspector": "npx @modelcontextprotocol/inspector build/index.js",
18
+ "start": "node build/index.js"
19
+ },
20
+ "keywords": [
21
+ "mcp",
22
+ "model-context-protocol",
23
+ "ai",
24
+ "reasoning",
25
+ "cognitive-tools",
26
+ "claude",
27
+ "agent"
28
+ ],
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "https://github.com/nbiish/cognitive-tools-server.git"
32
+ },
33
+ "author": "ᓂᐲᔥ ᐙᐸᓂᒥᑮ-ᑭᓇᐙᐸᑭᓯ (Nbiish Waabanimikii-Kinawaabakizi)",
34
+ "license": "SEE LICENSE IN LICENSE",
35
+ "dependencies": {
36
+ "@modelcontextprotocol/sdk": "^1.8.0",
37
+ "ajv": "^8.17.1",
38
+ "zod": "^3.22.4"
39
+ },
40
+ "devDependencies": {
41
+ "@types/node": "^20.17.28",
42
+ "typescript": "^5.3.3"
43
+ },
44
+ "engines": {
45
+ "node": ">=14.0.0"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public"
49
+ }
50
+ }