gpt-mcp-server

TroyBuildsGIT/gpt-mcp-server

3.1

If you are the rightful owner of gpt-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 dayong@mcphub.com.

The GPT MCP Server is a Model Context Protocol server optimized for deployment on Vercel, offering AI tools for GitHub, Google Drive, and filesystem operations.

Tools
9
Resources
0
Prompts
0

GPT MCP Server

A Model Context Protocol (MCP) server designed for deployment on Vercel, providing AI tools for GitHub, Google Drive, and filesystem operations.

🚀 Features

  • GitHub Integration - Search code, read files, create issues
  • Google Drive Integration - Search files, read documents with OAuth2
  • Filesystem Operations - Sandboxed file read/write operations
  • Auth0 Authentication - Secure OAuth flows for external services
  • Vercel Ready - Optimized for serverless deployment

📋 Available Tools

GitHub Tools

  • github.search_code - Search code across GitHub repositories
  • github.get_file - Read file contents from GitHub repositories
  • github.create_issue - Create new issues in repositories

Google Drive Tools

  • googleDrive.search_files - Search files in Google Drive
  • googleDrive.read_file - Read and export Drive documents

Filesystem Tools

  • filesystem.read_file - Read files from sandboxed storage
  • filesystem.write_file - Write files to sandboxed storage
  • filesystem.list_files - List files in directories
  • filesystem.delete_file - Delete files from storage

🔧 Setup

Environment Variables

Create a .env.local file with:

# Auth0 Configuration
AUTH0_DOMAIN=your-auth0-domain.auth0.com
AUTH0_CLIENT_ID=your-client-id
AUTH0_CLIENT_SECRET=your-client-secret
AUTH0_REDIRECT_URI=https://your-app.vercel.app/api/auth/callback

# GitHub Configuration
GITHUB_TOKEN=your-github-personal-access-token

# Google Drive Configuration
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
GOOGLE_REDIRECT_URI=https://your-app.vercel.app/api/auth/callback

Installation

npm install
npm run build
npm run dev  # For local development

🌐 API Endpoints

  • GET /api/list-tools - List all available tools
  • POST /api/run-tool - Execute a specific tool
  • GET /api/auth/start?service=github - Start OAuth flow
  • GET /api/auth/callback - Handle OAuth callback

🔒 Security Features

  • Sandboxed Filesystem - All file operations restricted to temporary directory
  • OAuth Authentication - Secure token handling for external services
  • Path Validation - Prevents directory traversal attacks
  • Environment Isolation - Secrets managed via environment variables

📦 Deployment to Vercel

  1. Connect your repository to Vercel
  2. Set environment variables in Vercel dashboard
  3. Deploy automatically on push to main branch
# Or deploy manually
npx vercel --prod

🛠️ Development

# Type checking
npm run type-check

# Local development
npm run dev

# Production build
npm run build

📚 Tool Usage Examples

GitHub Code Search

curl -X POST /api/run-tool \
  -H "Content-Type: application/json" \
  -d '{"name": "github.search_code", "args": {"query": "react hooks"}}'

Google Drive File Search

curl -X POST /api/run-tool \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{"name": "googleDrive.search_files", "args": {"query": "name contains \"document\""}}'

Filesystem Operations

curl -X POST /api/run-tool \
  -H "Content-Type: application/json" \
  -d '{"name": "filesystem.write_file", "args": {"path": "test.txt", "content": "Hello World"}}'

🤝 Contributing

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

📄 License

MIT License - see LICENSE file for details

🔧 Technical Details

  • Runtime: Node.js 18+
  • Framework: Vercel Functions
  • Language: TypeScript
  • APIs: GitHub REST API, Google Drive API v3, Auth0 Management API
  • Authentication: OAuth2 + Auth0
  • Storage: Temporary filesystem (ephemeral)

📞 Support

For issues and questions:

  1. Check the GitHub issues
  2. Review the API documentation
  3. Verify environment variables
  4. Test authentication flows

Built with ❤️ for AI-powered automation