Inspiration

A community lending desk has a recurring coordination problem: someone returns a useful item, and a volunteer has to find the next waiting person. A reservation, a message and a physical pickup are different events. BorrowRelay keeps those states distinct and automatically offers a returned item to the next person in line.

What it does

BorrowRelay exposes inventory, a FIFO waitlist and handover operations through a working MCP server. An available item produces an offer; an item on loan produces a waiting request. A confirmed return records the event and offers the item to the first waiting member in one transaction. The operator confirms physical custody. No email, payment or device command is sent.

The demo uses a deterministic operator console with synthetic people and inventory. A conversational model is not bundled. This is the self-hosted MCP server path for Alexa+; no live Alexa+ integration is claimed.

How we built it

The official MCP Python SDK serves six tools over Streamable HTTP and negotiates protocol version 2025-11-25. The browser console calls that same endpoint. SQLite stores requests, events and operation responses. Transactions and partial unique indexes prevent conflicting active loans. Operation keys make retries safe and reject conflicting reuse.

The captioned video records actual responses from a running local server, including request, pickup, waiting, return, next offer and a retried return. It is not an Alexa screen recording.

Challenges and evidence

The main challenges were distinguishing offers from pickups and preventing a retried return from advancing the queue twice. Eleven domain tests cover transitions, concurrent requests, retries and restart persistence. One real SDK transport integration test verifies initialization, discovery, the complete workflow, invalid calls and rejection of an untrusted Origin. All 12 tests passed. A browser walkthrough independently confirmed the same flow.

Accomplishments

A complete local loop works: request → confirmed pickup → another requester waits → confirmed return → automatic offer to the next person. The operator can inspect inventory, the persistent activity log and actual MCP exchanges.

What we learned

Coordination cannot establish physical truth: an intent to return an item does not prove it changed hands. Retry safety also matters to users: a lost response must not create a duplicate request or handover.

What's next

Authenticated member onboarding, operator permissions, offer expiry and a tested Alexa+ host connection. This version runs on loopback with synthetic data. We have not measured real adoption or time saved.

Open source and AI disclosure

The complete project-specific source and MIT license are public at https://github.com/rnfjddl2-cmd/borrowrelay, with setup instructions and validation evidence. OpenAI Codex assisted with design, implementation, tests, styling, documentation and the scripted live walkthrough under the account owner's direction during the hackathon window. The official MCP SDK and dependencies are reused packages documented in THIRD_PARTY.md. No third-party music, footage, sponsor logo or real member data is used. No paid API or AWS service is required.

Built With

Share this project:

Updates

Submission history