Skip to content
Back to search

langgraph-mcp-playground

Minimal LangGraph starter: connect any LLM and MCP servers

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/hmooda-do--langgraph-mcp-playground/badge.svg)](/listings/hmooda-do--langgraph-mcp-playground)

HTML

<a href="/listings/hmooda-do--langgraph-mcp-playground"><img src="/api/listings/hmooda-do--langgraph-mcp-playground/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 52 lines
  1. # langgraph-mcp-playground
  2. A LangGraph ReAct agent that runs **locally** and on **DigitalOcean Managed Agents (MARS)**, with an LLM and MCP tools.
  3. MARS clones this repo at a pinned commit, runs `pip install -r requirements.txt`, and serves the graph in
  4. `langgraph.json` with `langgraph dev`. (A `langgraph.json` at the repo root with exactly one graph is required.)
  5. ```
  6. langgraph.json # one graph: agent -> my_agent/agent.py:make_graph
  7. requirements.txt # installed by MARS at boot
  8. agents.yaml # MARS agent spec (model, secrets, MCP tools, permissions)
  9. my_agent/
  10. agent.py # ReAct loop (agent <-> tools)
  11. llm.py # model factory (HARNESS_INFERENCE_* on MARS; or LLM_PROVIDER locally)
  12. tools.py # local tools + all MCP servers
  13. mcp_bridge.py # MCP -> LangChain tools (built on the `mcp` SDK)
  14. mcp_servers.json # your own MCP servers (local demo server by default)
  15. servers/demo_server.py
  16. scripts/pin_commit.py
  17. examples/ # 01 basic two-node graph, 02 one-shot MCP agent turn
  18. ```
  19. ## Run on MARS
  20. ```bash
  21. git push && python scripts/pin_commit.py # writes repo + HEAD sha into agents.yaml
  22. doctl agents start agents.yaml ... # see `doctl agents start --help`; the key is a tenant secret:
  23. # --secret HARNESS_INFERENCE_API_KEY=@$HOME/.inference_key
  24. ```
  25. Tools via MARS: list them under `tools:` in `agents.yaml`. MARS exposes each server's URL as
  26. `HARNESS_MCP_URL_<NAME>` (`do.actions` -> `HARNESS_MCP_URL_DO_ACTIONS`) and `my_agent/tools.py` loads every
  27. such variable automatically. Use `do.actions: [...]` for the managed Action Gateway catalog, or an inline
  28. `{name, url, auth}` entry for any remote https MCP server. Control access with `permissions:`.
  29. ## Run locally
  30. ```bash
  31. python3 -m venv .venv && source .venv/bin/activate
  32. pip install -r requirements.txt "langgraph-cli[inmem]"
  33. cp .env.example .env # set HARNESS_INFERENCE_* (any OpenAI-compatible endpoint) or LLM_PROVIDER + key
  34. python examples/02_mcp_agent.py "What is 17.5 + 24.25, and what time is it in UTC?"
  35. langgraph dev # same Agent Server MARS runs, with Studio
  36. ```
  37. ## MCP servers
  38. - **MARS-managed:** `tools:` in `agents.yaml` (above).
  39. - **Your own:** add to `mcp_servers.json` (`stdio` or `streamable_http`). Local stdio servers run in the sandbox too.
  40. Remote servers needing a token should use an inline `tools:` entry with `auth.secret` on MARS instead.
  41. > `langchain-mcp-adapters` is intentionally not used: it pins `mcp<2`, but the Agent Server needs `mcp>=2.3`.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.