stacklok / stacklok/toolhive

Add LangGraph agent example connecting to ToolHive vMCP

Open
#3,901 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 LangGraph, I have no
reference implementation showing how to securely connect a LangGraph workflow to MCP
servers managed by ToolHive. Without this, I have to figure out the integration from
scratch.

Description

Create a self-contained LangGraph agent example in the toolhive repository that
demonstrates connecting a LangGraph graph/workflow to a ToolHive-managed vMCP endpoint
with Okta OIDC auth. LangGraph's graph-based architecture is popular for more complex
agentic workflows; this example should show how to wire MCP tool calls into a LangGraph
node.

Requirements
  1. Create examples/agents/langgraph/ 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 via a LangGraph node
  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/langgraph/ in the toolhive repo
  • A user can follow the README and run the example against their own vMCP
  • The example demonstrates a LangGraph graph invoking at least one MCP tool
  • The SSO flow is initiated from within the agent service
  • README explains the LangGraph graph structure and how MCP fits in

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 with the new examples/agents/langgraph/ directory and its README.md, using the issue requirements as the implementation checklist. Build a runnable Python example that initiates SSO from the agent service, connects to a ToolHive-managed vMCP endpoint, and invokes an MCP tool through a LangGraph node. Done means the README covers prerequisites, setup, dependencies, graph structure, and running the example against a user's vMCP.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.