Skip to main content
Glama

Modular Search MCP

by gautam-u

Modular Search MCP Extension

A VS Code extension that provides enhanced web search capabilities with content extraction and AI-powered summarization through a Model Context Protocol (MCP) server, integrated with GitHub Copilot Chat.

Features

  • 🔍 Enhanced Web Search: Advanced DuckDuckGo search with intelligent fallback results
  • 🕷️ Content Extraction: Automatic web scraping using Cheerio and Mozilla Readability
  • 🤖 AI Summarization: Intelligent content summaries with key points and keywords
  • Smart Performance: Configurable scraping limits (1-10 URLs) with rate limiting
  • 🛠️ Modular Design: Extensible architecture for future search providers (Confluence ready)
  • 📝 Rich Results: Detailed summaries with reading time, content type, and reference links
  • ⚙️ Configurable: Full VS Code settings integration for all features

Installation

  1. Download or clone this repository:
    git clone <repository-url> cd mcp-search
  2. Install and build:
    npm install npm run install-local

This will automatically build the extension, package it as a .vsix file, and install it in VS Code.

Manual Install

  1. Clone and build:
    git clone <repository-url> cd mcp-search npm install npm run package
  2. Install the generated .vsix file:
    • Open VS Code
    • Go to Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
    • Click the "..." menu and select "Install from VSIX..."
    • Select the generated duckduckgo-search-mcp-0.1.0.vsix file

Alternative Manual Install

You can also install via command line:

code --install-extension duckduckgo-search-mcp-0.1.0.vsix

Usage

In Copilot Chat

Once installed, you can use the following commands in GitHub Copilot Chat:

  • "Search ddg for TypeScript tutorials"
  • "Find information about VS Code extensions"
  • "Web search React best practices"

Example Interactions

You: Search ddg for MCP Model Context Protocol Copilot: I'll search DuckDuckGo for information about MCP Model Context Protocol. # Search Results for "MCP Model Context Protocol" *Found 5 results using DuckDuckGo in 847ms* ## 1. Model Context Protocol - Overview **URL:** https://modelcontextprotocol.io/ **Source:** DuckDuckGo **Summary:** The Model Context Protocol (MCP) is an open protocol that standardizes how applications provide context to LLMs...

Configuration

Configure the extension through VS Code settings:

Available Settings

  • modularSearchMcp.duckduckgo.rateLimit: Rate limit in milliseconds between requests (default: 1000)
  • modularSearchMcp.maxResults: Maximum number of search results (default: 10)
  • modularSearchMcp.enableLogging: Enable detailed logging for debugging (default: false)

Example settings.json

{ "modularSearchMcp.duckduckgo.rateLimit": 1500, "modularSearchMcp.maxResults": 8, "modularSearchMcp.enableLogging": true }

Testing

Test the MCP Server Standalone

You can test the MCP server independently:

npm run test-server

This starts the server in stdio mode for testing with MCP clients.

Debug Mode

Enable debug logging:

DEBUG=1 npm run test-server

Commands

The extension provides these VS Code commands:

  • Modular Search MCP: Restart Server: Restart the MCP server
  • Modular Search MCP: Show Status: Display server status and configuration

How It Works

  1. Extension Activation: The extension automatically registers an MCP server with VS Code
  2. MCP Integration: The server is made available to Copilot Chat through MCP protocol
  3. Search Processing: When you request a search, the server:
    • Validates the query
    • Applies rate limiting
    • Calls DuckDuckGo Instant Answer API
    • Formats results for AI consumption
    • Returns structured data to Copilot Chat

Architecture

┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐ │ VS Code │ │ MCP Server │ │ DuckDuckGo │ │ Extension │────│ (stdio) │────│ API │ │ │ │ │ │ │ └─────────────────┘ └──────────────────┘ └─────────────────┘ │ │ │ │ ▼ ▼ ┌─────────────────┐ ┌──────────────────┐ │ Copilot Chat │ │ Search Provider │ │ Integration │ │ (DuckDuckGo) │ └─────────────────┘ └──────────────────┘

