[FEATURE] Background execution of MCP tools
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
I'm working on an MCP tool that can take a few minutes of more to execute (deep research), and one drawback of modeling a tool this way is that it blocks the chat until the tool is done executing. I'd like Claude to be able to continue working while long-running tools are running.
Proposed Solution
I'd like a way for Claude to execute a tool in the background, just like it can do with the Bash toolset. When a tool executed this way completes, Claude will get a notification of some kind indicating that it should get the result of the tool call. There probably wouldn't be a way to get incremental output, but that's fine for my purposes.
Alternative Solutions
I can split up these tools into a pseudo job-tracking system (e.g. start_research_job and get_research_job), but then I need to waste messages to track the job state constantly. Additionally, Claude gives up checking the job state after a while, which is also undesirable.
Priority
Medium - Would be very helpful
Feature Category
MCP server integration
Use Case Example
- I'm working on an application and am still learning about the nuances of the technology, so I ask Claude to use my research tools to generate a report about the subject (for both me and Claude itself), but to continue working with what we know while the research is ongoing.
- Claude runs the tool in the background, and gets to work with the context it has.
- My research tool completes (possibly 8-10 minutes later) and Claude sees the tool call get marked as complete.
- Claude retrieves the tool call results and sees the research report, going back and making adjustments to the application based on any new findings.
Additional Context
The specific project I'm working on (based loosely on the claude.ai one): https://github.com/karashiiro/research-mcp
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