~/content/mcp-servers-&-plugins

MCP Servers & Plugins

Extend OpenCode with 1200+ MCP servers. GitHub, PostgreSQL, Playwright integration. Complete setup guide and advanced configuration.

last_updated: "2025-01-19"

##What is MCP?

Model Context Protocol (MCP) is an open standard that enables AI assistants like OpenCode to interact with external tools, databases, and services. MCP was developed by Anthropic and donated to the Linux Foundation in December 2025, with over 1,200 servers available in the ecosystem.

###Why Use MCP Servers?

  • Extended Capabilities: Query databases, manage files, automate browsers, and more
  • Standardized Integration: One protocol for all tools, no custom integrations needed
  • Security First: Sandboxed execution with explicit permissions
  • Growing Ecosystem: 1,200+ servers available from official and community sources

##Installing MCP Servers

###Configuration File

OpenCode uses a configuration file to manage MCP servers. Create or edit ~/.config/opencode/config.toml:

bash
[mcp]
enabled = true

[mcp.servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/allowed/directory"]

[mcp.servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
env = { GITHUB_PERSONAL_ACCESS_TOKEN = "ghp_your_token_here" }

###Project-Level Configuration

For project-specific servers, create .opencode.json in your project root:

bash
{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"]
    },
    "memory": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-memory"]
    }
  }
}

##Official Reference Servers

These are maintained by the MCP team and are the most reliable options:

###Filesystem Server

Access and manage files in specified directories.

bash
[mcp.servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]

Capabilities:

  • Read, write, and edit files
  • Create and delete directories
  • Search files with glob patterns
  • Get file metadata and stats

###GitHub Server

Full GitHub API integration for repository management.