Development

Project Structure

src/ ├── extension.ts # VS Code extension entry point ├── mcp-server.ts # MCP server implementation ├── server.ts # Standalone server entry point ├── providers/ │ ├── base.ts # Abstract search provider interface │ └── duckduckgo.ts # DuckDuckGo implementation ├── utils/ │ ├── logger.ts # VS Code logging utilities │ └── rate-limiter.ts # Request rate limiting └── types/ └── search.ts # TypeScript type definitions

Building

# Compile TypeScript npm run compile # Watch mode for development npm run watch # Clean build artifacts npm run clean

Future Enhancements

The modular architecture supports easy addition of new search providers:

  • Confluence: Internal documentation search (planned)
  • Elasticsearch: Custom search backends
  • GitHub: Repository and issue search
  • Notion: Workspace search

Troubleshooting

MCP Server Not Registered

  1. Check VS Code settings for mcp.servers configuration
  2. Restart VS Code
  3. Use command: "Modular Search MCP: Restart Server"

Search Not Working

  1. Enable logging: "modularSearchMcp.enableLogging": true
  2. Check Output panel: "Modular Search MCP"
  3. Verify internet connection for DuckDuckGo API
  4. Check rate limiting settings

Extension Not Activating

  1. Ensure VS Code version >= 1.99.0
  2. Check extension is enabled in Extensions view
  3. Look for errors in Developer Console (Help → Toggle Developer Tools)

API Limitations

  • DuckDuckGo: Public API with rate limiting, no authentication required
  • Rate Limits: Configurable, default 1 request per second
  • Results: Limited to instant answers and related topics

License

MIT License - see LICENSE file for details.

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

Support

For issues and questions:

  • Check the Issues page
  • Enable logging and check VS Code Output panel
  • Use "Show Status" command for configuration details
-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A VS Code extension that integrates DuckDuckGo web search capabilities with GitHub Copilot Chat through a Model Context Protocol server.

  1. Features
    1. Installation
      1. Quick Install (Recommended)
      2. Manual Install
      3. Alternative Manual Install
    2. Usage
      1. In Copilot Chat
      2. Example Interactions
    3. Configuration
      1. Available Settings
      2. Example settings.json
    4. Testing
      1. Test the MCP Server Standalone
      2. Debug Mode
    5. Commands
      1. How It Works
        1. Architecture
          1. Development
            1. Project Structure
            2. Building
          2. Future Enhancements
            1. Troubleshooting
              1. MCP Server Not Registered
              2. Search Not Working
              3. Extension Not Activating
            2. API Limitations
              1. License
                1. Contributing
                  1. Support

                    Related MCP Servers

                    • -
                      security
                      F
                      license
                      -
                      quality
                      Facilitates real-time tool discovery and documentation retrieval for command-line tools within a VSCode extension, using Express and SSE for secure and dynamic content streaming.
                      Last updated -
                      7
                      TypeScript
                    • -
                      security
                      A
                      license
                      -
                      quality
                      Provides web search functionality via DuckDuckGo for Claude Code and MCP-compatible clients, featuring advanced content exploration, navigation across search results, and detailed webpage analysis.
                      Last updated -
                      4
                      Python
                      MIT License
                    • A
                      security
                      A
                      license
                      A
                      quality
                      Enables AI agents and assistants like Goose or Claude to interact with VS Code through the Model Context Protocol.
                      Last updated -
                      76
                      10
                      69
                      TypeScript
                      Apache 2.0
                      • Apple
                    • A
                      security
                      F
                      license
                      A
                      quality
                      A server that provides DuckDuckGo search capabilities (text, image, news, video search and AI chat) through the Model Context Protocol.
                      Last updated -
                      5
                      5
                      Python
                      • Apple

                    View all related MCP servers

                    MCP directory API

                    We provide all the information about MCP servers via our MCP API.

                    curl -X GET 'https://glama.ai/api/mcp/v1/servers/gautam-u/mcp-search'

                    If you have feedback or need assistance with the MCP directory API, please join our Discord server