Skip to content

Retrieve server details such as name, version, capabilities, instructions #6

@Floriferous

Description

@Floriferous

MCP servers expose a lot of things that would be helpful to get from the hook as well. It would be great to just retrieve anything that the server can provide so the consumers of this hook can do what they want with it.

I would assume something like this:

const { server, tools } = useMcp("...");

server.name
server.version
server.instructions
server.capabilties
etc.

Maybe the next generation would put the tools in this server object as well:

const { server: { tools } } = useMcp("...");

// And expand
const { server: { tools, ressources } } = useMcp("...");

// Or flatten it out, but this mixes the result of the server with the 
// other meta arguments such as state, retry, etc., maybe not the clearest design
const { tools, ressources } = useMcp("...");

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions