Mcpassignment

Provides a Python MCP server exposing tools to fetch GitHub data, read files, and search local docs.
  • python

0

GitHub Stars

python

Language

6 months ago

First Indexed

3 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "sharath-ts-07-mcpassignment": {
      "command": "python",
      "args": [
        "server.py"
      ],
      "env": {
        "GITHUB_TOKEN": "YOUR_GITHUB_TOKEN",
        "GITHUB_REPO_NAME": "YOUR_REPOSITORY_NAME",
        "GITHUB_REPO_OWNER": "YOUR_GITHUB_USERNAME"
      }
    }
  }
}

You run a lightweight MCP server that exposes three practical tools to work with external data sources: fetch GitHub repository info, read file content from a repository, and search local documentation. This server enables you to build AI-assisted workflows that integrate external data sources into your models, while keeping interactions simple and testable from a small client.

How to use

You interact with the MCP server through a local client or directly from your development environment. Start the server, then run the test client to exercise all three tools. The server acts as an intermediary that fetches data from GitHub and from your local docs, returning structured results you can feed into AI models for analysis, summarization, or decision making.

How to install

Prerequisites you need to have installed on your machine before you begin:

  • Python 3.11 or newer
  • pip (comes with Python)

Next, set up the project structure and environment variables. Create a working directory and place the server and client files in it. Then create a virtual environment and install dependencies.

pip install mcp requests

Additional sections

Configuration and runtime details are provided below so you can run the server locally with your GitHub credentials and your documentation set.

Environment variables you need to configure in a file such as .env or your deployment environment include the following for GitHub access and repository interaction:

GITHUB_TOKEN=your_github_token_here
GITHUB_REPO_OWNER=your_github_username
GITHUB_REPO_NAME=your_repository_name

Run the MCP server and then test it with the client to verify that all three tools are functioning against real GitHub data and local docs.

# Start the MCP Server
python server.py

# Test the server with the client in another terminal
python client.py

Available tools

get_repository

Fetch repository information from GitHub, including metadata such as stars, forks, and default branch.

get_file_content

Read and return the content of a file in the specified GitHub repository.

search_docs

Search local Markdown documentation in the /docs folder and return matching content based on keyword queries.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational