概要
What is MCP Server?
MCP Server is a Python implementation of a Model Context Protocol (MCP) server that provides various tools for AI assistants to perform actions in a secure and controlled environment. It integrates with systems like PostgreSQL databases, Brave Search API, and project build tools (Maven/Gradle), targeting developers using AI assistants such as GitHub Copilot.
How to use MCP Server?
Install with Python 3.12+ (pip install -e . or uv pip install -e .), configure ~/.mcp-server/config.yml, then run python mcp_server_low.py with optional parameters --project-folder, --db-name, and --build-tool. For VS Code integration, add the server definition to github.copilot.advanced.mcp.servers in settings.json.
Key features of MCP Server
- Executes read-only SQL queries on a configured PostgreSQL database.
- Performs web searches using the Brave Search API.
- Makes HTTP GET and POST requests to arbitrary URLs.
- Runs Gradle and Maven tests with specified patterns.
- Integrates with VS Code and GitHub Copilot via stdio transport.
- Supports dynamic tool listing based on start arguments.
Use cases of MCP Server
- AI assistant executes read-only database queries during code review.
- Copilot searches the web for best practices or documentation.
- AI runs project tests (Gradle/Maven) to verify changes.
- Assistant fetches or posts data to external APIs via HTTP.
FAQ from MCP Server
What runtime does MCP Server require?
Python 3.12+ is required. PostgreSQL is needed for database tools, and a Brave Search API key for web search functionality.
How is MCP Server configured?
A configuration file at ~/.mcp-server/config.yml must specify OS, Brave Search settings, database connection profiles, and a browser command for opening URLs.
Can MCP Server run without a database?
The database configuration is optional. Use the --db-name parameter to activate it; if omitted, database tools are not available.
What transport does MCP Server use?
The server uses stdio transport for secure communication with MCP clients.
Does MCP Server support authentication?
The README does not mention any authentication mechanism beyond the API key stored in the config file.