> For the complete documentation index, see [llms.txt](https://docs.dorg.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dorg.pro/create-competency/develop-a-competency/mcp-server.md).

# MCP Server

The [**Model Context Protocol**](https://modelcontextprotocol.io/) **(MCP)** is an open-source standard for connecting AI applications to external systems in a controlled and interoperable way.

MCP defines how an agent:

* discovers available tools,
* invokes them using structured inputs,
* receives validated, typed outputs.

***

### Why MCP

Using MCP provides the following guarantees:

* **Separation of concerns**\
  Reasoning (LLM) is strictly separated from execution (tools).
* **Auditability**\
  All actions performed by a Dorg are explicit, structured, and traceable.
* **Security boundaries**\
  Tools are invoked through declared interfaces; models cannot execute arbitrary code.
* **Interoperability**\
  The same MCP module can be reused across Organizations, Skills, and runtimes.
* **Deterministic contracts**\
  Inputs and outputs are defined via JSON Schema, enabling validation and predictable behavior.

***

### MCP Module Design Rules

A Creator-developed MCP module:

**MUST**

* be stateless across calls,
* define all inputs and outputs explicitly,
* fail using machine-readable error responses.

**SHOULD**

* be idempotent when possible,
* avoid embedding tenant-specific business logic.

These constraints ensure composability, safety, and predictable integration.

***

### Getting Started as a Developer

You can implement an MCP server using **any technology stack**.

The only requirements are:

* it must run in a **Linux-based Docker container**,
* it must expose an MCP-compliant **Streamable HTTP** interface.

This flexibility allows teams to adopt MCP without changing their existing language, framework, or infrastructure choices.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.dorg.pro/create-competency/develop-a-competency/mcp-server.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
