这是indexloc提供的服务,不要输入任何密码
Skip to content

#159 added documentation or SSE and Streamable MCP transports. #160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 0 additions & 32 deletions pages/mcp-compatibility/desktop.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,38 +99,6 @@ If you are having issues with an MCP Server, you can best debug these by looking
Sometimes, an MCP Server will require a tool to be installed via `uv tool install xyz`.
The easiest way to do this is to open command line and run the command manually on your machine. Then you can click "Refresh" in the "Agent Skills" and see if the tool now boots successfully.

### Autostart prevention

_This property is **specific to AnythingLLM only** and will have no effect on other tools._

Sometimes, you may want to optionally start an MCP server manually to prevent it from starting automatically and consuming resources.

To do this, AnythingLLM respects the `anythingllm.autoStart` property in the MCP Server configuration file.

For example, if you want to prevent the `face-generator` MCP Server from starting automatically, you can set the `autoStart` property to `false` in the configuration file.

Any tool that does not have `autoStart: false` explicitly set will be started automatically when the rest of the MCP servers are started.

```json
{
"mcpServers": {
"face-generator": {
"command": "npx",
"args": [
"@dasheck0/face-generator"
],
"anythingllm": {
"autoStart": false
}
},
"mcp-youtube": {
"command": "mcp-youtube",
"args": []
}
}
}
```

### Tool persistence

Since AnythingLLM Desktop is a desktop application, the tools downloaded for MCP are stored on your host machine and will persist across application restarts and even application uninstalls.
Expand Down
32 changes: 0 additions & 32 deletions pages/mcp-compatibility/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -102,38 +102,6 @@ If you are having issues with an MCP Server, you can best debug these by looking
Sometimes, an MCP Server will require a tool to be installed via `uv tool install xyz`.
The easiest way to do this is to open a shell into the container and run the command manually. Then you can click "Refresh" in the "Agent Skills" and see if the tool now boots successfully.

### Autostart prevention

_This property is **specific to AnythingLLM only** and will have no effect on other tools._

Sometimes, you may want to optionally start an MCP server manually to prevent it from starting automatically and consuming resources.

To do this, AnythingLLM respects the `anythingllm.autoStart` property in the MCP Server configuration file.

For example, if you want to prevent the `face-generator` MCP Server from starting automatically, you can set the `autoStart` property to `false` in the configuration file.

Any tool that does not have `autoStart: false` explicitly set will be started automatically when the rest of the MCP servers are started.

```json
{
"mcpServers": {
"face-generator": {
"command": "npx",
"args": [
"@dasheck0/face-generator"
],
"anythingllm": {
"autoStart": false
}
},
"mcp-youtube": {
"command": "mcp-youtube",
"args": []
}
}
}
```

### Tool persistence

If you stop or delete the AnythingLLM Docker container the libraries cached for the MCP servers will be lost and need to be re-downloaded on first start. Typically, this takes much longer for MCP servers that have a large number of dependencies or build steps and can increase boot times when starting MCP servers.
Expand Down
69 changes: 66 additions & 3 deletions pages/mcp-compatibility/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,84 @@ The MCP Management UI will show you all the MCP Servers that are available to us

_this file will be automatically generated in the proper directory if it doesn't exist before it is needed. It will be empty by default._

```json
```json5
// anythingllm_mcp_servers.json
{
"mcpServers": {
"face-generator": {
"command": "npx",
"args": [
"@dasheck0/face-generator"
]
],
"env": { // optional, some MCP servers may require additional environment variables
"MY_ENV_VAR": "my-env-var-value"
}
},
"mcp-youtube": {
"command": "uvx",
"args": [
"mcp-youtube"
]
],
},
"postgres-http": {
"type": "streamable", // or "sse"
"url": "http://localhost:3003",
"headers": {
"X-API-KEY": "api-key"
}
}
}
}
```

## Supported Transport Types

#### StdIO

The `stdio` transport type is the default and simplest transport type. It is a simple text-based protocol that is easy to implement and use.
All MCP servers that use the stdio transport type require the `command` field to be set.

#### SSE & Streamable

<Callout type="info">
The transport type is dependent on the MCP server implementation you are adding. So you should check the documentation for the MCP server you are adding to see what transport types is supported.

Keep in mind, that both `sse` and `streamable` **require** the `url` field to be set. It will not work with the `command` field set.
</Callout>

The `SSE` and `Streamable` transport types are alternative transport type that is supported by many MCP servers for streaming responses.
In your configuration file, you can use the `type` field to specify the transport (`sse` or `streamable`). If not provided, `sse` is assumed.

The optional headers field can be used to send custom HTTP headers with requests to the MCP server.

## Autostart prevention

_This property is **specific to AnythingLLM only** and will have no effect on other tools._

Sometimes, you may want to optionally start an MCP server manually to prevent it from starting automatically and consuming resources.

To do this, AnythingLLM respects the `anythingllm.autoStart` property in the MCP Server configuration file.

For example, if you want to prevent the `face-generator` MCP Server from starting automatically, you can set the `autoStart` property to `false` in the configuration file.

Any tool that does not have `autoStart: false` explicitly set will be started automatically when the rest of the MCP servers are started. This is useful if you want to manually start an MCP server when you need it because of resource constraints.

```json
{
"mcpServers": {
"face-generator": {
"command": "npx",
"args": [
"@dasheck0/face-generator"
],
"anythingllm": {
"autoStart": false
}
},
"mcp-youtube": {
"command": "mcp-youtube",
"args": []
}
}
}
```