Oracle MCP Server

Oracle MCP Server

Enables consulting oracle AI models (Codex or Claude) for expert reasoning and analysis on complex problems, architectural decisions, and design tradeoffs through a unified CLI interface.

Category
Visit Server

README

Oracle MCP Server

A Model Context Protocol (MCP) server that provides a unified interface for consulting oracle AI models (Codex or Claude) via CLI.

Features

  • Unified Oracle Tool: Single consult_oracle tool that works with either Codex or Claude Code
  • Configurable Models: Supports custom oracle models and reasoning levels via ~/.oracle-mcp.json
  • Testable Architecture: Pure functions for argument construction and CLI invocation
  • Proper Error Handling: Comprehensive error handling with descriptive messages
  • Type Safe: Full TypeScript with explicit typing and safe error handling

Setup

# Install dependencies
bun install

# Build TypeScript
bun run build

# Run the server
bun run start

Development

# Run directly with hot reload
bun run dev

# Run test suite
bun test

Tools

consult_oracle

Consult the oracle for expert reasoning and analysis on complex problems.

When to use:

  • Planning complex tasks with multiple tradeoffs
  • You are ≤90% confident in your approach
  • You need analysis of architectural decisions or design patterns

Parameters:

  • prompt (string, required): The question or problem to consult the oracle about. Be specific about context, constraints, and what decision or analysis you need.

Example prompts:

  • "What's the best approach to structure a TypeScript MCP server for tool integration?"
  • "Should we use a monolithic or microservices architecture for this new feature?"
  • "What are the tradeoffs between different error handling patterns?"

Configuration

The server reads ~/.oracle-mcp.json if it exists to customize behavior. If the file doesn't exist, defaults are used.

Default Configuration

{
  "model": "gpt-5.1-codex-mini",
  "reasoning": "medium",
  "command": "codex"
}

Example with Codex

{
  "oracle": {
    "model": "gpt-5.1-codex-mini",
    "reasoning": "high",
    "command": "codex"
  }
}

Example with Claude Code

{
  "oracle": {
    "model": "opus",
    "command": "claude"
  }
}

Implementation Details

CLI Invocation Formats

Codex:

codex exec --model <model> [-c reasoning_level=<level>] "<prompt>"

Claude:

claude -p --model <model> "<prompt>"

Architecture

  • Single-file server (src/index.ts) implementing the MCP protocol
  • Pure functions for testability:
    • buildOracleArgs(): Constructs CLI arguments as an array (avoiding shell escaping issues)
    • invokeOracle(): Executes CLI via spawnSync and returns structured result
  • MCP Handlers:
    • ListToolsRequestSchema: Describes consult_oracle tool with dynamic descriptions based on config
    • CallToolRequestSchema: Handles tool invocation, captures stdout, and returns properly formatted responses
  • Error Handling: Try-catch with fallback to String(error) for non-Error objects
  • Response Format: All responses wrapped as { content: [{ type: "text", text: string }], isError?: boolean }

Dependencies

  • @modelcontextprotocol/sdk: Official MCP protocol implementation and stdio transport

Testing

Comprehensive test suite (42+ tests) covering:

  • Argument construction for both Codex and Claude
  • Special character handling (quotes, backticks, dollar signs, newlines)
  • Configuration loading and defaults
  • Tool description generation
  • Error handling and response formatting
  • Type safety and MCP protocol compliance

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured