my-first-mcp-server

sreerajchintham/my-first-mcp-server

3.2

If you are the rightful owner of my-first-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP Multi-Service Server is a comprehensive solution that integrates Google Colab, GitHub, and Google Docs with AI-powered analysis to automate development workflows.

Tools
  1. list_colab_files

    List notebooks in Google Drive.

  2. read_colab_notebook

    Read notebook content.

  3. generate_readme

    AI-powered README generation.

  4. list_github_repos

    List repositories with filters.

  5. analyze_github_repo_with_ai

    AI-powered analysis of GitHub repositories.

๐Ÿš€ MCP Multi-Service Server

A comprehensive Model Context Protocol (MCP) server that integrates Google Colab, GitHub, and Google Docs with AI-powered analysis for seamless development workflow automation.

Python MCP

๐ŸŒŸ Features

๐Ÿ”— Multi-Platform Integration

  • Google Colab - Notebook management and analysis
  • GitHub - Repository operations and code insights
  • Google Docs - Document management and resume building
  • AI Analysis - Powered by Google Gemini API

๐Ÿค– AI-Powered Capabilities

  • Smart README Generation - Create professional documentation from notebooks
  • Code Analysis - Comprehensive repository insights and summaries
  • Resume Building - Auto-generate project summaries for professional profiles
  • Intelligent Parsing - Extract libraries, dependencies, and project structure

โšก Automation Features

  • One-Click Repository Creation - Convert Colab notebooks to GitHub repos
  • Interactive Testing - Comprehensive test suite with user-friendly interface
  • Batch Processing - Handle multiple files and repositories efficiently
  • Fallback Modes - Graceful degradation when APIs are unavailable

๐Ÿš€ Quick Start

1. Clone and Install

git clone <https://github.com/sreerajchintham/my-first-mcp-server>
cd my-first-mcp-server
pip install -r requirements.txt

2. Configure APIs

# Set up Google APIs
python reauthorize_google_apis.py

# Create .env file
cp .env.example .env
# Edit .env with your API keys

3. Run the Server

python mcp_server.py

4. Test Everything

python test_client.py

๐Ÿ“‹ Prerequisites

  • Python 3.8+
  • Google Account with Drive access
  • GitHub Account with personal access token
  • Gemini API Key (optional, for AI features)

๐Ÿ› ๏ธ Installation

Option 1: Development Setup

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # Linux/Mac
# .venv\Scripts\activate   # Windows

# Install dependencies
pip install -r requirements.txt

Option 2: Production Setup

# Use locked versions for reproducibility
pip install -r requirements-lock.txt

โš™๏ธ Configuration

1. Google APIs Setup

  1. Create project in Google Cloud Console
  2. Enable Drive API and Docs API
  3. Create OAuth 2.0 credentials (Desktop app)
  4. Download client_secret.json โ†’ CREDENTIALS/client_secret.json
  5. Run authorization: python reauthorize_google_apis.py

2. GitHub API Setup

  1. Go to GitHub Settings > Personal Access Tokens
  2. Create token with repo and user scopes
  3. Add to .env file

3. Environment Variables

# .env file
GOOGLE_CREDENTIALS_DIR=./CREDENTIALS
GOOGLE_TOKEN_FILE=token.json
GITHUB_TOKEN=your_github_token_here
GEMINI_API_KEY=your_gemini_api_key_here  # Optional

๐Ÿ“š Usage

Interactive Mode

python test_client.py
  • Browse and analyze GitHub repositories
  • Generate AI-powered project summaries
  • Create professional documentation
  • Manage Google Docs integration

Programmatic Usage

from mcp.client.stdio import stdio_client
from mcp import StdioServerParameters

# Connect to MCP server
server_params = StdioServerParameters(
    command="python", 
    args=["mcp_server.py"]
)

# Use MCP tools
async with stdio_client(server_params) as (read, write):
    # ... MCP operations

๐Ÿ”ง Available Tools

Google Colab Tools

  • list_colab_files() - List notebooks in Google Drive
  • read_colab_notebook(file_id) - Read notebook content
  • generate_readme(file_id, file_name) - AI-powered README generation

GitHub Tools

  • list_github_repos() - List repositories with filters
  • read_github_repo_files(repo_name) - Analyze repository files
  • analyze_github_repo_with_ai(repo_name) - AI-powered analysis
  • create_github_repo() - Create repo from Colab notebook

Google Docs Tools

  • list_google_docs(search_term) - Find Google Docs
  • create_google_doc(title, content) - Create new Google Doc
  • add_to_google_doc(doc_id, content) - Add content to documents

Utility Tools

  • ping() - Test server connectivity
  • summarize_repo_analysis_for_resume() - Generate resume summaries

๐Ÿค– AI Analysis Types

TypeDescriptionUse Case
ComprehensiveFull analysis of code, docs, and structureComplete project overview
README OnlyFocus on documentation and descriptionsDocumentation review
Code OnlyDeep dive into code structure and logicTechnical assessment
StructureProject organization and architectureArchitecture review

๐Ÿ”— Key Features

