Skip to content

Conversation

@simonpcouch
Copy link
Collaborator

Closes #5.

  • Removes all of the node-based functionality (for the most part, wiping the package entirely)
  • Pastes in @wch's gist as-is (thank you, Winston!)
  • Refactor to situate as package.

New in this PR relative the main:

  • The model has access to every tool defined by btw (including those that require a connection to the R session)
  • Greatly simplifies the installation process for R users
  • Writes out all of the tool descriptions from btw automatically

simonpcouch and others added 3 commits April 13, 2025 08:59
There's really no functionality to be preserved here:

* No longer need the node SDK + .ts interface to it
* `mcp_config()` isn't needed because the config paths won't depend on the installation path of the package.
* `run_proxy()` becomes exported function `mcp_proxy()`, and the script becomes a package source file. This will error out on interactive use.
* The server script becomes exported function `mcp_serve()`, which can only be used interactively. This function can be called in an `.Rprofile` to always start a server in new R sessions (but currently will error with more than one interactive R session).
* envvar `ACQUAINT_PORT` controls the port where the server is hosted, and envvar `ACQUAINT_LOG_FILE` controls where the proxy writes its logs to.
@simonpcouch simonpcouch merged commit 2e45168 into main Apr 14, 2025
6 checks passed
@simonpcouch simonpcouch deleted the proxy-5 branch April 14, 2025 14:27
cli,
curl,
ellmer,
httpuv,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The httpuv dependency can also be dropped.

return(NULL)
}

inputSchema <- compact(ellmer:::as_json(dummy_provider, tool@arguments))
Copy link
Contributor

@gadenbuie gadenbuie Apr 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ellmer need an as_json(NULL, ToolDef) method or something that makes this easier? (It'd roll up the lines below, too)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could there be something like McpProvider? The format of the tool needs to look like this: https://modelcontextprotocol.io/docs/concepts/tools#tool-definition-structure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ping the actual session

4 participants