anupj_github_file_search_mcp_

anupj_github_file_search_mcp_

by anupj
A GitHub code search tool implemented using the Model Context Protocol (MCP) for AI assistant integration.

GitHub Code Explorer with MCP Integration

Overview

This project demonstrates how to implement the Model Context Protocol (MCP) to create a GitHub code search tool that could be used by AI assistants. The application consists of a Node.js/Express backend that wraps the GitHub API, a browser client that simulates an AI assistant using the API, and MCP-compatible function definitions with JSON Schema.

What is Model Context Protocol?

Model Context Protocol is a standardized way for AI models to interact with external tools and services. It defines:
1. How functions are described to AI models
2. How AI models decide which functions to call
3. How parameters are structured and validated
4. How results are returned in a consistent format

Features

  • Search for code across GitHub repositories
  • View file contents from repositories
  • Search for GitHub repositories
  • Function discovery endpoint
  • AI assistant simulation interface

Installation

  1. Clone this repository
  2. Install dependencies:
    shell npm install
  3. Optional: Set up a GitHub API token as the environment variable GH_TOKEN for higher rate limits

Usage

  1. Start the server:
    shell npm start
    or for development with auto-reload:
    shell npm run dev
  2. Open your browser and navigate to http://localhost:3000
  3. Click "Load Available Functions" to see the API capabilities
  4. Type a query in the input box and press Enter to simulate an AI conversation

API Endpoints

  • GET /api/mcp/functions - List all available functions
  • POST /api/mcp - Call a function with parameters

Implementation Details

The application consists of:
- A Node.js/Express backend that wraps the GitHub API
- A browser client that simulates an AI assistant using the API
- MCP-compatible function definitions with JSON Schema

About

An example to demonstrate how to build and run an MCP server

Resources

Stars

1 star

Watchers

1 watching

Forks

0 forks

Report repository

Releases


No releases published

Packages 0


No packages published

Languages

Features & Capabilities

Categories
mcp_server model_context_protocol javascript nodejs express github_api search api_integration

Implementation Details

Stats

0 Views
1 GitHub Stars

Repository Info

anupj Organization

Similar MCP Servers

continuedev_continue by continuedev
25049
21423
9300