GitHub Analysis to Google Docs Integration

  • Automatic Saving: Save AI-powered repository analysis directly to Google Docs
  • Document Options: Create new documents or add to existing ones
  • Professional Formatting: Clean, structured content with proper headings
  • Interactive Workflow: Prompted options after each analysis
  • Search & Select: Find and select existing documents by search term

Enhanced Google Docs Management

  • Document Creation: Create new Google Docs with initial content
  • Content Addition: Add formatted sections to existing documents
  • Document Search: Search and list documents by keywords
  • Document Linking: Direct links to created/updated documents

๐Ÿ“Š Integration Examples

Claude Desktop Integration

{
  "mcpServers": {
    "multi-service-server": {
      "command": "python",
      "args": ["/path/to/mcp_server.py"],
      "cwd": "/path/to/project",
      "env": {
        "GOOGLE_CREDENTIALS_DIR": "/path/to/CREDENTIALS",
        "GITHUB_TOKEN": "your_token_here"
      }
    }
  }
}

Resume Building Workflow

# 1. Analyze repository
analysis = await analyze_github_repo_with_ai("user/repo", "comprehensive")

# 2. Generate resume summary
summary = await summarize_repo_analysis_for_resume(
    "user/repo", 
    analysis, 
    "technical"
)

# 3. Add to Google Doc
await add_to_google_doc("doc_id", summary, "Projects")

GitHub Analysis to Google Docs Workflow

# 1. Analyze GitHub repository with AI
analysis = await analyze_github_repo_with_ai("user/repo", "comprehensive")

# 2. Option A: Create new document with analysis
doc_result = await create_google_doc(
    "GitHub Analysis - user/repo",
    analysis,
    "Repository Analysis"
)

# 2. Option B: Add analysis to existing document
await add_to_google_doc(
    "existing_doc_id",
    analysis,
    "GitHub Repository Analysis - user/repo"
)

๐Ÿ—๏ธ Project Structure

my-first-mcp-server/
โ”œโ”€โ”€ ๐Ÿ“„ mcp_server.py              # Main MCP server
โ”œโ”€โ”€ ๐Ÿงช test_client.py             # Interactive test suite
โ”œโ”€โ”€ ๐Ÿงช test_github_tool.py        # GitHub tool testing
โ”œโ”€โ”€ ๐Ÿ”ง debug_mcp_connection.py    # MCP connection debugging
โ”œโ”€โ”€ ๐Ÿ”‘ reauthorize_google_apis.py # Google OAuth setup
โ”œโ”€โ”€ โœ… validate_setup.py          # Dependency validation
โ”œโ”€โ”€ ๐Ÿ“‹ requirements.txt           # Python dependencies
โ”œโ”€โ”€ ๐Ÿ”’ requirements-lock.txt      # Locked versions
โ”œโ”€โ”€ ๐Ÿ“– README.md                  # Project documentation
โ”œโ”€โ”€ ๐Ÿ“– SETUP.md                   # Detailed setup guide
โ”œโ”€โ”€ ๐ŸŒ .env                       # Environment variables
โ”œโ”€โ”€ ๐Ÿ“ CREDENTIALS/               # OAuth credentials
โ”‚   โ”œโ”€โ”€ client_secret.json
โ”‚   โ””โ”€โ”€ token.json
โ””โ”€โ”€ ๐Ÿ“ support files/             # Configuration and support files
    โ”œโ”€โ”€ claude_desktop_config.json
    โ”œโ”€โ”€ cursor_mcp_config.json
    โ”œโ”€โ”€ cursor_mcp_config_final.json
    โ”œโ”€โ”€ CURSOR_FIX_GUIDE.md
    โ”œโ”€โ”€ CURSOR_SETUP_GUIDE.md
    โ”œโ”€โ”€ demo_readme.py
    โ”œโ”€โ”€ presentation_outline.md
    โ”œโ”€โ”€ render_deployment_guide.md
    โ””โ”€โ”€ run_env.py

๐Ÿ” Troubleshooting

Common Issues

IssueSolution
Google Auth ErrorRun python reauthorize_google_apis.py
GitHub API ErrorCheck token permissions and expiration
Gemini API ErrorVerify API key and quota limits
Import ErrorRun pip install -r requirements.txt

Debug Mode

import logging
logging.basicConfig(level=logging.DEBUG)

Validation Check

python validate_setup.py

๐Ÿงช Testing

Interactive Testing

python test_client.py

README Generation Demo

python demo_readme.py

Environment Verification

python run_env.py

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the file for details.

๐Ÿ™ Acknowledgments

  • Model Context Protocol - For the excellent MCP framework
  • Google APIs - For comprehensive service integration
  • GitHub API - For repository management capabilities
  • Google Gemini - For AI-powered analysis features

๐Ÿ“ž Support

  • ๐Ÿ“– Documentation: Check for detailed setup
  • ๐Ÿ› Issues: Report bugs via GitHub Issues
  • ๐Ÿ’ฌ Discussions: Use GitHub Discussions for questions
  • ๐Ÿงช Testing: Run python test_client.py for interactive debugging

โญ Star this repo if you find it helpful!

Made with โค๏ธ by the MCP community