Skip to main content
Glama

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

Related MCP server: Codex Bridge

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

Available Tools

1 tool
consult_oracleA

Consult the oracle (gpt-5.1-codex-mini) via codex CLI with medium-level reasoning. The oracle provides expert reasoning and analysis for complex problem-solving. Use when: (1) planning complex tasks with multiple tradeoffs, (2) you are <=90% confident in your approach, (3) you need analysis of architectural decisions or design patterns.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptYesThe question or problem to consult the oracle about. Be specific about context, constraints, and what decision or analysis you need.

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions 'medium-level reasoning' and 'expert reasoning and analysis,' which gives some behavioral context, but lacks details on limitations, costs, rate limits, or response format. For a tool with no annotations, this is adequate but leaves gaps in operational transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by specific usage guidelines, all in three concise sentences. Every sentence adds value without redundancy, making it efficient and well-structured for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (consulting an AI model) and no output schema, the description does well by covering purpose and usage scenarios. However, it lacks details on behavioral traits like response handling or error cases, which could be important for an AI agent. With no annotations, it's mostly complete but has minor gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage for the single parameter 'prompt,' so the schema already documents it well. The description does not add any parameter-specific details beyond what the schema provides, such as examples or formatting tips, resulting in a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Consult the oracle (gpt-5.1-codex-mini) via codex CLI with medium-level reasoning. The oracle provides expert reasoning and analysis for complex problem-solving.' It specifies the action (consult), resource (oracle), and distinguishes it by mentioning the specific model and CLI, which is comprehensive given no sibling tools exist.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly lists three scenarios for when to use this tool: '(1) planning complex tasks with multiple tradeoffs, (2) you are <=90% confident in your approach, (3) you need analysis of architectural decisions or design patterns.' This provides clear, actionable guidance on appropriate contexts, with no need for sibling tool differentiation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 1 tool updatev1.0.0
    • First observedconsult_oracle

TDQS

A4/5.0
Disambiguation5/5

With only one tool, there is no possibility of ambiguity or overlap between tools. The tool has a clear, singular purpose: consulting an oracle for expert reasoning and analysis.

Naming Consistency5/5

Since there is only one tool, naming consistency is inherently perfect. The tool name 'consult_oracle' follows a clear verb_noun pattern and stands alone without any conflicting naming conventions.

Tool Count2/5

A single tool is generally too few for a server's purpose, as it limits functionality and scope. While the tool is well-defined, the server likely has a narrow or incomplete surface, making it feel thin and underdeveloped for typical MCP server use cases.

Completeness2/5

The server's domain appears to be oracle consultation for problem-solving, but with only one tool, there are significant gaps. For example, there are no tools for managing sessions, retrieving past consultations, or handling different reasoning levels, which limits agent workflows and creates dead ends.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables comprehensive codebase analysis using Google's Gemini AI through CLI integration. Provides architectural reviews and targeted code analysis with code2prompt integration for efficient context extraction.
    18
    2
    Apache 2.0
  • A
    license
    A
    quality
    B
    maintenance
    Enables AI coding assistants to interact with OpenAI's Codex AI through the official CLI. Provides direct integration for code analysis, file review, and batch processing with zero API costs.
    3
    114
    MIT
  • A
    license
    C
    quality
    F
    maintenance
    Connects AI assistants like Claude to the Codex CLI for code analysis, editing, and execution. Supports file references with @ syntax, sandboxed code execution with approval workflows, and structured code changes for automated refactoring and documentation.
    8
    198
    179
    MIT
  • F
    license
    Not graded
    quality
    Not graded
    maintenance
    Orchestrates multiple AI models (Gemini, OpenAI, Claude, local models) within a single conversation context, enabling collaborative workflows like multi-model code reviews, consensus building, and CLI-to-CLI bridging for specialized tasks.
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/becksclair/oracle-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server