Files
Memoh/assets/getting-started_mcp.md.BZLjLQ-y.js
2026-04-23 13:02:42 +00:00

2 lines
6.0 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import{_ as e,o,c as n,ag as r}from"./chunks/framework.CAXxHpAX.js";const p=JSON.parse('{"title":"MCP Connections","description":"","frontmatter":{},"headers":[],"relativePath":"getting-started/mcp.md","filePath":"getting-started/mcp.md","lastUpdated":1776332711000}'),a={name:"getting-started/mcp.md"};function i(s,t,c,l,d,h){return o(),n("div",null,[...t[0]||(t[0]=[r('<h1 id="mcp-connections" tabindex="-1">MCP Connections <a class="header-anchor" href="#mcp-connections" aria-label="Permalink to &quot;MCP Connections&quot;"></a></h1><p>Memoh fully supports the <strong>Model Context Protocol (MCP)</strong>, allowing you to connect your Bot to external tool services and context providers.</p><h2 id="concept-extending-bot-capabilities" tabindex="-1">Concept: Extending Bot Capabilities <a class="header-anchor" href="#concept-extending-bot-capabilities" aria-label="Permalink to &quot;Concept: Extending Bot Capabilities&quot;"></a></h2><p>MCP provides a standardized way for bots to access external data sources and tools. Each Bot can have its own independent set of MCP connections.</p><p>You can configure connections manually from the <strong>MCP</strong> tab, or start from a curated template in <strong><a href="/getting-started/supermarket.html">Supermarket</a></strong> and then review the prefilled draft in the bot editor.</p><hr><h2 id="connection-types" tabindex="-1">Connection Types <a class="header-anchor" href="#connection-types" aria-label="Permalink to &quot;Connection Types&quot;"></a></h2><p>Configure MCP connections from the <strong>MCP</strong> tab in the Bot Detail page.</p><h3 id="_1-stdio-local-process" tabindex="-1">1. Stdio (Local Process) <a class="header-anchor" href="#_1-stdio-local-process" aria-label="Permalink to &quot;1. Stdio (Local Process)&quot;"></a></h3><p>This type of connection executes a local command inside the bot&#39;s container and communicates via standard input/output.</p><table tabindex="0"><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>Command</strong></td><td>The executable to run (e.g., <code>npx</code>, <code>python3</code>).</td></tr><tr><td><strong>Arguments</strong></td><td>A list of command-line arguments (e.g., <code>-y</code>, <code>@modelcontextprotocol/server-filesystem</code>, <code>/opt/memoh/data</code>).</td></tr><tr><td><strong>Env</strong></td><td>Key-value pairs for environment variables.</td></tr><tr><td><strong>CWD</strong></td><td>Working directory for the process.</td></tr></tbody></table><h3 id="_2-remote-http-sse" tabindex="-1">2. Remote (HTTP/SSE) <a class="header-anchor" href="#_2-remote-http-sse" aria-label="Permalink to &quot;2. Remote (HTTP/SSE)&quot;"></a></h3><p>This type of connection connects to a remote MCP server over the network.</p><table tabindex="0"><thead><tr><th>Field</th><th>Description</th></tr></thead><tbody><tr><td><strong>URL</strong></td><td>The endpoint of the remote MCP server.</td></tr><tr><td><strong>Headers</strong></td><td>Custom HTTP headers (e.g., for authentication).</td></tr><tr><td><strong>Transport</strong></td><td>Choose between <code>http</code> or <code>sse</code> (Server-Sent Events).</td></tr></tbody></table><hr><h2 id="oauth-authentication" tabindex="-1">OAuth Authentication <a class="header-anchor" href="#oauth-authentication" aria-label="Permalink to &quot;OAuth Authentication&quot;"></a></h2><p>Some MCP servers require OAuth-based authentication. Memoh supports the full MCP OAuth flow:</p><ol><li>Click the <strong>OAuth</strong> button on a connection that requires authentication.</li><li>Memoh will <strong>discover</strong> the server&#39;s OAuth configuration automatically.</li><li>Click <strong>Authorize</strong> to open the provider&#39;s authorization page.</li><li>After granting access, you are redirected back to Memoh.</li><li>The token is <strong>exchanged</strong> and stored securely for the connection.</li></ol><p>You can also:</p><ul><li><strong>Check status</strong> — View the current OAuth token status.</li><li><strong>Revoke</strong> — Remove the stored OAuth token.</li></ul><hr><h2 id="operations" tabindex="-1">Operations <a class="header-anchor" href="#operations" aria-label="Permalink to &quot;Operations&quot;"></a></h2><ul><li><strong>Add Connection</strong>: Click <strong>Add</strong>, choose the type, and fill in the configuration.</li><li><strong>Import JSON</strong>: Use the <strong>Import</strong> button to quickly add multiple connections from a standard <code>mcpServers</code> JSON config file.</li><li><strong>Export</strong>: Export connection configurations to a JSON file for backup or sharing.</li><li><strong>Toggle Active</strong>: Enable or disable specific connections without deleting them.</li><li><strong>Search</strong>: Quickly find a connection by name or ID.</li><li><strong>Batch Delete</strong>: Select multiple connections and delete them at once.</li></ul><hr><h2 id="tool-discovery" tabindex="-1">Tool Discovery <a class="header-anchor" href="#tool-discovery" aria-label="Permalink to &quot;Tool Discovery&quot;"></a></h2><p>Once an MCP connection is active, Memoh automatically discovers the tools exposed by the server. You can:</p><ol><li>Click on a connection to view its details.</li><li>The <strong>Tools</strong> section lists all available tools with their names and descriptions.</li><li>The bot will use these tools automatically during conversations when relevant.</li></ol><p>You can also use the <strong>Probe</strong> button to manually refresh the tool list from the server.</p><hr><h2 id="bot-interaction" tabindex="-1">Bot Interaction <a class="header-anchor" href="#bot-interaction" aria-label="Permalink to &quot;Bot Interaction&quot;"></a></h2><p>Once an MCP connection is active, the bot will automatically:</p><ul><li>Discover the tools and resources exposed by the MCP server.</li><li>Use these tools to perform tasks requested by the user.</li><li>Include the context provided by the MCP server in its reasoning process.</li></ul>',32)])])}const g=e(a,[["render",i]]);export{p as __pageData,g as default};