logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-cognitive-analyzer

A utility suite for aggregating source artifacts from specified file system locations and leveraging sophisticated generative AI models (via OpenAI API) to perform deep code evaluation and automated narrative creation.

Author

mcp-cognitive-analyzer logo

aindreyway

MIT License

Quick Info

GitHub GitHub Stars 15
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apisapineuroloraopenai apiusing openaimcp neurolora

MCP Cognitive Analyzer Suite (mcp-cognitive-analyzer)

MCP Status Badge Current Release License Type

This intelligent server component facilitates automated introspection of codebase structures. It consolidates source files and invokes advanced reasoning engines from OpenAI for detailed code auditing and technical documentation drafting.

⚙️ Deployment Procedure

Installation is straightforward. If you are setting up for the first time, please adhere to the subsequent sequence of steps or delegate the setup process to your AI assistant.

Phase 1: Establishing Node.js Foundation

On macOS Systems

  1. Prerequisite: Install Homebrew if it's absent: bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  2. Install Node.js version 18: bash brew install node@18 echo 'export PATH="/opt/homebrew/opt/node@18/bin:$PATH"' >> ~/.zshrc source ~/.zshrc

On Windows Environments

  1. Obtain the installer for Node.js 18 LTS from nodejs.org.
  2. Execute the downloaded setup file.
  3. Launch a fresh terminal instance to ensure environment variable updates are active.

On Linux (Debian/Ubuntu Derivatives)

bash curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - sudo apt-get install -y nodejs

Phase 2: Integrating Dependency Resolution Tools (uv & uvx)

Applicable to All Operating Systems

  1. Install the uv package manager utility:

bash curl -LsSf https://astral.sh/uv/install.sh | sh

  1. Install the uvx wrapper utility: bash uv pip install uvx

Phase 3: Verifying Component Readiness

Confirm that all prerequisites have been correctly installed by executing:

bash node --version # Expected output: v18.x.x npm --version # Expected output: 9.x.x or greater uv --version # Verify uv is functional uvx --version # Verify uvx is functional

Phase 4: Configuring the MCP Dispatcher Service

Your AI companion is equipped to guide this configuration step:

  1. Locate the appropriate Cline configuration file:

  2. VSCode User Settings: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

  3. Claude Desktop Configuration: ~/Library/Application Support/Claude/claude_desktop_config.json
  4. Windows VSCode Path: %APPDATA%/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  5. Windows Claude Path: %APPDATA%/Claude/claude_desktop_config.json

  6. Integrate the following configuration block into the identified settings file:

{ "mcpServers": { "aindreyway-mcp-neurolora": { "command": "npx", "args": ["-y", "@aindreyway/mcp-neurolora@latest"], "env": { "NODE_OPTIONS": "--max-old-space-size=256", "OPENAI_API_KEY": "your_api_key_here" } } } }

Phase 5: Provisioning Essential Infrastructure Servers

Delegate this task to your assistant with the command: "Initiate the installation of core MCP infrastructure services for my current environment."

The assistant will proceed to:

  1. Pinpoint the correct configuration resource.
  2. Execute the install_base_servers utility.
  3. Systematically configure all requisite underlying services.

Upon successful provisioning, a full shutdown and restart of the host application (VSCode) is mandatory for service initialization:

  1. Terminate VSCode completely (Cmd+Q on macOS, Alt+F4 on Windows).
  2. Relaunch VSCode.
  3. The newly provisioned services will now be operational.

Critical Note: A complete application restart is indispensable following the base server deployment to ensure proper service bootstrapping.

Observation: This server leverages npx for ephemeral execution of the Node.js package, which is the preferred method for TypeScript-based MCP components, ensuring compatibility with the broader npm ecosystem.

Core Infrastructure Services

The following foundational services will be automatically deployed and integrated:

  • fetch: Provides fundamental capabilities for making outbound HTTP interactions.
  • puppeteer: Enables advanced browser control and automated web testing scenarios.
  • sequential-thinking: Offers modules for tackling multi-step, intricate problem decomposition.
  • github: Grants integration hooks for GitHub repository interactions.
  • git: Supports standard version control operations via Git.
  • shell: Allows execution of basic shell commands, including utilities such as:
  • ls: Listing directory inhabitants
  • cat: Displaying file content
  • pwd: Reporting the current working location
  • grep: Pattern searching within text
  • wc: Tallying lines, words, and characters
  • touch: Creating zero-byte files
  • find: Locating files based on criteria

🎯 Operational Capabilities

Instruct your assistant to perform tasks such as:

  • "Perform a comprehensive analysis of my source code and suggest performance optimizations."
  • "Deploy the required foundational MCP services."
  • "Consolidate all source code from the project's main directory."
  • "Draft comprehensive documentation summarizing the functionality of this codebase."
  • "Generate a singular markdown document containing all project source code, complete with syntax highlighting."

🛠️ Exposed Utility Functions

analyze_code

Leverages the OpenAI API to conduct in-depth analysis of code artifacts, yielding constructive critiques and actionable enhancement recommendations.

Parameters:

  • codePath (Mandatory): The full or relative path pointing to the file or directory slated for inspection.

Example Invocation:

{ "codePath": "/project/source/business_logic.js" }

