Installing MCP Servers
Connecting MCP Servers
Model Context Protocol (MCP) servers allow Witsy to connect your favorite LLM to local tools and data sources. By adding an MCP server, you can grant models like GPT-4o, Claude 3.5, or local Llama models the ability to read your local files, query databases, or fetch real-time web data.
How to Add a New MCP Server
Witsy makes it easy to add servers using the standard stdio transport.
- Open Settings in Witsy.
- Navigate to the Plugins or MCP section.
- Click Add Server.
- Enter a descriptive Name (e.g., "Google Search" or "Local Files").
- Choose the Transport Type (usually
stdio). - Enter the Command and Arguments required by the server (see examples below).
- Click Save.
Once added, Witsy will attempt to start the server. You can monitor the status directly in the settings pane.
Common MCP Recipes
Here are configuration recipes for some of the most popular MCP servers.
1. Filesystem Access
Give your AI the ability to read, write, and search files within specific directories on your machine.
- Command:
npx - Arguments:
-y @modelcontextprotocol/server-filesystem /path/to/your/allowed/folder - Usage Scenario: "Read the code in my project folder and explain how the authentication logic works."
2. Google Search
Allow any model to perform real-time searches via the official Google Search MCP server.
- Command:
npx - Arguments:
-y @modelcontextprotocol/server-google-search - Environment Variables: You will need to provide your
GOOGLE_API_KEYandGOOGLE_SEARCH_ENGINE_IDin the Environment Variables section of the server configuration. - Usage Scenario: "What are the latest scores from the Premier League matches today?"
3. SQLite Database
Connect Witsy to a local SQLite database to perform data analysis or schema inspections.
- Command:
npx - Arguments:
-y @modelcontextprotocol/server-sqlite /path/to/your/database.db - Usage Scenario: "List the top 5 customers by total order volume from my database."
Installing from Smithery.ai
Witsy supports Smithery.ai, a registry for MCP servers. Smithery simplifies the installation process by providing the exact configuration strings needed for Witsy.
- Browse for a server on Smithery.ai.
- Look for the Witsy or Manual configuration instructions.
- Copy the
commandandargsprovided. - Paste them into the Witsy Add Server dialog.
Troubleshooting MCP Servers
If a server fails to start (shown as a red status icon):
- Check Runtime Availability: Most MCP servers require Node.js (
npx) or Python to be installed on your system and available in your global PATH. - Logs: Check the Witsy console logs to see if there is a specific error message (e.g., "Command not found" or "Missing API Key").
- Permissions: For the Filesystem server, ensure the path you provided exists and Witsy has permissions to access it.
- Restart Server: Use the Restart button in the MCP settings to try re-initializing the connection after making changes to the configuration.
Enabling/Disabling Tools
Once a server is active, Witsy automatically discovers its available tools. You can toggle specific servers on or off globally, or select which tools to provide to the LLM within a specific chat thread to manage the "context window" effectively.