Skip to main content

COBOL MCP server with hybrid search and blind-spot detection

Project description

cobol-mcp-client

An MCP (Model Context Protocol) server for COBOL development assistance. Provides static analysis with blind-spot detection and hybrid documentation search.

Quick Start

Automatic Setup (Recommended) ✨

pipx run cobol-mcp-client setup YOUR_API_KEY

This automatically configures Cursor. For other IDEs:

pipx run cobol-mcp-client setup YOUR_API_KEY --ide claude-desktop
pipx run cobol-mcp-client setup YOUR_API_KEY --ide vscode
pipx run cobol-mcp-client setup YOUR_API_KEY --ide windsurf
pipx run cobol-mcp-client setup YOUR_API_KEY --ide amp

List all supported IDEs:

pipx run cobol-mcp-client list-ides

Manual Setup

If you prefer manual configuration, add to your IDE's MCP config:

{
  "mcpServers": {
    "cobol": {
      "command": "uvx",
      "args": ["cobol-mcp-client"],
      "env": {
        "COBOL_MCP_API_KEY": "your-api-key"
      }
    }
  }
}

Config file locations:

  • Cursor: ~/.cursor/mcp.json
  • Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
  • VS Code: ~/.vscode/mcp.json
  • Windsurf: ~/.codeium/windsurf/mcp_config.json

What It Does

Three capabilities exposed as MCP tools/resources:

  1. check - Static analysis of COBOL source code. Runs 30+ rules covering general COBOL issues (unused variables, missing FILE STATUS, arithmetic without ON SIZE ERROR) and IMS-specific patterns (missing status checks, GB handling, SSA correctness, checkpoint discipline).

  2. search - Hybrid semantic + keyword search across COBOL documentation. Queries a backend API that performs dense vector search, sparse BM25 search, and reranking.

  3. translate_reference - COBOL-to-Java translation patterns and guidance.

  4. Resources - cobol://context, cobol://rules, cobol://gnucobol for reference documentation.

Configuration

Variable Required Description
COBOL_MCP_API_KEY Yes API key for documentation search
COBOL_MCP_API_URL No Backend API URL (defaults to production)

Architecture

cobol_mcp/
├── server.py          # FastMCP server entry point
├── cli.py             # CLI for setup command
├── setup.py           # IDE configuration utilities
├── tools/
│   ├── check.py       # Invokes rules engine on source text
│   ├── search.py      # HTTP proxy to backend search API
│   └── translate.py   # Translation reference lookup
├── rules/
│   ├── parser.py      # COBOL structure extractor
│   ├── general.py     # General COBOL rules (COB-001 through COB-005)
│   ├── ims.py         # IMS-specific rules (IMS-001 through IMS-170)
│   ├── lookup.py      # Rule documentation lookup
│   └── models.py      # Finding dataclass
└── resources/
    ├── context.md     # Dialect context guide
    ├── rules.md       # Full rule documentation
    ├── gnucobol.md    # GnuCOBOL compiler reference
    └── translate/     # Translation reference files

Development

pip install -e .
python -m pytest tests/ -v   # 412 tests

License

Proprietary.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cobol_mcp_client-0.1.3.tar.gz (133.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cobol_mcp_client-0.1.3-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

Details for the file cobol_mcp_client-0.1.3.tar.gz.

File metadata

  • Download URL: cobol_mcp_client-0.1.3.tar.gz
  • Upload date:
  • Size: 133.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cobol_mcp_client-0.1.3.tar.gz
Algorithm Hash digest
SHA256 b87bfab40969bb14a1bcdc499cc165f7bee3d112538ff148997d7bb2ee1ed9d9
MD5 f5f8c96ca1ad096a754b13b60cf53dac
BLAKE2b-256 1c4b20d2363d385c982c1a73c7b643de9c293479741b4c103b27c261cdd835fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobol_mcp_client-0.1.3.tar.gz:

Publisher: publish.yml on haladir-ai/cobol-mcp-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cobol_mcp_client-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for cobol_mcp_client-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ffbe0cb08e0d3cda0a5974349f3b123c89db7f87e144a8093fd0f65983407065
MD5 25f66519d42ddee832205fd1381f2981
BLAKE2b-256 3815d09eaaab13bf4b6e91e41b81bfe3b1c638e9f5a833822323f66e1e80e44d

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobol_mcp_client-0.1.3-py3-none-any.whl:

Publisher: publish.yml on haladir-ai/cobol-mcp-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page