Skip to content

feat: Http based register tool adapters #1642

@jalpp

Description

@jalpp

Is your feature request related to a problem? Please describe.

Currently most mcp servers call external systems via tools, and mostly use HTTP api calls, at typescript level axios or fetch is mainly used, this can be abstracted in SDK itself so rather than calling registerTool, there can be registerHttpTool, or registerGetTool etc

Describe the solution you'd like

Ideally SDK should have this out of the box, if a tool's job is just to call external system and format the response than call back and annotations can be pre filled, maybe using axios under the hood would work, but its annoying that for simple HTTP based tool, I need to write same code again, which can care by MCP SDK because in general Tools are designed to call external API systems.

Describe alternatives you've considered

I did create my own little library to wrap my idea into adapters which can be found here https://github.com/jalpp/mcp-adapter , the thing is this library uses MCP sdk's types and is really coupled to it, to be honest MCP SDK can easily add something like this to SDK itself, this was like a POC library I used in my small project. I do imagine many devs are writing same axios/fetch call backs for simple mcp tools which can easily be abstracted away into adapters.

Additional context
Add any other context or screenshots about the feature request here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementRequest for a new feature that's not currently supported

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions