Skip to content

feat: add MCP tool execution logging and UI dashboard#1300

Closed
Pratham-Mishra04 wants to merge 1 commit into01-07-feat_plugin_schemas_segregation_for_mcp_pluginsfrom
01-08-feat_logging_plugin_extended_for_mcp_requests
Closed

feat: add MCP tool execution logging and UI dashboard#1300
Pratham-Mishra04 wants to merge 1 commit into01-07-feat_plugin_schemas_segregation_for_mcp_pluginsfrom
01-08-feat_logging_plugin_extended_for_mcp_requests

Conversation

@Pratham-Mishra04
Copy link
Copy Markdown
Collaborator

Summary

This PR adds comprehensive logging for MCP tool executions, enabling tracking, monitoring, and debugging of tool calls. It implements a dedicated database table for MCP tool logs with a complete UI for visualization and analysis.

Changes

  • Added a new mcp_tool_logs database table to store tool execution details
  • Implemented MCP plugin hooks to capture tool execution data before and after execution
  • Created API endpoints for querying and managing MCP tool logs
  • Built a new UI page for viewing, filtering, and analyzing MCP tool executions
  • Added real-time WebSocket updates for live monitoring of tool executions
  • Enhanced the agent execution flow to properly track tool calls with plugin hooks
  • Reduced verbose debug logging in MCP tool discovery

Type of change

  • Feature
  • Refactor

Affected areas

  • Core (Go)
  • Transports (HTTP)
  • Plugins
  • UI (Next.js)

How to test

  1. Start Bifrost with the logging plugin enabled
  2. Configure an MCP server with tools
  3. Make requests that use MCP tools (either via agent mode or direct tool calls)
  4. Navigate to the new MCP Logs page in the UI to view tool executions
  5. Test filtering, searching, and real-time updates
# Core/Transports
go test ./...

# UI
cd ui
pnpm i
pnpm build

Screenshots/Recordings

N/A - UI changes include a new MCP Logs page with filtering, search, and detailed views.

Breaking changes

  • No

Related issues

N/A

Security considerations

  • The logging system respects the content logging settings, allowing sensitive data to be excluded
  • Tool execution details are stored in the same database as other logs with similar access controls

Checklist

  • I added/updated tests where appropriate
  • I updated documentation where needed
  • I verified builds succeed (Go and UI)

Loading
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