2026-01-23 02:14:08 +09:00
|
|
|
# MCP KNOWLEDGE BASE
|
2026-01-19 20:18:26 +09:00
|
|
|
|
|
|
|
|
## OVERVIEW
|
|
|
|
|
|
2026-02-09 14:29:53 +09:00
|
|
|
Tier 1 of three-tier MCP system: 3 built-in remote HTTP MCPs.
|
2026-02-01 19:26:57 +09:00
|
|
|
|
|
|
|
|
**Three-Tier System**:
|
|
|
|
|
1. **Built-in** (this directory): websearch, context7, grep_app
|
2026-02-10 14:53:39 +09:00
|
|
|
2. **Claude Code compat** (`features/claude-code-mcp-loader/`): .mcp.json with `${VAR}` expansion
|
|
|
|
|
3. **Skill-embedded** (`features/opencode-skill-loader/`): YAML frontmatter in SKILL.md
|
2026-01-19 20:18:26 +09:00
|
|
|
|
|
|
|
|
## STRUCTURE
|
|
|
|
|
```
|
|
|
|
|
mcp/
|
|
|
|
|
├── index.ts # createBuiltinMcps() factory
|
2026-02-10 14:53:39 +09:00
|
|
|
├── index.test.ts # Tests
|
2026-02-06 18:59:58 +09:00
|
|
|
├── websearch.ts # Exa AI / Tavily web search
|
2026-01-19 20:18:26 +09:00
|
|
|
├── context7.ts # Library documentation
|
|
|
|
|
├── grep-app.ts # GitHub code search
|
2026-02-10 14:53:39 +09:00
|
|
|
└── types.ts # McpNameSchema
|
2026-01-19 20:18:26 +09:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## MCP SERVERS
|
|
|
|
|
|
2026-02-10 14:53:39 +09:00
|
|
|
| Name | URL | Auth | Purpose |
|
|
|
|
|
|------|-----|------|---------|
|
|
|
|
|
| websearch | mcp.exa.ai/mcp (default) or mcp.tavily.com/mcp/ | EXA_API_KEY (optional) / TAVILY_API_KEY (required) | Real-time web search |
|
|
|
|
|
| context7 | mcp.context7.com/mcp | CONTEXT7_API_KEY (optional) | Library docs lookup |
|
|
|
|
|
| grep_app | mcp.grep.app | None | GitHub code search |
|
2026-02-02 03:37:02 +08:00
|
|
|
|
2026-01-19 20:18:26 +09:00
|
|
|
## CONFIG PATTERN
|
|
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
|
export const mcp_name = {
|
|
|
|
|
type: "remote" as const,
|
|
|
|
|
url: "https://...",
|
|
|
|
|
enabled: true,
|
2026-01-23 02:14:08 +09:00
|
|
|
oauth: false as const,
|
|
|
|
|
headers?: { ... },
|
2026-01-19 20:18:26 +09:00
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## HOW TO ADD
|
|
|
|
|
|
2026-02-10 14:53:39 +09:00
|
|
|
1. Create `src/mcp/my-mcp.ts` with config object
|
2026-02-09 14:29:53 +09:00
|
|
|
2. Add conditional check in `createBuiltinMcps()` in `index.ts`
|
|
|
|
|
3. Add name to `McpNameSchema` in `types.ts`
|
2026-01-19 20:18:26 +09:00
|
|
|
|
|
|
|
|
## NOTES
|
|
|
|
|
|
2026-02-10 14:53:39 +09:00
|
|
|
- **Remote only**: HTTP/SSE transport, no stdio
|
|
|
|
|
- **Disable**: Set `disabled_mcps: ["name"]` in config
|
2026-02-06 18:59:58 +09:00
|
|
|
- **Exa**: Default provider, works without API key
|
2026-02-02 03:37:02 +08:00
|
|
|
- **Tavily**: Requires `TAVILY_API_KEY` env var
|