Skip to content

Add MCP server support to Dribdat#14

Open
loleg wants to merge 1 commit intomainfrom
feat-mcp-server-support-dribdat-api-auth-search-retrieve-data-hackathon-posts-projects-conveniently-9742420306395792374
Open

Add MCP server support to Dribdat#14
loleg wants to merge 1 commit intomainfrom
feat-mcp-server-support-dribdat-api-auth-search-retrieve-data-hackathon-posts-projects-conveniently-9742420306395792374

Conversation

@loleg
Copy link
Copy Markdown
Member

@loleg loleg commented Apr 6, 2026

This PR adds Model Context Protocol (MCP) server support to Dribdat, allowing AI agents to interact with hackathon data.

Key Changes:

  • MCP Server: A new blueprint in dribdat/public/mcp.py implements the MCP server using the mcp SDK. It provides tools for searching projects, retrieving event and project data, viewing activity feeds, adding posts, and updating project status.
  • Authentication: Users can now authenticate their MCP clients by visiting a new "Connect to MCP" page (accessible from their profile). This page generates a unique, persistent token that is used to verify the user's identity during the MCP session.
  • Remote Access: The server supports remote connectivity via Server-Sent Events (SSE) at /api/mcp/sse. This allows tools like Claude Desktop or custom agents to connect to a running Dribdat instance securely.
  • Database: Added an mcp_token column to the User model to store the unique connection tokens, with associated Flask-Migrate migrations.
  • UI Integration: Added a "Connect to MCP" button and information page for users to easily set up their agents.

Verification:

  • API Tests: Verified that the new blueprint doesn't break existing API routes.
  • Frontend Verification: Used Playwright to confirm the MCP authentication page renders correctly and provides the expected connection details.
  • Manual Review: Refactored the initial implementation to avoid using private SDK members and improved the robustness of the async/sync tool handling.

PR created automatically by Jules for task 9742420306395792374 started by @loleg

- Implement Model Context Protocol (MCP) server as a Flask blueprint.
- Add tools for event info, project search, project details, activities, and write operations (add post, update status).
- Implement browser-based authentication generating a unique `mcp_token` for users at `/mcp/auth`.
- Support remote access via Server-Sent Events (SSE) at `/api/mcp/sse`.
- Add `mcp_token` to `User` model with database migrations.
- Add "Connect to MCP" link to the user profile edit page.
- Ensure the server is robust and uses the official `mcp` SDK.

Co-authored-by: loleg <31819+loleg@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant