Content
# brAIn (MCP Server)
A simple MCP server for storing and exporting AI conversation context. Clone and run locally!
## Features
- Store AI prompt/response pairs by project
- Search and export conversation history
- Export as a "brain file" bundle for use in other LLMs
- remote server link (rn only available for admin)- https://brainremote.fastmcp.app/mcp
## Prerequisites
### 1. Install Python 3.11
> ⚠️ Python 3.12+ causes package build errors. Use **Python 3.11** specifically.
1. Go to: https://www.python.org/downloads/release/python-3119/
2. Download **Windows installer (64-bit)**
3. Run the installer → ✅ Check **"Add Python to PATH"** → click **Install Now**
Verify:
```powershell
py -3.11 --version
# Expected: Python 3.11.x
```
### 2. Install Git (if not already)
```powershell
git --version
```
If not installed → download from: https://git-scm.com/download/win → install with default options.
## Step 1 — Clone the Repository
Open **PowerShell** or **VS Code terminal** and run:
```powershell
cd C:\Users\YourName
git clone https://github.com/deadw4lker/brAIn.git
cd brAIn
```
## Step 2 — Create Virtual Environment with Python 3.11
```powershell
py -3.11 -m venv .venv
```
Activate it:
```powershell
.venv\Scripts\Activate
```
You should see `(.venv)` at the start of your terminal line.
Confirm correct version:
```powershell
python --version
# Must say: Python 3.11.x
```
## Step 3 — Install Dependencies
```powershell
pip install --upgrade pip
pip install fastmcp uvicorn
pip install -r requirements.txt
pip install uv
```
## Step 4 — Test the Server
```powershell
python main.py
```
You should see:
```
INFO: Uvicorn running on http://127.0.0.1:8000
```
✅ Server is working. Press `Ctrl+C` to stop it.
If you get a missing module error, install it:
```powershell
pip install fastmcp uvicorn aiohttp aiosqlite
```
## Step 5 — Configure Claude Desktop
### Find the config file
Open `claude_desktop_config.json` in Notepad (create it if it doesn't exist).
### Edit the config
Select all (`Ctrl + A`), delete everything, and paste:
```json
{
"mcpServers": {
"brain": {
"command": "C:\\Users\\YourName\\brAIn\\.venv\\Scripts\\fastmcp.exe",
"args": ["run", "C:\\Users\\YourName\\brAIn\\main.py:mcp"]
}
}
}
```
> ⚠️ Replace `YourName` with your actual Windows username. Use **double backslashes** `\\` in all paths.
Save the file (`Ctrl + S`).
### Verify fastmcp.exe exists
Before restarting Claude, confirm the executable is there:
```powershell
dir C:\Users\YourName\brAIn\.venv\Scripts\fastmcp*
```
If `fastmcp.exe` is not listed, run:
```powershell
pip install fastmcp
```
## Step 6 — Restart Claude Desktop
1. Right-click the **Claude icon** in the system tray (bottom-right of taskbar)
2. Click **Quit**
3. Reopen Claude Desktop
## Step 7 — Verify Connection
In Claude Desktop go to **Settings → Local MCP Servers**.
You should see **brain** with a ✅ connected status and its available tools listed.
## Notes
- The server creates a `brain.db` SQLite file automatically in the project directory on first run.
- `libsql-experimental` is for Turso cloud database only — not needed for local use.
- Use **Python 3.11** for this project. Python 3.12+ and 3.14 cause build failures.
- The venv must be activated (`(.venv)` showing) before running any pip or python commands.
## Quick Reference — Config Template
```json
{
"mcpServers": {
"brain": {
"command": "C:\\Users\\YourName\\brAIn\\.venv\\Scripts\\fastmcp.exe",
"args": ["run", "C:\\Users\\YourName\\brAIn\\main.py:mcp"]
}
}
}
```
Config file location: `C:\Users\YourName\AppData\Roaming\Claude\claude_desktop_config.json`
## Usage
- Interact with the server using your own MCP-compatible client or scripts.
- See `main.py` and `memory.py` for available tools and endpoints.
## Development
- All code is in `main.py`, `memory.py`, and configuration files.
- To reset the database, simply delete `brain.db` and restart the server.
## Contributing
Pull requests are welcome! Please open an issue first to discuss major changes.
## License
MIT
---
**Note:** This server is both locally and remotely available, you can deploy it youself to fastmcp cloud or can use other services. For now each user will have their own local database. If you want to share data, export it using the provided tools and share the export files, not the database.
made by deadw4lker with ❤️