The function execution sequence entails:

  1. Sending the code payload to the OpenAI reasoning engine.
  2. Compiling detailed output covering:
  3. Identified deficiencies and proposed remedies.
  4. Violations of established coding standards.
  5. Assessment of potential operational impact.
  6. Step-by-step remediation instructions.
  7. Persisting two distinct output artifacts within the project structure:
  8. LAST_RESPONSE_OPENAI.txt: A narrative, human-readable summary of the findings.
  9. LAST_RESPONSE_OPENAI_GITHUB_FORMAT.json: A structured JSON object formatted for direct import into GitHub Issue tracking systems.

Prerequisite: An active OpenAI API credential must be present in the operational environment variables.

collect_code

Aggregates textual content from all source files within a designated folder structure and compiles it into a unified markdown file, incorporating syntax highlighting and internal cross-references.

Parameters:

  • directory (Mandatory): The root path whose contents should be gathered.
  • outputPath (Optional): The file system path where the final consolidated markdown document will be written.
  • ignorePatterns (Optional): A list of glob patterns defining files or directories to exclude (functionally similar to a .gitignore file).

Example Invocation:

{ "directory": "./app/modules", "outputPath": "./Codebook_v20241220.md", "ignorePatterns": [".test.ts", "build/", "node_modules", ".bak"] }

install_base_servers

Automates the injection of default, essential MCP service configurations into the primary settings manifest.

Parameters:

  • configPath (Mandatory): The precise location of the MCP operational settings file.

Example Invocation:

{ "configPath": "/Users/user/.config/cline_mcp_settings.json" }

🔧 Core Features Summary

The server package delivers robust functionality across three key domains:

  • Code Insight Generation (Analysis):

  • Seamless interfacing with OpenAI models.

  • Generation of highly structured diagnostic reports.
  • Provision of concrete suggestions for adherence to best practices.
  • Formatting outputs suitable for external issue trackers (GitHub).

  • Source Artifact Consolidation (Collection):

  • Recursive directory traversal capabilities.

  • Application of appropriate syntax coloring for readability.
  • Construction of internal navigational aids.
  • Granular filtering based on user-defined exclusion rules.

  • Infrastructure Management (Base Server Provisioning):

  • Expedited deployment of prerequisite services.
  • Intelligent handling of configuration file modifications.
  • Tools for managing installed service versions.

📄 Licensing Information

This software is distributed under the permissive MIT License. Feel free to incorporate it into your proprietary or open-source endeavors.

👤 Creator

Aindreyway

⭐ Endorsements

If this utility proves valuable to your workflow, consider bestowing a star (⭐️) upon the repository!

WIKIPEDIA REFERENCE: XMLHttpRequest (XHR) defines an application programming interface within JavaScript objects used to dispatch HTTP requests between a client's web browser and a remote web server. This mechanism allows client-side applications to initiate server communication subsequent to page rendering, receiving asynchronous data back. XHR is foundational to the concept of Ajax programming. Prior to its widespread adoption, interactions with servers relied almost exclusively on full page reloads triggered by hyperlink navigation or HTML form submissions.

== Chronology == The conceptual basis for XMLHttpRequest originated around the year 2000, developed by the engineering team behind Microsoft Outlook. This concept was first realized in Internet Explorer 5 (released in 1999). Importantly, the initial implementation did not utilize the standardized identifier XMLHttpRequest; instead, proprietary syntax such as ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP") was employed. By the release of Internet Explorer 7 in 2006, this identifier achieved near-universal support across all mainstream browser platforms, including Mozilla’s Gecko engine (2002), Safari 1.2 (2004), and Opera 8.0 (2005).

=== Standardization Efforts === The World Wide Web Consortium (W3C) published its initial Working Draft specification for the XMLHttpRequest object on April 5, 2006. A subsequent Level 2 specification, introducing capabilities for event progress monitoring, cross-origin request facilitation, and byte stream handling, was released on February 25, 2008. By the end of 2011, the features defined in Level 2 were integrated back into the primary specification document. Development oversight transitioned to the WHATWG consortium in late 2012, which now maintains the active document using Web IDL definitions.

== Standard Utilization Pattern == The typical process for dispatching a request using XMLHttpRequest involves several discrete programming operations:

  1. Instantiation: Create an XMLHttpRequest object instance via its constructor.
  2. Configuration: Invoke the open() method to define the request methodology (GET/POST, etc.), specify the target Uniform Resource Identifier (URI), and select between synchronous or asynchronous execution.
  3. Event Binding (Asynchronous Mode): For non-blocking operations, attach a listener function to monitor changes in the request state.
  4. Transmission: Initiate the request lifecycle by calling the send() method, optionally providing data payload.
  5. Response Handling: Monitor state transitions within the event listener. Upon successful completion (state 4, the "done" state), the server response payload is typically accessible via the responseText property.

Beyond these core steps, XHR offers numerous controls over request behavior. Custom headers can be prepended to guide server processing, and data can be streamed to the server via the send() argument. Responses can be deserialized from JSON text into native JavaScript objects, or processed incrementally as data arrives rather than waiting for the complete transfer. Furthermore, requests can be terminated prematurely or assigned a finite timeout period for failure detection.

== Cross-Domain Communication Hurdles ==

In the nascent stages of the World Wide Web architecture, it became apparent that unrestricted cross-origin data retrieval posed significant security risks, leading to the implementation of the Same-Origin Policy (SOP).

See Also

`