stacklok / stacklok/toolhive

Add LangChain agent example connecting to ToolHive vMCP

Open
#3,900 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2.2k
Forks
300
Avg merge
1d 15h
Merged PRs (30d)
184

Description

User Story

As a ToolHive user attempting to build my own agent service with LangChain, I have no
reference implementation showing how to securely connect a LangChain agent to MCP
servers managed by ToolHive. Without this, I have to figure out the integration from
scratch.

Description

Create a self-contained LangChain agent example in the toolhive repository that
demonstrates connecting to a ToolHive-managed vMCP endpoint with Okta OIDC auth. This
should show users a realistic, runnable path for building LangChain agents on top of
ToolHive's MCP infrastructure.

Requirements
  1. Create examples/agents/langchain/ directory with a runnable Python example
  2. Demonstrate how to initiate the SSO flow from the agent service to authenticate to a vMCP
  3. Show the agent invoking at least one MCP tool through the vMCP
  4. Include a README.md with prerequisites, setup steps, and how to run
  5. Keep dependencies minimal and pinned
Acceptance Criteria
  • Example is checked into examples/agents/langchain/ in the toolhive repo
  • A user can follow the README and run the example against their own vMCP
  • The example demonstrates successful tool invocation through the vMCP
  • The SSO flow is initiated from within the agent service
  • README explains what each part of the code is doing

Contributor guide

Open the contributing guide

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.

Research direction

Start by locating the ToolHive vMCP endpoint and Okta OIDC authentication entry points, then create the runnable Python example under examples/agents/langchain/. Add examples/agents/langchain/README.md with prerequisites, pinned dependencies, setup, and explanation; done means a user can run the example, complete SSO, and invoke an MCP tool through their vMCP.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, api, security
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.