|
1 | | -# MCPBro - Gemini Chatbot with MCP Tools |
| 1 | +This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-app`](https://nextjs.org/docs/app/api-reference/cli/create-next-app). |
2 | 2 |
|
3 | | -This project is a web-based chatbot powered by Google Gemini, utilizing the Model Context Protocol (MCP) to interact with external tools like filesystem access and memory. |
| 3 | +## Getting Started |
4 | 4 |
|
5 | | -## Features |
| 5 | +First, run the development server: |
6 | 6 |
|
7 | | -* **Web Interface:** Simple chat interface built with Flask and SocketIO. |
8 | | -* **Gemini Integration:** Uses the Google Generative AI SDK for chat responses. |
9 | | -* **MCP Tool Usage:** Connects to MCP servers (filesystem, memory) to provide tools to the Gemini model. |
10 | | -* **Real-time Communication:** Uses Flask-SocketIO for instant message updates. |
11 | | -* **Configuration:** Flexible configuration via `config.json` and environment variables. |
12 | | -* **Dependency Management:** Uses Poetry for managing Python dependencies. |
| 7 | +```bash |
| 8 | +npm run dev |
| 9 | +# or |
| 10 | +yarn dev |
| 11 | +# or |
| 12 | +pnpm dev |
| 13 | +# or |
| 14 | +bun dev |
| 15 | +``` |
13 | 16 |
|
14 | | -## Prerequisites |
| 17 | +Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. |
15 | 18 |
|
16 | | -* Python >= 3.13 |
17 | | -* [Poetry](https://python-poetry.org/docs/#installation) |
18 | | -* Node.js and npx (for running MCP servers like `@modelcontextprotocol/server-filesystem` and `@modelcontextprotocol/server-memory`) |
19 | | -* A Google Gemini API Key |
| 19 | +You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. |
20 | 20 |
|
21 | | -## Setup |
| 21 | +This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. |
22 | 22 |
|
23 | | -1. **Clone the repository:** |
24 | | - ```bash |
25 | | - git clone <your-repository-url> |
26 | | - cd mcpbro |
27 | | - ``` |
| 23 | +## Learn More |
28 | 24 |
|
29 | | -2. **Install dependencies:** |
30 | | - ```bash |
31 | | - poetry install |
32 | | - ``` |
33 | | - This will install all necessary Python packages based on the `poetry.lock` file. |
| 25 | +To learn more about Next.js, take a look at the following resources: |
34 | 26 |
|
35 | | -3. **Configure the application:** |
36 | | - * Copy the sample configuration file: |
37 | | - ```bash |
38 | | - cp bot_config/config.json.sample bot_config/config.json |
39 | | - ``` |
40 | | - * Edit `bot_config/config.json`: |
41 | | - * Set `gemini_api_key` to your Google Gemini API key (alternatively, set the `GEMINI_API_KEY` environment variable). |
42 | | - * Add the absolute paths to the directories you want the filesystem tool to access under `filesystem_target_directories`. |
43 | | - * Set `enable_memory_server` to `true` if you want to use the memory tool. |
44 | | - * (Optional) Edit `bot_config/system_instruction.md` to customize the chatbot's behavior and personality. |
| 27 | +- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. |
| 28 | +- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. |
45 | 29 |
|
46 | | -## Running the Application |
| 30 | +You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! |
47 | 31 |
|
48 | | -1. **Start the server:** |
49 | | - You can use the Poe the Poet task defined in `pyproject.toml`: |
50 | | - ```bash |
51 | | - poetry run poe start |
52 | | - ``` |
53 | | - Alternatively, run directly: |
54 | | - ```bash |
55 | | - poetry run python run.py |
56 | | - ``` |
| 32 | +## Deploy on Vercel |
57 | 33 |
|
58 | | -2. **Access the application:** |
59 | | - Open your web browser and navigate to `http://127.0.0.1:5000` (or the host/port specified in the console output). |
| 34 | +The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. |
60 | 35 |
|
61 | | -## Usage |
62 | | -
|
63 | | -* Type your messages into the input box and press Enter or click Send. |
64 | | -* The chatbot will respond, potentially using the configured MCP tools. |
65 | | -* Internal steps (like tool usage) will be displayed in the chat interface. |
66 | | -* Use the `/reset` endpoint (e.g., `http://127.0.0.1:5000/reset`) to clear the chat history. |
67 | | -* Use the `/debug` endpoint to view server-side debug logs. |
68 | | -
|
69 | | -## Key Dependencies |
70 | | -
|
71 | | -* Flask |
72 | | -* Flask-SocketIO |
73 | | -* Flask-Session |
74 | | -* gevent |
75 | | -* google-generativeai |
76 | | -* mcp |
77 | | -
|
78 | | -See `pyproject.toml` for the full list of dependencies. |
| 36 | +Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. |
0 commit comments