Skip to content

Conversation

@cashmeredev
Copy link

@cashmeredev cashmeredev commented Dec 30, 2025

pr for mcp service

Description

Motivation and Context

FIX #

Screenshots

API Changes

  • This PR includes API changes

Change Type

  • Bug fix
  • New feature
  • Performance improvement
  • Refactoring
  • Documentation
  • Dependency/Build system
  • Breaking change
  • Other (specify):

Testing Performed

  • Tested locally
  • Manual/QA verification

Checklist

  • Follows project coding standards and conventions
  • Documentation updated as needed
  • Dependencies updated as needed
  • No lint/build errors or new warnings
  • All relevant tests are passing

High-level PR Summary

This PR introduces MCP (Model Context Protocol) server integration to the agent system. It adds a new MCPService class that can load user-specific MCP server configurations from the database and expose their tools to the agent's toolset. The changes include a new database model MCPServerConfig for storing user-specific server configurations (supporting both stdio and HTTP transports), a service layer for managing MCP clients, and integration into the existing tool registry system. The langchain-mcp-adapters dependency is added to enable the integration.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 surfsense_backend/pyproject.toml
2 surfsense_backend/app/db.py
3 surfsense_backend/app/agents/services/__init__.py
4 surfsense_backend/app/agents/services/mcp_service.py
5 surfsense_backend/app/agents/new_chat/tools/registry.py
6 surfsense_backend/uv.lock

Need help? Join our Discord

Analyze latest changes

@vercel
Copy link

vercel bot commented Dec 30, 2025

@cashmeredev is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@recurseml recurseml bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on 2387004..22ce3bc

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (3)

surfsense_backend/app/agents/services/__init__.py
surfsense_backend/app/agents/services/mcp_service.py
surfsense_backend/pyproject.toml

⏭️ Files skipped (1)
  Locations  
surfsense_backend/uv.lock

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.

2 participants