basicsearch / README.md
ocx2025's picture
updates
8027f40
metadata
title: Basicsearch
emoji: 🦀
colorFrom: purple
colorTo: indigo
sdk: docker
app_port: 7860
pinned: false
short_description: MCP server for YouTube video search

Basicsearch MCP Server

This is an MCP (Model Context Protocol) server that provides YouTube video search functionality.

Features

  • Search YouTube videos using the YouTube Data API v3
  • Returns video titles, IDs, and descriptions

Configuration

Environment Variables

  • YOUTUBE_API_KEY: Your YouTube Data API v3 key (required)
  • PORT: HTTP server port (optional, default: 7860)

Local Setup

Create a .env file in the project root:

YOUTUBE_API_KEY=your_youtube_api_key_here

Hugging Face Spaces

Set the YOUTUBE_API_KEY in your Space's Repository secrets (Settings → Repository secrets)

Local Development

MCP Server (STDIO)

# Install dependencies
uv sync

# Run the server in development mode
uv run mcp dev server.py

HTTP Server (for testing Hugging Face deployment)

# Install dependencies
uv sync

# Run the HTTP wrapper
uv run python app.py

Then visit http://localhost:7860 for the health check or use the following endpoints:

  • GET / - Service info
  • GET /health - Health check
  • GET /tools - List available tools
  • POST /search - Search YouTube videos (JSON body: {"query": "your search", "max_results": 5})

Deployment to Hugging Face Spaces

  1. Push this repository to Hugging Face Spaces
  2. Set the YOUTUBE_API_KEY environment variable in your Space settings
  3. The Dockerfile will automatically be used to build and deploy the server

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference