Skip to content

Question: Support dynamic runtime registration of existing MCP servers? #1

@tomek-i

Description

@tomek-i

Hi, this project looks really cool and promising. From the examples, it seems especially useful when you’re creating your own tools as small JS apps.

I’m wondering about a slightly different use case: dynamically wrapping existing MCP servers instead of building new ones.

For example, there is already a GitHub MCP server available. Normally, you would register it conventionally and load all of its tools into the LLM context up front.

Instead, is it possible to do something like this:

  • Initially register only a lightweight “meta” tool with the LLM that says:

    “There is a GitHub MCP available. If you need to perform GitHub-related actions, dynamically register it.”

  • Then, when the user prompt is something like:

    “Create an issue on GitHub…”

    The system would:

    1. Dynamically register/connect to the GitHub MCP at runtime
    2. Trigger its OAuth flow (popup authentication handled already by the GitHub MCP)
    3. Fetch its available tools after authentication
    4. Invoke the appropriate tool (e.g., create issue)

In other words, can dynamic-mcp act as a lazy loader or runtime registry for already-existing MCP servers, instead of preloading all tools into the LLM context?

Is this supported today? Are there any examples of this pattern?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions