What’s this for?This lets external AI tools (like Claude Desktop, Cursor, or other MCP clients) call your Langdock agents directly. Your agents become tools that any MCP-compatible application can use.
MCP Base URL
The Langdock MCP server is available athttps://api.langdock.com/mcp.
If your organization uses a dedicated Langdock deployment (custom domain), use your deployment’s endpoint instead: https://<your-domain>/api/public/mcp. Replace https://api.langdock.com/mcp with this URL throughout this guide.
Authentication
The MCP endpoint requires a valid Langdock API key with theAgent API scope.
Supported Authentication Methods
| Header Type | Header Format |
|---|---|
| Bearer | Authorization: Bearer <api-key> |
| X-API-Key | x-api-key: <api-key> |
Available Tools
The Langdock MCP Server exposes three tools:| Tool | Description |
|---|---|
find_agent | Search for an agent ID by name |
ask_agent | Send a prompt to an agent specified by its ID |
ask_custom_agent | Configure and query a custom agent on-the-fly |
find_agent
Use this to look up an agent’s ID when you only know its name. This is helpful when you want to callask_agent but need to find the correct agent ID first.
ask_agent
Send a prompt to a specific agent using its ID. The agent processes your request using its configured model, instructions, and connected integrations. For multi-turn conversations, pass previous turns through the optionalmessageHistory parameter. Each entry has a role of user or assistant and a content string. Order entries from oldest to newest; the current prompt is appended as the latest user turn.
ask_custom_agent
Create a temporary agent with custom settings for a single query. Useful when you need specific behavior without creating a permanent agent in Langdock.Connecting from Langdock
If you want to add this MCP server as an integration within Langdock itself:Related Documentation
- Model Context Protocol (MCP) - Learn about MCP and how to connect other MCP servers
- MCP Server Directory - Browse official MCP servers
- Agents API Guide - Use the Agents API directly
FAQ
When should I use the Langdock Agent MCP Server?
When should I use the Langdock Agent MCP Server?
Use the Langdock Agent MCP Server when an external MCP-compatible client should access Langdock agents as tools. It is useful when teams want to reuse Langdock agents outside the Langdock interface.
What should I check if the MCP server does not work as expected?
What should I check if the MCP server does not work as expected?
Check the MCP client configuration, authentication, agent sharing, available tools, and whether the target agent is published and accessible. Also verify that the external client supports the required MCP behavior.