"pre-connected" servers and sessions

Open
#86 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
r

Research direction

Start by reviewing the named entry points btw_mcp_session(), btw_mcp_server(), btw_app(), btw_tools(), and the callr::r_bg example. Determine whether pre-connected servers and sessions fit the project’s MCP approach or require simpler session communication, then define connection-status and reconnection behavior as the completion criteria.

Written by the indexing model from the issue text.

Description

@gadenbuie suggested something I thought was interesting...

Do I need to be careful about how many btw_mcp_servers() are running on a machine? Like would it be valid to do something like this?

# In a user-facing R sesssion
btw::btw_mcp_session()

# In a bg job session
proc_mcp_server <- callr::r_bg(btw::btw_mcp_server)
btw::btw_app()

with btw_app() swapping out btw_tools() for tools from the mcp server?

I guess the problem is that we’d also need to go through the “select R session process”. Maybe it’d be nice if there were a version of mcp server+session that come pre-connected, with some kind of way to check the connection status from the app session so we could either tell the user how to reconnect or do the reconnecting ourselves

Part of me feels like this could be quite useful, part of me thinks that situations like this (two R sessions, one launched by the other) are best addressed not with MCP but with simpler nanonext back-and-forth.

Dominant language
R
Stars
207
Forks
24
Avg merge
36m
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from posit-dev/mcptools

All issues in posit-dev/mcptools

Similar issues

More R issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.