Skip to main content
Glama
README.md
# :link: Langdock MCP Server

[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)
[![MCP](https://img.shields.io/badge/MCP-compatible-green.svg)](https://modelcontextprotocol.io/)

**Complete Model Context Protocol server for the Langdock API -- 35 tools.**

A fully-featured MCP server that exposes the entire Langdock platform to any MCP-compatible client. Includes an AutoGen multi-agent team for advanced orchestration.

## Tool Categories

| Category | Tools | Description |
|----------|-------|-------------|
| **Agent Management** | 7 | Create, get, update, disable agents; chat; upload files; list models |
| **Completions** | 4 | OpenAI, Anthropic, Google Gemini, Mistral -- EU GDPR-compliant proxy |
| **Knowledge Folders** | 4 | Upload documents, semantic search, list, delete |
| **Integrations** | 5+ | CRUD operations, actions, triggers, auth management |
| **User Management** | 3 | List, invite, update users |
| **Usage & Audit** | 2 | Export usage data, query audit logs |
| **+ more** | | 35 tools total |

## Setup

```bash
git clone https://github.com/Flissel/langdock-mcp.git
cd langdock-mcp
pip install -r requirements.txt

# Set your API key
export LANGDOCK_API_KEY="your-key-here"

# Start the MCP server
python server.py
```

## Usage

### As an MCP server

Add to your MCP client configuration:

```json
{
  "mcpServers": {
    "langdock": {
      "command": "python",
      "args": ["server.py"],
      "env": {
        "LANGDOCK_API_KEY": "your-key-here"
      }
    }
  }
}
```

### AutoGen multi-agent team

```bash
python team.py
```

The included `team.py` sets up an AutoGen multi-agent team that coordinates through the Langdock API for complex workflows.

### Example: Chat with an agent

```python
# Via MCP tool call
langdock_agent_chat(agent_id="abc123", message="Summarize Q1 results")
```

### Example: GDPR-compliant completion

```python
# Routes through Langdock's EU infrastructure
langdock_completion(provider="openai", model="gpt-4o", messages=[...])
```

## Project Structure

```
langdock-mcp/
  server.py          # MCP server entry point
  team.py            # AutoGen multi-agent team
  tools/
    agents.py
    completions.py
    knowledge.py
    integrations.py
    users.py
    usage.py
    audit.py
  requirements.txt
```

## License

MIT -- Felix Baumann ([@Flissel](https://github.com/Flissel))