# agent-with-mcp.yamlagent: name: mcp_assistant instructions: | You are a helpful assistant with access to filesystem and time tools. Use the MCP tools when needed to help users with file operations or time queries. llm: gpt-4o-minimcp: servers: filesystem: command: npx args: - "-y" - "@modelcontextprotocol/server-filesystem" - "." env: {} enabled: true time: command: npx args: - "-y" - "@modelcontextprotocol/server-time" env: {} enabled: true
# multi-tool-agent.yamlagent: name: developer_assistant instructions: | You are a developer assistant with access to: - Filesystem operations (read, write, list files) - Time and date utilities - Web search capabilities Help users with development tasks, file management, and research. Always be helpful and accurate in your responses. llm: gpt-4o-minimcp: servers: # Local filesystem access filesystem: command: npx args: - "-y" - "@modelcontextprotocol/server-filesystem" - "." env: {} enabled: true # Time and date utilities time: command: npx args: - "-y" - "@modelcontextprotocol/server-time" env: {} enabled: true # Web search (requires API key) brave_search: command: npx args: - "-y" - "@modelcontextprotocol/server-brave-search" env: BRAVE_API_KEY: "${BRAVE_API_KEY}" enabled: true # GitHub integration (optional) github: command: npx args: - "-y" - "@modelcontextprotocol/server-github" env: GITHUB_TOKEN: "${GITHUB_TOKEN}" enabled: false # Enable when token is available
Run with:
export BRAVE_API_KEY="your-brave-api-key"export GITHUB_TOKEN="your-github-token" # Optionalpraisonai workflow run --file multi-tool-agent.yaml
Per-server tool filtering (tools.include/exclude keys) is not yet supported by the YAML/TOML MCP server schema. Apply filtering in Python via MCP(allowed_tools=...) after calling mcp.get_tools() in your application code.
# ❌ This does NOT work yetmcp: servers: filesystem: command: npx args: ["-y", "@modelcontextprotocol/server-filesystem", "."] tools: include: ["read_file", "list_directory"] # Not supported exclude: ["write_file", "delete_file"] # Not supported
mcp: servers: # Always enabled (no API key needed) filesystem: command: npx args: ["-y", "@modelcontextprotocol/server-filesystem", "."] enabled: true # Only enable if API key is available brave_search: command: npx args: ["-y", "@modelcontextprotocol/server-brave-search"] env: BRAVE_API_KEY: "${BRAVE_API_KEY}" enabled: "${BRAVE_API_KEY:+true}" # Enable only if BRAVE_API_KEY is set