mcp-integration

Manage MCP servers, authentication flows, and token handling via CLI.

1|2|Updated Dec 4, 2025
One-click install
npx skills add https://github.com/co-labs-co/context-harness --skill mcp-integration-co-labs-co
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mcp-integration
Source: https://github.com/co-labs-co/context-harness/tree/main/.opencode/skill/mcp-integration
Command: npx skills add https://github.com/co-labs-co/context-harness --skill mcp-integration-co-labs-co

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Configure and manage MCP (Model Context Protocol) servers for AI agent tooling. Use when adding MCP servers, configuring authentication (OAuth 2.1 or API keys), managing opencode.json, implementing token flows, or troubleshooting MCP connections.

Core Features & Use Cases

  • Server Registry: Maintain a registry of MCP servers with metadata and status.
  • Configuration Management: Update opencode.json to add or remove servers and their authentication headers.
  • Authentication & Token Management: Support API keys and OAuth 2.1 with PKCE, with secure token storage and automatic refresh.
  • Use Case: When integrating a new MCP provider, initialize the server, configure authentication, and verify token handling across sessions.

Quick Start

Start by listing available MCP servers and adding a new one with context-harness mcp add <server>, then initiate the OAuth flow with context-harness mcp auth <server> if needed, and verify status.

Frequently Asked Questions about mcp-integration

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I configure OAuth 2.1 authentication for an MCP server?

To configure MCP server authentication, you can use this skill to support OAuth 2.1 with PKCE, handling secure token storage and automatic refresh to maintain uninterrupted agent communications.

What is the best way to manage MCP server connections across multiple projects?

Managing MCP servers across projects is handled via a centralized server registry and opencode.json configuration, allowing you to add, remove, and track server status and authentication headers.

Can I use API keys instead of OAuth for MCP server authentication?

Yes, MCP server authentication supports both API keys and OAuth 2.1 with PKCE, enabling secure token storage and automatic lifecycle management directly within your AI tooling configuration.

How do I add a new MCP provider and verify its authentication status?

You can add a new MCP provider using the CLI to initialize the server, configure authentication headers in opencode.json, and verify the connection status to ensure token handling works across sessions.

Why does my MCP connection keep failing during agent workflows?

MCP connection failures during agent workflows often stem from expired tokens or misconfigured authentication headers, which you can resolve by leveraging automatic token refresh and secure lifecycle management.

Do I need to manually update opencode.json when adding MCP servers?

No, you do not need to manually update opencode.json when adding MCP servers, as this skill automates configuration management to add or remove servers and their authentication headers centrally.