Lyna
SupportBlog
IntroductionFeaturesIntegrationsTips & TricksChangelog

MCP Servers

The Model Context Protocol (MCP) is an open standard for connecting external tools and data sources to AI assistants. Add MCP servers to give Lyna's AI access to APIs, databases, file systems, and third-party services.


How MCP Works

MCP servers expose tools (functions the AI can call) and resources (data the AI can read). When you connect one:

  1. Lyna starts the server process inside your project sandbox.
  2. The AI discovers the available tools and resources.
  3. Tools are registered as mcp_{serverName}_{toolName} so the AI knows which server each tool belongs to.
  4. During conversation, the AI calls those tools to fetch data or perform actions.

The MCP client identifies itself as "lyna-ai" v1.0.0.


Configuration

Server configs are stored in .lyna_ai/mcp.json in your project sandbox. This file is committed to Git so the configuration persists across sessions.

Command Allowlist

For security, only these commands can start MCP servers:

  • npx
  • node
  • bun
  • deno
  • uvx
  • python3
  • python

Anything else is rejected.


Managing MCP Servers

Open Settings > Chat > MCP Servers.

Installed Servers

Lists all configured servers. For each one you can:

  • Toggle on/off: enable or disable without removing.
  • Delete: remove the configuration entirely.

Adding a Custom Server

Click Add Custom to configure a new server:

Name

Give it a descriptive name (e.g., "GitHub MCP", "Notion MCP").

Command

The command to start the server. Must be one of the allowed commands listed above.

Arguments

Command arguments, separated by commas. Example: -y, @modelcontextprotocol/server-github.

Environment Variables

Any environment variables the server needs (API keys, tokens, etc.).


Browse the Catalog

Lyna includes a built-in catalog of popular MCP servers organized by category.

  1. Find the server in the catalog grid.
  2. Click Add.
  3. Fill in the required environment variables (name, command, and arguments are pre-configured).
  4. The server starts automatically.

Already-installed servers are grayed out in the catalog.


Connection Behavior

  • Auto-reconnect: if a server disconnects, Lyna automatically tries to reconnect.
  • Idle cleanup: servers idle for 5 minutes are cleaned up to free resources.
  • Startup: enabled servers start when the project loads.

Common MCP Servers

ServerDescription
GitHubSearch repos, read files, create issues and PRs
NotionRead and write Notion pages and databases
SlackSend messages, read channels
PostgreSQLQuery databases directly
FilesystemExtended file operations
Brave SearchWeb search capabilities

Troubleshooting

ProblemSolution
Server fails to startCheck that the command is in the allowlist and arguments are correct. Verify the package exists.
Tools not appearingMake sure the server is enabled (toggle is on). Try toggling off and on.
Authentication errorsVerify environment variables contain valid API keys or tokens.
Server disconnectsLyna auto-reconnects. Check server logs if it keeps failing.