You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MCP servers expose tools and resources. Resources are more and more used to help the LLM sort out what to with the tools and the context the MCP environnement and tool usage.
While Vibe CLI correctly discover the tools, it ignores the resources section which may lead to underperformance in tool usage or in the understanding of tool's output.
Proposed solution
Add the discovery of the tools
Extend tools.py - Add Resource Functions
asyncdeflist_resources_http(
url: str,
*,
headers: dict[str, str] |None=None,
auth: httpx.Auth|None=None,
startup_timeout_sec: float|None=None,
) ->list[dict[str, Any]]:
"""List all resources from an MCP server via HTTP transport."""
...
asyncdefread_resource_http(
url: str,
uri: str,
*,
headers: dict[str, str] |None=None,
auth: httpx.Auth|None=None,
startup_timeout_sec: float|None=None,
) ->list[dict[str, Any]]:
"""Read a resource from an MCP server via HTTP transport."""
...
# vibe/core/tools/mcp/tools.py# Add after create_mcp_stdio_proxy_tool_classdefcreate_mcp_resource_proxy_tool_class(
*,
url: str,
resource_uri: str,
alias: str|None=None,
server_hint: str|None=None,
headers: dict[str, str] |None=None,
auth: httpx.Auth|None=None,
startup_timeout_sec: float|None=None,
) ->type[BaseTool[_OpenArgs, MCPToolResult, BaseToolConfig, BaseToolState]]:
"""Create a tool class for reading MCP resources."""
...
Add Resource Listing Tool
# vibe/core/tools/mcp/registry.py# Add after _discover_resources_httpasyncdef_create_resource_listing_tool(
self, srv: MCPServer, resources: dict[str, _MCPResource]
) ->type[BaseTool] |None:
"""Create a tool for listing all resources from a server."""
...
Add stdio Support
# vibe/core/tools/mcp/tools.py# Add after the HTTP functionsasyncdeflist_resources_stdio(
command: list[str],
*,
env: dict[str, str] |None=None,
cwd: str|None=None,
startup_timeout_sec: float|None=None,
) ->list[dict[str, Any]]:
"""List all resources from an MCP server via stdio transport."""
...
asyncdefread_resource_stdio(
command: list[str],
uri: str,
*,
env: dict[str, str] |None=None,
cwd: str|None=None,
startup_timeout_sec: float|None=None,
) ->list[dict[str, Any]]:
"""Read a resource from an MCP server via stdio transport."""
...
Individual resources: <mcp_server_name>-mcp_read_resource_doc__tools__<tool_name> (auto-generated from URI)
Alternative Simpler Approach
Instead of creating one tool per resource, create two generic tools:
# vibe/core/tools/mcp/resource_tools.py (new file)classListResourcesTool(MCPTool):
"""List all resources from an MCP server."""# Implementation calls list_resources for the serverclassReadResourceTool(MCPTool):
"""Read a resource from an MCP server by URI."""# Takes URI as parameter
This would be easier to implement and result in only 2 new tools instead of N+1 tools.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Component
CLI
Problem statement
MCP servers expose tools and resources. Resources are more and more used to help the LLM sort out what to with the tools and the context the MCP environnement and tool usage.
While Vibe CLI correctly discover the tools, it ignores the resources section which may lead to underperformance in tool usage or in the understanding of tool's output.
Proposed solution
Add the discovery of the tools
Architecture Overview
New Components:
MCP Server (supports tools + resources)
↓
Vibe MCP Integration (maps tools + resources → Vibe tools)
↓
Vibe Agent (can call both tool and resource endpoints)
Tool Naming Convention:
Alternative Simpler Approach
Instead of creating one tool per resource, create two generic tools:
This would be easier to implement and result in only 2 new tools instead of N+1 tools.
In any case, happy to code it by myself.
Additional context
No response
Beta Was this translation helpful? Give feedback.
All reactions