@movemama/opencodemcp
v1.0.4
Published
OpenCode plugin — MCP endpoints (websearch, context7, grep.app)
Maintainers
Readme
opencodemcp
OpenCode plugin + library — built-in MCP endpoint definitions for websearch, context7, and grep.app.
Install
npm install @movemama/opencodemcp
# or
bun add @movemama/opencodemcpOpenCode Plugin Usage
Add to opencode.jsonc:
{
"plugin": ["@movemama/opencodemcp"]
}That's it. OpenCode will auto-load websearch, context7, and grep.app MCP servers.
Set optional API keys in environment:
| Variable | Used by |
|----------|---------|
| EXA_API_KEY | websearch (exa) |
| TAVILY_API_KEY | websearch (tavily) |
| CONTEXT7_API_KEY | context7 |
Library Usage
import { createBuiltinMcps } from '@movemama/opencodemcp';
// All 3 MCPs
const mcps = createBuiltinMcps();
// Exclude some
const mcps = createBuiltinMcps(['context7']);
// Switch provider
const mcps = createBuiltinMcps([], { provider: 'tavily' });API
createBuiltinMcps(disabledMcps?, websearchConfig?)
disabledMcps:string[]— names to skip ('websearch','context7','grep_app')websearchConfig:{ provider: 'exa' | 'tavily' }— default'exa'
Returns Record<string, { type, url, headers?, oauth? }>.
Types
export type McpName = 'websearch' | 'context7' | 'grep_app';
export type RemoteMcpConfig = { type: 'remote'; url: string; headers?: Record<string, string>; oauth?: false };
export type LocalMcpConfig = { type: 'local'; command: string[]; environment?: Record<string, string> };
export type McpConfig = RemoteMcpConfig | LocalMcpConfig;
export type WebsearchConfig = { provider: 'exa' | 'tavily' };License
MIT
