Skip to content

Support for MCP prompts and resources #544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
kboom opened this issue Apr 18, 2025 · 5 comments
Open

Support for MCP prompts and resources #544

kboom opened this issue Apr 18, 2025 · 5 comments
Labels
enhancement New feature or request

Comments

@kboom
Copy link

kboom commented Apr 18, 2025

Are there any plans to also support prompts and resources from MCP standard? Using tools alone is not that useful but prompts would be a gamechanger.

@kboom kboom added the enhancement New feature or request label Apr 18, 2025
@rm-openai
Copy link
Collaborator

How would you want to use this?

@orkunzozturk
Copy link

@rm-openai I can at least comment for the resources part. Resources would provide context for chats. I am using https://github.com/JettChenT/wechat-mcp which has a resource that consists of usernames and userId's. without this, I can't search the right user to send a message to.

@2anandkr
Copy link

2anandkr commented May 21, 2025

@rm-openai I am building a MCP server with tools, prompts and resources for my use case and would like to discover them with the client.

I see the current implementation in agents/mcp/server.py only fetches tools from the client session. Based on the spec., the mcp.ClientSession already exposes all these methods:

        async with ClientSession(...) as session:

            # Initialize the connection
            await session.initialize()

            # List available prompts
            prompts = await session.list_prompts()

            # Get a prompt
            prompt = await session.get_prompt(
                "example-prompt", arguments={"arg1": "value"}
            )

            # List available resources
            resources = await session.list_resources()

            # List available tools
            tools = await session.list_tools()

            # Read a resource
            content, mime_type = await session.read_resource("file://some/path")

            # Call a tool
            result = await session.call_tool("tool-name", arguments={"arg1": "value"})

but code at agents/mcp/server.py creates the session and only exposes list_tools and call_tool methods. Not sure why prompts and resources have been left out.

@rm-openai
Copy link
Collaborator

@2anandkr no reason, it just has low adoption afaik. PR welcome if you're up for it!

@2anandkr
Copy link

@2anandkr no reason, it just has low adoption afaik. PR welcome if you're up for it!

Sure! @rm-openai Will implement and create a PR soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants