Spaces:
Running
Running
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,55 +1,64 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
```sh
|
| 41 |
-
|
| 42 |
-
```
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
title: MCP test
|
| 4 |
+
sdk: gradio
|
| 5 |
+
emoji: π
|
| 6 |
+
colorFrom: blue
|
| 7 |
+
colorTo: green
|
| 8 |
+
short_description: This project demonstrates a simple Model Context Protocol (M
|
| 9 |
+
---
|
| 10 |
+
# MCP Demo Project
|
| 11 |
+
|
| 12 |
+
This project demonstrates a simple Model Context Protocol (MCP) server integration using Gradio and Python. It includes a sample database and basic server logic for experimentation and learning purposes.
|
| 13 |
+
|
| 14 |
+
## Project Structure
|
| 15 |
+
|
| 16 |
+
```
|
| 17 |
+
mcp_demo/
|
| 18 |
+
βββ app.py # Main application entry point
|
| 19 |
+
βββ requirements.txt # Python dependencies
|
| 20 |
+
βββ server.py # MCP server implementation
|
| 21 |
+
βββ data/
|
| 22 |
+
β βββ northwind.db # Sample SQLite database
|
| 23 |
+
βββ __pycache__/ # Python bytecode cache
|
| 24 |
+
```
|
| 25 |
+
|
| 26 |
+
## Features
|
| 27 |
+
- MCP server endpoint (compatible with Gradio MCP client)
|
| 28 |
+
- Example SQLite database (Northwind)
|
| 29 |
+
- Simple API for experimentation
|
| 30 |
+
|
| 31 |
+
## Setup Instructions
|
| 32 |
+
|
| 33 |
+
1. **Clone the repository** (if not already):
|
| 34 |
+
```sh
|
| 35 |
+
git clone <repo-url>
|
| 36 |
+
cd mcp_demo
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
2. **Install dependencies:**
|
| 40 |
+
```sh
|
| 41 |
+
pip install -r requirements.txt
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
3. **Run the server:**
|
| 45 |
+
```sh
|
| 46 |
+
python server.py
|
| 47 |
+
```
|
| 48 |
+
or
|
| 49 |
+
```sh
|
| 50 |
+
python app.py
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
4. **Access the MCP server:**
|
| 54 |
+
- The server will be available at `http://127.0.0.1:7860/gradio_api/mcp/sse` (or as configured in `.vscode/mcp.json`).
|
| 55 |
+
|
| 56 |
+
## Configuration
|
| 57 |
+
- The `.vscode/mcp.json` file contains the MCP server URL configuration for local or remote use.
|
| 58 |
+
|
| 59 |
+
## Requirements
|
| 60 |
+
- Python 3.8+
|
| 61 |
+
- pip
|
| 62 |
+
|
| 63 |
+
## License
|
| 64 |
+
This project is for educational and demonstration purposes.
|