Supports Google OAuth 2.0 authentication for securing access to the MCP server endpoints.
Provides tools for interacting with a LangGraph agent deployed via LangGraph CLI, enabling invocation and streaming of agent responses, thread state management, and health checks through the LangGraph API.
Supports Okta OAuth 2.0 authentication for securing access to the MCP server endpoints.
Designed for ChatGPT Enterprise integration, providing SSE transport and MCP protocol compliance for connecting ChatGPT Enterprise to LangGraph agents.
MCP Server for LangGraph Agent
FastMCP-based Model Context Protocol server for ChatGPT Enterprise integration with LangGraph agent.
š Quick Start
The fastest way to get started:
This will:
Check if your LangGraph agent is running on port 2024
Start the MCP server on port 8000
Start the test UI on port 3005
Open http://localhost:3005 in your browser
Overview
This MCP server provides a standardized interface to interact with a LangGraph agent deployed on port 2024, compliant with ChatGPT Enterprise integration requirements.
⨠Latest Updates
January 2025 - LangGraph CLI Integration
ā Refactored to use LangGraph CLI API architecture
ā Updated to
/runs,/runs/stream,/okendpointsā Changed message format to
{"type": "human"}ā Added 3 new tools: health check, agent status, thread listing
ā Fixed all async operations (no more blocking calls)
ā Updated web UI to match new API structure
See REFACTORING_SUMMARY.md for detailed changes.
Features
ā MCP Protocol 2025-06-18 compliant
ā ChatGPT Enterprise compatible (SSE transport)
ā OAuth 2.0 Authentication - Google OAuth and API key support
ā FastMCP 2.13.0+ framework for production-ready deployment
ā LangGraph CLI API integration
ā 6 Tools: invoke_agent, stream_agent, check_system_health, check_agent_status, get_thread_state, list_threads
ā 2 Resources: Agent health check and server info
ā Prompts: Formatted agent queries
ā Web Test UI: Interactive testing interface on port 3005
ā Secure by Default: Optional authentication for production deployments
Installation
Install dependencies:
Configure environment (optional):
Generate credentials (if using OAuth):
See OAUTH_SETUP.md for detailed authentication setup.
Usage
Option 1: Quick Start Script (Recommended)
Option 2: Manual Start
Start MCP Server:
Start Test UI (optional):
Option 3: Using FastMCP CLI
Or using FastMCP CLI:
For local development (STDIO):
Custom transport:
Available Tools
1. invoke_agent
Execute a single invocation of the LangGraph agent.
2. stream_agent
Stream responses from the LangGraph agent.
3. get_agent_state
Retrieve the current state of a conversation thread.
Authentication
The MCP server supports three authentication methods for production deployments:
1. OAuth 2.0 (Google or Okta)
Enable user-based authentication with your preferred identity provider:
Google OAuth:
Okta OAuth:
OAuth Endpoints:
GET /auth/login- Initiate OAuth flowGET /auth/callback- OAuth callback handlerGET /auth/logout- LogoutGET /auth/status- Check authentication status
Quick Start Guides:
2. API Key Authentication
Use API keys for service-to-service authentication:
Using API Keys:
Testing Authentication
For detailed setup instructions, see
Resources
agent://health- Agent health checkagent://info- Agent capabilities and metadata
Prompts
agent_query_prompt- Format queries for the agent
ChatGPT Enterprise Integration
This server is designed for ChatGPT Enterprise integration with:
SSE Transport: Default transport for real-time streaming
MCP Protocol 2025-06-18: Latest stable protocol version
Proper Tool Schemas: Auto-generated from Python type hints
Context Support: Logging and progress reporting
Error Handling: Comprehensive error responses
ChatGPT Configuration
Add to your ChatGPT Enterprise MCP configuration:
Testing
Web UI Test Tool
We provide a beautiful web-based UI to test your MCP server and LangGraph agent:
Then open http://localhost:3005 in your browser to:
Test MCP server connectivity
Test LangGraph agent connectivity
Invoke agent with custom prompts
Stream responses in real-time
View activity logs
See web_ui/README.md for details.
Unit Tests
Run tests:
Run all tests:
Development
Project Structure
Adding New Tools
Adding Resources
Architecture
Production Deployment
With Authentication
Docker Deployment
License
MIT
References
This server cannot be installed