> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langdock.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Langdock Agent MCP Server

> Access your Langdock agents from any MCP-compatible AI client. The Langdock MCP Server exposes your workspace agents as MCP tools.

The Langdock MCP Server exposes your Langdock agents as MCP tools, allowing any MCP-compatible AI client to interact with your workspace agents.

<Info>
  **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.
</Info>

## MCP Base URL

The Langdock MCP server is available at `https://api.langdock.com/mcp`.

## Authentication

The MCP endpoint requires a valid Langdock API key with the `Agent API` scope.

<Warning>
  Make sure your API key has the **Agent API** scope enabled. Workspace-admins can create or manage API keys in your [workspace settings](https://app.langdock.com/settings/workspace/products/api).
</Warning>

### 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 call `ask_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.

### 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:

<Steps>
  <Step title="Navigate to Integrations">
    Go to **Integrations** in your workspace settings.
  </Step>

  <Step title="Add MCP Integration">
    Click **Add Integration** and select **MCP** as the integration type.
  </Step>

  <Step title="Enter Server Details">
    * **URL:** `https://api.langdock.com/mcp`
    * **Authentication method** API Key
  </Step>

  <Step title="Save & Test">
    * Click **Create and connect**
    * Add a connection using a valid Langdock API key (must have `AGENT_API` scope)
    * Set the **API Key Header Type** to *Authorization: Bearer*
    * Click **Test connection** to verify access to the available tools
  </Step>
</Steps>

***

## Related Documentation

* [Model Context Protocol (MCP)](/en/using-langdock/guides/integrations/mcp/mcp) - Learn about MCP and how to connect other MCP servers
* [MCP Server Directory](/en/using-langdock/integrations/mcp-directory) - Browse official MCP servers
* [Agents API Guide](/en/developer/agents-api/agent-api-guide) - Use the Agents API directly
