agentscope-ai / agentscope-ai/QwenPaw

Enable per-chat MCP server selection and granular tool-level control, allowing users to choose which MCP servers and specific tools to enable for each individual conversation

Aberta
#6,227 1 comentário 1 reação 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
Python
Estrelas
34.9k
Forks
3.1k
Merge médio
1d 15h
PRs com merge (30d)
225

Descrição

## Summary

Enable per-chat MCP server selection and granular tool-level control, allowing users to choose which MCP servers and specific tools to enable for each individual conversation.

## Component(s) Affected

- [x] Core / Backend (app, agents, config, providers, utils, local_models)
- [x] Console (frontend web UI)
- [ ] Channels (DingTalk, Feishu, QQ, Discord, iMessage, etc.)
- [ ] Skills
- [ ] CLI
- [ ] Documentation (website)
- [ ] Tests
- [ ] CI/CD
- [ ] Scripts / Deploy

## Problem / Motivation

Currently, MCP servers and their tools are globally configured, affecting all chat sessions. Users cannot:
- Choose which MCP server to use on a per-chat basis
- Select specific tools from an MCP server (e.g., use 3 out of 12 available tools)
- Limit tool access for security or clarity in specific conversations

This creates issues for:
- **Security**: Unnecessary tool access in sensitive conversations
- **UX**: Cluttered tool lists when only a few tools are needed
- **Control**: No fine-grained permissions per conversation

## Proposed Solution

1. **Per-chat MCP server selection**: Add UI controls in the Console to enable/disable specific MCP servers for each chat session
2. **Tool-level granularity**: Allow users to toggle individual tools within an MCP server (checkbox list of available tools)
3. **Default behavior**: Keep "all enabled" as default for backward compatibility
4. **Session persistence**: Remember tool selections per chat session
5. **Visual indicators**: Show which tools/servers are active in the current chat

Implementation could include:
- Chat settings panel with MCP/tool toggles
- API parameter to filter available tools per session
- Config option for default tool selection behavior

## Alternatives Considered

- **Global configuration only**: Current approach; affects all chats equally
- **Verbal instructions**: Users can tell the agent which tools to use, but this relies on compliance and isn't enforced
- **Multiple agent profiles**: Create separate agents with different MCP configs, but this is cumbersome for per-chat needs

## Additional Context

- MCP documentation: https://qwenpaw.agentscope.io/docs/mcp
- Similar to how some platforms allow per-app permission controls
- Would align with QwenPaw's security-focused architecture (Tool Guard, File Guard, Sandbox)

## Willing to Contribute

- [ ] I am willing to open a PR for this feature (after discussion).

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.