Chapter 7: Integrations: MCP, LSP, and Extensions

April 13, 2026 ยท View on GitHub

Welcome to Chapter 7: Integrations: MCP, LSP, and Extensions. In this part of OpenCode Tutorial: Open-Source Terminal Coding Agent at Scale, you will build an intuitive mental model first, then move into concrete implementation details and practical production tradeoffs.

OpenCode gains leverage when integrated with MCP servers, language tooling, and repository-specific workflows.

Integration Surfaces

SurfaceOutcome
LSP toolingbetter semantic code understanding
MCP serversexternal tool and resource access
repo scriptsproject-native lint/test/deploy pipelines

Integration Pattern

  1. start with repository-local build/test tools
  2. add LSP-backed code navigation flows
  3. integrate MCP only for high-value external systems
  4. enforce policy checks on integration boundaries

Source References

Summary

You now have a blueprint for extending OpenCode safely and effectively across your stack.

Next: Chapter 8: Production Operations and Security

How These Components Connect

flowchart TD
    A[OpenCode Agent] --> B[MCP Client]
    B --> C[MCP Server / Tools]
    A --> D[LSP Client]
    D --> E[Language Server]
    A --> F[Custom Extensions]
    C --> G[External APIs]
    E --> H[Code Intelligence]