# AI integration via MCP

StarUML supports integration with various AI services (such as Claude Desktop, Cursor, etc.) through the MCP server. The StarUML MCP Server is open-sourced in the GitHub repository. Installation and usage instructions are described in detail in the repository.

{% hint style="info" %}
StarUML MCP Server

<https://github.com/staruml/staruml-mcp-server>
{% endhint %}

<figure><img src="https://2095994577-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FaNbtXAm2MUsbrMlAEZb1%2Fuploads%2FEdtun0TTwu9M7Y91zWco%2Fmcp-server.png?alt=media&#x26;token=82f8babe-38a9-4e6f-9193-04a9fe1019c2" alt=""><figcaption></figcaption></figure>

## Configure API Server

The MCP Server communicates with StarUML's API Server using the HTTP protocol. You can disable the API Server or change the communication port.

If you want to configure API server, you can edit `settings.json` at the user configuration path:

* `/Users/<user>/Library/Application Support/StarUML` for Mac OS.
* `C:\Users\<user>\AppData\Roaming\StarUML` for Windows.
* `~/.config/StarUML` for Linux.

To control whether the API Server runs, modify the `apiServer` field. To change the API Server port number, edit the `apiServerPort` field as below. Default port number is `58321`.

```json
{
  ...
  "apiServer": true,
  "apiServerPort": 58321
}
```


---

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

```
GET https://docs.staruml.io/user-guide/ai-integration-via-mcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
