-
Notifications
You must be signed in to change notification settings - Fork 2
MCP Client
lacause edited this page Mar 29, 2026
·
1 revision
OCC can consume any external MCP server as a pre-tool, giving your chains access to 10,000+ tools in the MCP ecosystem (GitHub, Slack, PostgreSQL, Brave Search, file systems, databases, etc.).
- Create
occ-mcp-servers.jsonat the project root:
{
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_your_token"
}
}
}- Use
mcp_callin any chain:
steps:
- id: find_repos
pre_tools:
- type: mcp_call
server: "github"
tool: "search_repositories"
args:
query: "{input.topic} stars:>100"
inject_as: repos
prompt: |
Analyze these GitHub repositories: {repos}
output_var: analysisOCC looks for MCP server configs in this order:
-
MCP_SERVERS_CONFIGenv var (custom path) -
occ-mcp-servers.jsonnext to the chains directory -
~/.occ/mcp-servers.json(user-level)
{
"server-name": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-name"],
"env": {
"API_KEY": "your_key"
}
}
}| Field | Required | Description |
|---|---|---|
command |
Yes | Executable to run |
args |
No | Command-line arguments |
env |
No | Environment variables (merged with process.env) |
pre_tools:
- type: mcp_call
server: "server-name" # Must match a key in occ-mcp-servers.json
tool: "tool_name" # Tool exposed by the MCP server
args: # Arguments for the tool
query: "{input.topic}" # Supports {variable} interpolation
max_results: 10
inject_as: result_var| Server | npm package | Tools |
|---|---|---|
| GitHub | @modelcontextprotocol/server-github |
search_repositories, create_issue, list_commits, etc. |
| Brave Search | @modelcontextprotocol/server-brave-search |
web_search, local_search |
| PostgreSQL | @modelcontextprotocol/server-postgres |
query, list_tables, describe_table |
| Filesystem | @modelcontextprotocol/server-filesystem |
read_file, write_file, list_directory |
| Slack | @anthropic/mcp-server-slack |
send_message, list_channels, search_messages |
| Google Drive | @anthropic/mcp-server-gdrive |
search_files, read_file |
See https://github.com/modelcontextprotocol/servers for the full list.
# List all servers and their available tools
curl http://localhost:4242/mcp-serversResponse:
{
"github": ["search_repositories: Search GitHub repos", "create_issue: Create an issue", ...],
"brave-search": ["web_search: Search the web", "local_search: Local results"]
}curl http://localhost:4242/healthIncludes mcpServers field listing configured server names.
- Servers are connected on first use (lazy initialization)
- Connections are cached and reused across chain executions
- Graceful handling when no servers are configured (no errors, just a log message)
name: mcp-research
description: "Research using GitHub + Brave Search + local files"
inputs:
- name: topic
steps:
- id: search_web
pre_tools:
- type: mcp_call
server: "brave-search"
tool: "web_search"
args: { query: "{input.topic} latest developments" }
inject_as: web_results
prompt: "Summarize web findings: {web_results}"
output_var: web_summary
- id: search_github
pre_tools:
- type: mcp_call
server: "github"
tool: "search_repositories"
args: { query: "{input.topic}" }
inject_as: github_repos
prompt: "Analyze relevant repos: {github_repos}"
output_var: github_summary
- id: synthesize
depends_on: [search_web, search_github]
prompt: |
Combine these research sources:
Web: {web_summary}
GitHub: {github_summary}
output_var: report
output: report- Pre-Tools — All pre-tool types
- Chain Format — YAML reference
- Configuration — Server configuration