MCP Host Client Server SSE
@HanShan006
MCP Host Client Server SSE について
手搓MCP样例,使用SSE模式,访问本地数据。从Hosts到server全部代码演示。
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"MCP_Host_Client_Server_SSE": {
"command": "python",
"args": [
"create_database.py"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is MCP Host Client Server SSE?
MCP Host Client Server SSE is a natural language SQL database query system built on the Model Context Protocol (MCP). It integrates with OpenAI to convert natural language questions into SQL queries, using Server-Sent Events (SSE) for real-time communication between the host and server.
How to use MCP Host Client Server SSE?
- Clone the repository, install dependencies (
openai,mcp-framework,starlette,uvicorn). - Create a
config.inifile with your OpenAI API key. - Initialize the SQLite database:
python create_database.py. - Start the MCP server:
python mcp_server.py. - Run the host application:
python mcp_host.py.
Key features of MCP Host Client Server SSE
- MCP protocol-based server-client architecture
- Natural language to SQL query translation via OpenAI
- Real-time communication using Server-Sent Events (SSE)
- SQLite database integration with sample tables (users, orders)
- OpenAI/DeepSeek API integration
- Asynchronous support and full logging system
Use cases of MCP Host Client Server SSE
- Query all user information in natural language
- Retrieve specific user orders (e.g., "Show all orders of Zhang San")
- Get aggregated statistics (e.g., "Total consumption per user")
- Filter data by conditions (e.g., "Orders over 5000")
FAQ from MCP Host Client Server SSE
What are the prerequisites?
Python 3.8+, pip package manager, and an OpenAI API key.
How do I configure the API key?
Create a config.ini file in the project root and add [secrets] API_KEY=your_api_key_here.
Which database does it use?
SQLite. Sample tables users and orders are created by create_database.py.
Which language models are supported?
The system integrates both OpenAI and DeepSeek APIs for natural language processing.
What transport protocol is used?
Server-Sent Events (SSE) for real‑time streaming of query results from the MCP server to the host.
「その他」の他のコンテンツ
Unity MCP ✨
justinpbarnettUnity MCP acts as a bridge between AI assistants and your Unity Editor. Give your LLM tools to manage assets, control scenes, edit scripts, and automate tasks within Unity.
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
Blender
ahujasidOpen-source MCP to use Blender with any LLM

Peekaboo MCP – lightning-fast macOS screenshots for AI agents
steipetePeekaboo is a macOS CLI & optional MCP server that enables AI agents to capture screenshots of applications, or the entire system, with optional visual question answering through local or remote AI models.
Nginx UI
0xJackyYet another WebUI for Nginx
コメント