bash
[mcp.servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
env = { GITHUB_PERSONAL_ACCESS_TOKEN = "ghp_xxx" }

Capabilities:

  • Create and manage repositories
  • Handle pull requests and issues
  • Manage branches and commits
  • Access GitHub search API

###Git Server

Local Git operations for version control.

bash
[mcp.servers.git]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-git"]

Capabilities:

  • Clone, pull, push operations
  • Branch management
  • Commit history and diffs
  • Status and staging

###PostgreSQL Server

Query and manage PostgreSQL databases.

bash
[mcp.servers.postgres]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost:5432/mydb"]

Capabilities:

  • Execute SQL queries
  • Schema introspection
  • Data manipulation (INSERT, UPDATE, DELETE)
  • Transaction support

###SQLite Server

Lightweight database operations for SQLite.

bash
[mcp.servers.sqlite]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-sqlite", "--db-path", "./data.db"]

Capabilities:

  • SQL query execution
  • Schema management
  • Database file operations
  • Read-only or read-write modes

###Memory Server

Persistent knowledge graph for context retention.

bash
[mcp.servers.memory]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-memory"]

Capabilities:

  • Store and retrieve knowledge entities
  • Create relationships between concepts
  • Persistent memory across sessions
  • Graph-based querying

###Sequential Thinking Server

Enhanced reasoning with dynamic thought chains.

bash
[mcp.servers.sequential-thinking]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-sequential-thinking"]

Capabilities:

  • Multi-step reasoning chains
  • Hypothesis testing
  • Complex problem decomposition
  • Thought revision and refinement

###Fetch Server

HTTP request capabilities for web APIs.

bash
[mcp.servers.fetch]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-fetch"]

Capabilities:

  • GET, POST, PUT, DELETE requests
  • Custom headers and authentication
  • JSON and text response handling
  • URL content extraction

##Popular Community Servers

###Playwright MCP

Browser automation and testing with Microsoft Playwright.

bash
[mcp.servers.playwright]
command = "npx"
args = ["-y", "@anthropic/mcp-server-playwright"]

Use Cases:

  • End-to-end testing
  • Web scraping with JavaScript rendering
  • Screenshot capture
  • Form automation
  • Accessibility testing

###Brave Search Server

Web search integration using Brave Search API.

bash
[mcp.servers.brave-search]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-brave-search"]
env = { BRAVE_API_KEY = "your_api_key" }

Capabilities:

  • Web search queries
  • News search
  • Image search
  • Local search results

###Puppeteer Server

Chrome browser automation (alternative to Playwright).

bash
[mcp.servers.puppeteer]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-puppeteer"]

Capabilities:

  • Headless Chrome control
  • Page navigation and interaction
  • PDF generation
  • Performance profiling

##Database Servers

###Supabase MCP

Full Supabase platform integration.

bash
[mcp.servers.supabase]
command = "npx"
args = ["-y", "supabase-mcp-server"]
env = { SUPABASE_URL = "https://xxx.supabase.co", SUPABASE_KEY = "your_key" }

Features:

  • Database queries
  • Authentication management
  • Storage operations
  • Real-time subscriptions

###Neo4j MCP

Graph database operations for Neo4j.

bash
[mcp.servers.neo4j]
command = "npx"
args = ["-y", "@neo4j/mcp-neo4j"]
env = { NEO4J_URI = "bolt://localhost:7687", NEO4J_USER = "neo4j", NEO4J_PASSWORD = "password" }

Capabilities:

  • Cypher query execution
  • Node and relationship management
  • Graph traversal
  • Schema inspection

###ClickHouse MCP

Analytics database for ClickHouse.

bash
[mcp.servers.clickhouse]
command = "npx"
args = ["-y", "@clickhouse/mcp-server"]
env = { CLICKHOUSE_URL = "http://localhost:8123" }

Use Cases:

  • Analytical queries
  • Time-series data
  • Log analysis
  • OLAP operations

##Productivity Servers

###Notion MCP

Notion workspace integration.

bash
[mcp.servers.notion]
command = "npx"
args = ["-y", "notion-mcp-server"]
env = { NOTION_API_KEY = "secret_xxx" }

Capabilities:

  • Read and update pages
  • Database queries
  • Create new content
  • Search workspace

###Linear MCP

Issue tracking with Linear.

bash
[mcp.servers.linear]
command = "npx"
args = ["-y", "@linear/mcp-server"]
env = { LINEAR_API_KEY = "lin_api_xxx" }

Features:

  • Create and update issues
  • Manage projects and cycles
  • Search issues
  • Workflow automation

###Slack MCP

Slack workspace integration.

bash
[mcp.servers.slack]
command = "npx"
args = ["-y", "slack-mcp-server"]
env = { SLACK_BOT_TOKEN = "xoxb-xxx" }

Capabilities:

  • Send messages
  • Read channel history
  • Manage channels
  • User lookups

##Cloud & DevOps Servers

###AWS MCP

Amazon Web Services integration.

bash
[mcp.servers.aws]
command = "npx"
args = ["-y", "aws-mcp-server"]
env = { AWS_ACCESS_KEY_ID = "xxx", AWS_SECRET_ACCESS_KEY = "xxx", AWS_REGION = "us-east-1" }

Supported Services:

  • S3 (storage)
  • Lambda (functions)
  • EC2 (compute)
  • DynamoDB (database)
  • CloudWatch (monitoring)

###Docker MCP

Container management for Docker.

bash
[mcp.servers.docker]
command = "npx"
args = ["-y", "docker-mcp-server"]

Capabilities:

  • List and manage containers
  • Build and push images
  • Network management
  • Volume operations

###Kubernetes MCP

Kubernetes cluster operations.

bash
[mcp.servers.kubernetes]
command = "npx"
args = ["-y", "kubernetes-mcp-server"]

Features:

  • Pod management
  • Deployment operations
  • Service configuration
  • Log retrieval

##Using Python Servers

Some MCP servers are written in Python and use uvx instead of npx:

bash
[mcp.servers.python-example]
command = "uvx"
args = ["mcp-server-example"]

Make sure you have uv installed:

bash
# Install uv (Python package manager)
curl -LsSf https://astral.sh/uv/install.sh | sh

##Example: Full Development Setup

Here's a comprehensive configuration for full-stack development:

bash
[mcp]
enabled = true

# File system access for project
[mcp.servers.filesystem]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/projects"]

# GitHub integration
[mcp.servers.github]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-github"]
env = { GITHUB_PERSONAL_ACCESS_TOKEN = "${GITHUB_TOKEN}" }

# PostgreSQL database
[mcp.servers.postgres]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-postgres", "${DATABASE_URL}"]

# Browser automation for testing
[mcp.servers.playwright]
command = "npx"
args = ["-y", "@anthropic/mcp-server-playwright"]

# Web search capability
[mcp.servers.brave-search]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-brave-search"]
env = { BRAVE_API_KEY = "${BRAVE_API_KEY}" }

# Knowledge memory
[mcp.servers.memory]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-memory"]

##Security Best Practices

###1. Use Environment Variables

Never hardcode credentials in configuration files:

bash
# Add to ~/.bashrc or ~/.zshrc
export GITHUB_TOKEN="ghp_..."
export DATABASE_URL="postgresql://..."
export BRAVE_API_KEY="..."

Then reference them in config:

bash
env = { GITHUB_PERSONAL_ACCESS_TOKEN = "${GITHUB_TOKEN}" }

###2. Limit File System Access

Only grant access to necessary directories:

bash
# Good - specific project directory
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me/myproject"]

# Avoid - entire home directory
args = ["-y", "@modelcontextprotocol/server-filesystem", "/Users/me"]

###3. Audit Server Permissions

Review what each server can access before installation:

bash
# Check npm package contents
npm info @modelcontextprotocol/server-github

# Review source code on GitHub
# https://github.com/modelcontextprotocol/servers

###4. Use Read-Only When Possible

For databases, use read-only connections when you don't need write access:

bash
[mcp.servers.postgres-readonly]
command = "npx"
args = ["-y", "@modelcontextprotocol/server-postgres", "postgresql://readonly_user:pass@host/db"]

##Troubleshooting

###Server Not Starting

bash
Error: MCP server 'github' failed to start

Solutions:

  1. Check npm/npx is installed and in PATH
  2. Verify the package name is correct
  3. Check environment variables are set
  4. Try running the command manually to see errors

###Authentication Errors

bash
Error: GitHub API authentication failed

Solutions:

  1. Verify token has required scopes (repo, read:org)
  2. Check token hasn't expired
  3. Ensure environment variable is exported
  4. Try regenerating the token

###Connection Timeouts

bash
Error: Database connection timeout

Solutions:

  1. Verify database server is running
  2. Check firewall rules
  3. Confirm connection string is correct
  4. Test connection with psql or other client

##Resources

Comments (Coming Soon)

Configure Giscus in environment variables to enable comments.