RepoHop
Connect an agent

Letta

Connect RepoHop through a Letta host application that manages OAuth.

Letta supports Streamable HTTP MCP servers. Its Agent SDK does not open an interactive OAuth flow. The application that starts the Letta session must handle RepoHop sign-in, token storage and token refresh.

This setup is for the developer who owns the Letta application. Do not paste a short-lived RepoHop access token into a permanent Letta configuration.

Before you connect

Make sure RepoHop Local is online and at least one repository is approved. Keep all permissions except Read turned off. The host application also needs a secret store and a browser callback for OAuth.

Add RepoHop

Give the coding agent that owns your Letta application this prompt:

Add RepoHop to this Letta agent. Use https://repohop.app/api/mcp as a Streamable HTTP MCP server. Follow the server's OAuth discovery and register a public client through the advertised registration_endpoint. Use a hosted HTTPS redirect_uri that both the user's browser and this host can reach. Do not use localhost or 127.0.0.1 unless the browser and callback listener run on the same device. Then use Authorization Code with PKCE and refresh tokens. Do not reuse a hard-coded client_id or ask the user to provide one. Store the client registration and tokens only in the host's secret store. Never expose credentials to the model or logs. In the authorization request, request projects:read projects:write projects:exec projects:publish offline_access so RepoHop can offer every access level. RepoHop will grant only the permissions I select. Pass the current access token to the Letta MCP session through the Authorization header. Attach only tools present in the granted scope and call project_catalog. Require both the granted tool scope and each repository's project_catalog permissions before using a capability. Add a disconnect path that revokes RepoHop and deletes all stored RepoHop credentials.

The implementation is ready when it can:

  1. Start RepoHop sign-in in the user's browser.
  2. Finish the PKCE callback without exposing tokens to the model.
  3. Store and refresh both token types in the host application.
  4. Start a Letta session with only RepoHop read tools attached.
  5. Revoke access and delete stored tokens when the user disconnects.

See the Letta Agent SDK MCP documentation.

Approve access

Sign in to RepoHop in the browser. Check the client name, select the repository and approve Read access only. Then return to the Letta application and start a new session.

Test the connection

Ask the Letta agent:

Use RepoHop to list my approved repositories. Run project_status for the repository I choose, then read its README with project_read. Do not change files or run commands.

Check that the result matches your local checkout. Also confirm that no access token or refresh token appears in the model transcript or application logs.

Allow changes

Attach mutation tools only after you turn on the matching permission in both the repository and the RepoHop connection. Review every change locally. Keep Execute, Commit and Push unavailable unless the task needs them.

Remove RepoHop

Revoke the connection in RepoHop. Use the host application's disconnect path to remove the MCP server and delete its stored RepoHop tokens. Start a new Letta session and confirm that RepoHop tools are no longer available.

If OAuth or token refresh fails, do not replace it with a permanent access token. Fix the host flow or use Troubleshooting.

On this page