Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
10d1858
Completed gateway tool db changes
madhav165 Jun 20, 2025
4b82cc8
Use drop down to select tools for server
madhav165 Jun 20, 2025
b0cd3c3
Improve UI for servers
madhav165 Jun 20, 2025
172056a
Testing tool invocation
madhav165 Jun 20, 2025
10da146
Partial fix for test tools
madhav165 Jun 20, 2025
34f2ae1
Fix tool calls
madhav165 Jun 22, 2025
9ce91f7
Working version
madhav165 Jun 22, 2025
ff2b455
Linting fixes
madhav165 Jun 22, 2025
35fc14f
Update CHANGELOG and add ADRs
madhav165 Jun 22, 2025
cd94ef4
Merge branch 'main' into tool-federation
crivetimihai Jun 23, 2025
b75d026
Minor change - check for name to raise name error
madhav165 Jun 23, 2025
5fe15e4
Testing replacing slugify
madhav165 Jun 23, 2025
259bb15
Testing slugify changes
madhav165 Jun 23, 2025
f46aa50
Slugify tool name also
madhav165 Jun 24, 2025
702127a
Change data type for ids in other files
madhav165 Jun 24, 2025
9c207eb
Notify gateway addition
madhav165 Jun 25, 2025
8706663
Merge branch 'main' into tool-federation
madhav165 Jun 25, 2025
cd16204
Minor change to html styling
madhav165 Jun 25, 2025
4c1423e
Remove slugify from pyproject
madhav165 Jun 25, 2025
91fbab2
Flake8 fix
madhav165 Jun 25, 2025
25ecda5
Fix test schemas
madhav165 Jun 25, 2025
7e61f21
Fix test_main
madhav165 Jun 25, 2025
4f83d1f
Clean up ping cancel in websocket transport
madhav165 Jun 26, 2025
4ba51b6
Fix most test cases
madhav165 Jun 26, 2025
5b1e22a
Fix smoketest
madhav165 Jun 26, 2025
40c8f0c
Handle REST tools
madhav165 Jun 26, 2025
0790aa6
Flake8 and test_tool fixes
madhav165 Jun 26, 2025
8b53160
Fix pytests
madhav165 Jun 26, 2025
40a9865
Minor change to test gateway
madhav165 Jun 26, 2025
3d0fb1c
Linting fixes
madhav165 Jun 26, 2025
38c8607
Minor test input changes
madhav165 Jun 26, 2025
86c3a35
flake8 fixes
madhav165 Jun 26, 2025
36af9ce
Add Alembic migration scripts
madhav165 Jun 26, 2025
2b2d842
Update image in docker compose
madhav165 Jun 26, 2025
44e0b04
Merge branch 'main' into tool-federation
crivetimihai Jun 27, 2025
49e77fe
Alembic testing and linting
crivetimihai Jun 27, 2025
5d0dfd6
updated alembic code
madhav165 Jun 27, 2025
317236f
make tools.name nullable in db
madhav165 Jun 27, 2025
87370e5
Update smoketest tool name to include gateway slug
crivetimihai Jun 27, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -244,3 +244,6 @@ RELOAD=false

# Enable verbose logging/debug traces
DEBUG=false

# Gateway tool name separator
GATEWAY_TOOL_NAME_SEPARATOR=-
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)

---


## [0.1.2] - 2025-06-27 (pending)

* Allow tool federation across gateways by **allowing tools of same names** from different MCP servers to be added.
* **Fix tool list refresh** from Deactivate/Activate cycles and Edit Gateway screen.
* **Improve tool selection experience for servers** by allowing selection based on name from a dropdown.


## [0.2.0] - 2025-06-24

### Added
Expand Down
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ COPY . /app
# Create virtual environment, upgrade pip and install dependencies using uv for speed
RUN python3 -m venv /app/.venv && \
/app/.venv/bin/python3 -m pip install --upgrade pip setuptools pdm uv && \
/app/.venv/bin/python3 -m uv pip install ".[redis,postgres]"
/app/.venv/bin/python3 -m uv pip install ".[redis,postgres,alembic]"

# update the user permissions
RUN chown -R 1001:0 /app && \
Expand Down
71 changes: 71 additions & 0 deletions alembic/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Database Migrations (Alembic)

This directory contains database migration scripts managed by Alembic. These scripts track and apply changes to the application's database schema over time.

The migration history for this project lives in the `alembic/versions/` directory.

---

## Common Workflow

The standard workflow involves creating, reviewing, and applying migrations.

- **To create a new migration:** `alembic revision --autogenerate -m "Your description"`
- **To apply migrations:** `alembic upgrade head`
- **To see migration history:** `alembic history`
- **To see the current version:** `alembic current`

---

### 1. Creating a New Migration

When you change a SQLAlchemy model (e.g., in `db.py`), follow these steps to generate a migration script:

**Step 1: Make your model changes.**
Add, remove, or alter columns and tables in your SQLAlchemy model definitions.

**Step 2: Autogenerate the script.**
Run the following command from the project's root directory. Use a short but descriptive message.

```bash
alembic revision --autogenerate -m "Add slug and url to gateways table"
```
**Step 3: Review and Edit the Script (CRITICAL STEP).**
A new file will be created in alembic/versions/. Always open and review this file.

Autogenerate is a starting point, not a final answer. It is good at detecting new columns and tables.

It often requires significant manual editing for complex changes like:

- Data migrations (populating new columns).

- Renaming columns or tables.

- Changes that require multi-stage operations (adding a column as nullable, populating it, then making it not-nullable).

- Ensure the upgrade() and downgrade() functions are correct and logical.

### 2. Applying Migrations

To upgrade your database to the latest version:
This command applies all pending migrations. This is the command used by developers locally and by the CI/CD pipeline during deployment.
```bash
alembic upgrade head
```

To test your downgrade path (local development only):
It's good practice to ensure your migrations are reversible.
#### Revert the very last migration
```bash
alembic downgrade -1
```
#### You can then re-apply it
```bash
alembic upgrade +1
```

### 3. Deployment Notes

**CI/CD:** During deployment, the alembic upgrade head command is run automatically to synchronize the database schema with the new application code before the server starts.

**Configuration:** The sqlalchemy.url in alembic.ini is replaced by the value set for DATABASE_URL environment variable, which env.py is configured to read.
33 changes: 0 additions & 33 deletions alembic/versions/1ebe90768201_initial_schema.py

This file was deleted.

Loading
Loading