MCP Setup

Model Context Protocol (MCP) servers extend the capabilities of your AI models by providing access to external tools, data sources, and services. This guide will walk you through setting up MCP servers in OllamaC.

What is MCP?

The Model Context Protocol (MCP) is an open standard that enables AI applications to securely connect to external data sources and tools. MCP servers can provide various capabilities such as:

  • File system access
  • Database connectivity
  • Web browsing and scraping
  • API integrations
  • Custom business logic
  • And much more

Adding MCP Servers

To add MCP servers to OllamaC, follow these steps:

1. Access Settings

  1. Open OllamaC
  2. Navigate to the Settings view
  3. Look for the MCP Servers or Tools section

2. Add a New Server

In the MCP servers section, you can add both local and remote servers:

Local MCP Servers

Local servers run on your machine and are typically installed via npm or Python package managers.

  1. Click Add Server or the + button
  2. Select Local Server
  3. Provide the following information:
    • Name: A descriptive name for the server
    • Command: The command to run the server (e.g., npx @modelcontextprotocol/server-filesystem)
    • Arguments: Any additional arguments the server needs
    • Environment Variables: Optional environment variables

Example local server configuration:

Name: Filesystem Server
Command: npx
Arguments: @modelcontextprotocol/server-filesystem /path/to/allowed/directory

Remote MCP Servers

Remote servers are hosted elsewhere and accessed via network connections.

  1. Click Add Server or the + button
  2. Select Remote Server
  3. Provide the following information:
    • Name: A descriptive name for the server
    • URL: The server's endpoint URL
    • Authentication: Any required API keys or tokens

Example remote server configuration:

Name: Weather API
URL: https://api.weather-mcp.example.com
API Key: your-api-key-here

3. Test the Connection

After adding a server:

  1. Click Test Connection to verify the server is accessible
  2. Review any error messages and adjust configuration as needed
  3. Save the server configuration once the test is successful

Here are some popular MCP servers you can use:

File System Access

  • @modelcontextprotocol/server-filesystem: Provides safe file system access
  • @modelcontextprotocol/server-git: Git repository operations

Development Tools

  • @modelcontextprotocol/server-github: GitHub API integration
  • @modelcontextprotocol/server-sqlite: SQLite database operations

Web and APIs

  • @modelcontextprotocol/server-fetch: Web scraping and API calls
  • @modelcontextprotocol/server-puppeteer: Browser automation

Productivity

  • @modelcontextprotocol/server-memory: Persistent memory for conversations
  • @modelcontextprotocol/server-time: Time and calendar operations

Server Management

Editing Servers

To modify an existing server configuration:

  1. Find the server in your MCP servers list
  2. Click the Edit button (pencil icon)
  3. Update the configuration as needed
  4. Test the connection again
  5. Save the changes

Removing Servers

To remove a server:

  1. Find the server in your MCP servers list
  2. Click the Delete button (trash icon)
  3. Confirm the deletion

Enabling/Disabling Servers

You can temporarily disable servers without removing them:

  1. Find the server in your MCP servers list
  2. Toggle the Enabled switch
  3. Disabled servers won't be available for use in chats

Troubleshooting

Common Issues

Server Not Starting

  • Ensure all required dependencies are installed (see Requirements)
  • Check that the command path is correct
  • Verify environment variables are set properly

Connection Failures

  • For local servers: Check if the port is already in use
  • For remote servers: Verify the URL and network connectivity
  • Review authentication credentials

Permission Errors

  • Ensure the server has necessary file system permissions
  • Check that API keys have the required scopes

Getting Help

If you encounter issues:

  1. Check the server's documentation for specific setup instructions
  2. Review the error logs in OllamaC's console
  3. Ensure your system meets the requirements

Next Steps

Once you've successfully set up your MCP servers, learn how to use them in conversations by reading the MCP Usage guide.