lg:mcp

lg:mcp is a command for Claude Code from TheLobbi/claude. It costs 23 tokens per session (4,583 once invoked), scanned A, original, MIT.

An integration command for MCP, a standard way for AI applications to expose or use tools through a server. It connects LangGraph agents to MCP servers or turns agents into MCP servers.

In plain words
What is it for?
Use it to publish an agent's capabilities as MCP tools, connect an agent to external MCP tools, configure transports such as standard input, server-sent events, or WebSockets, and test tool calls.
Why use it?
It removes the need to hand-write server wrappers, tool descriptions, connection settings, transport handling, and setup documentation.

Command for Claude Code

Written for Claude Code: arguments in frontmatter. Also seen: mentions Claude Code.

Part of the langgraph-architect plugin — 5 commands, 12 agents, 1 MCP server shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/thelobbi/claude/mcp
Clone the repo
git clone --depth 1 https://github.com/TheLobbi/claude

Made for: Claude Code.

Or install langgraph-architect, the plugin that ships this one along with the rest of its 5 commands, 12 agents, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lg:mcp

README.md
[![agentmods](https://agentmods.dev/badge/commands/thelobbi/claude/mcp.svg)](https://agentmods.dev/commands/thelobbi/claude/mcp)
Your own site
<a href="https://agentmods.dev/commands/thelobbi/claude/mcp"><img src="https://agentmods.dev/badge/commands/thelobbi/claude/mcp.svg" alt="Measured on agentmods" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,583 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.04583
Opus 5 $0.00012 $0.02292
Sonnet 5 $0.00005 $0.00917
Haiku 4.5 $0.00002 $0.00458

Measured today against content hash f0ef7cea0251, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

lg:mcp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured today.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.claude/plugins/langgraph-architect/commands/mcp.md · 797 lines

How it starts

The opening of the file, as written. The whole thing — 797 lines — stays where its author put it; the contents beside it link to each section on GitHub.

lg:mcp - Model Context Protocol Integration

Integrate LangGraph agents with MCP to expose agents as servers or consume external MCP tools.

Workflow Steps

Expose Agent as MCP Server

  1. Validate Project

    • Check project structure
    • Verify agent is functional
    • Validate configuration
  2. Generate MCP Server Code

    • Create server wrapper
    • Define tool schemas
    • Setup transport layer
    • Configure authentication (if enabled)
  3. Generate Tool Definitions

    • Extract agent capabilities
    • Create MCP tool schemas
    • Document parameters
    • Define return types
  4. Setup Transport

    • Configure stdio/SSE/WebSocket
    • Setup request handling
    • Configure streaming (if enabled)
    • Add error handling
  5. Generate Claude Config

    • Create claude_desktop_config.json
    • Add server configuration
    • Document setup instructions
  6. Create Tests

    • Add MCP server tests
    • Test tool invocation
    • Test streaming (if enabled)
    • Test error handling
  7. Update Documentation

    • Add MCP server docs
    • Document available tools
    • Add integration examples

Consume MCP Tools

  1. Connect to MCP Server

    • Load server configuration
    • Establish connection
    • Validate server availability
  2. Discover Tools

    • Query available tools
    • Parse tool schemas
    • Validate compatibility
  3. Generate Tool Wrappers

    • Create LangChain tool wrappers
    • Map MCP schemas to LangChain
    • Add type validation
  4. Integrate with Agent

    • Add tools to agent
    • Update tool list
    • Configure tool binding
  5. Update Tests

    • Add tool usage tests
    • Test MCP connection
    • Test tool execution
  6. Update Documentation

    • Document available MCP tools
    • Add usage examples

MCP Server Patterns

Stdio Transport (Default)

Best for Claude Desktop integration.

# mcp_server.py
import asyncio
from mcp.server import Server
from mcp.server.stdio import stdio_server
from mcp.types import Tool, TextContent

from src.graph import app

# Create MCP server
server = Server("langgraph-agent")

@server.list_tools()
async def list_tools() -> list[Tool]:
    """List available tools."""
    return [
        Tool(
            name="run_agent",
            description="Run the LangGraph agent",
            inputSchema={
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string",
                        "description": "Input message"
                    },
                    "thread_id": {
                        "type": "string",
                        "description": "Thread ID for conversation"
                    }
                },
                "required": ["message"]
            }
        )
    ]

@server.call_tool()
async def call_tool(name: str, arguments: dict) -> list[TextContent]:
    """Execute tool."""
    if name == "run_agent":
        message = arguments["message"]
        thread_id = arguments.get("thread_id", "default")

        config = {"configurable": {"thread_id": thread_id}}
        result = app.invoke({"messages": [message]}, config)

        return [
            TextContent(
                type="text",
                text=result["messages"][-1].content
            )
        ]

    raise ValueError(f"Unknown tool: {name}")

async def main():
    """Run MCP server."""
    async with stdio_server() as (read_stream, write_stream):
        await server.run(
            read_stream,
            write_stream,
            server.create_initialization_options()
        )

if __name__ == "__main__":
    asyncio.run(main())

Read the full file on GitHub · 797 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. today First seen · 797 lines · 23 tokens per session scan A f0ef7cea0251

Subscribe to this mod's changes

lg:mcp is a command published in the GitHub repository TheLobbi/claude (21 stars, last pushed yesterday), licensed MIT. It adds 23 tokens to every session and 4,583 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other commands, from other repositories

design-context-extract

Extract design DNA from app screenshots, live URLs, or screen recordings using Google Stitch — color palettes, typography, spacing tokens, component patterns, and motion specs as design-tokens.json or Tailwind config. Use when the user points to a screenshot, URL, or video and asks to extract or audit the design…

yonatangross/orchestkit · 84 tokens

design-import

Scaffolds React components from a Claude Design handoff bundle and stops at files on disk: no stories, no tests, no pull request. Use when handed a claude.ai/design URL or a local bundle file; when that same scaffold should carry on through test generation, browser verification and an opened PR, run /ork:design-ship…

yonatangross/orchestkit · 74 tokens

dev

One-command dev loop boot. Spins up portless (named HTTPS subdomain), emulate (stateful API mocks), the project's dev server, and an agent-browser session, all keyed to the current git branch. Use when starting a feature branch, switching worktrees, or returning to a project after a break. Skips silently with install…

yonatangross/orchestkit · 76 tokens

design-ship

One-shot pipeline turning a claude.ai/design link into a pull request: scaffold via /ork:design-import, stories and specs via /ork:cover, browser verification via /ork:expect, then open the PR. Use when a design link should come back as a PR with no intermediate steps; if all you need is the components written to…

yonatangross/orchestkit · 84 tokens

Hexagonal.Gatekeeper

Your role is to perform a deep, architecture-focused code review on a specific branch. You must validate that all changes strictly follow Hexagonal Architecture (Ports & Adapters) principles and align with the existing codebase patterns.

redhat-community-ai-tools/UnifAI · 0 tokens

gen-release-notes

Generate professional release notes following the Keep a Changelog standard.

existential-birds/amelia · 9 tokens