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.4.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.4-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cobol_mcp_client-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 da4a389de93cdb6a37f7c97c1e8ac26f6125adbd84939bf9b3a4e3f3c5cdfde3
MD5 2de0ba6e2f02985aed534e317f652fb6
BLAKE2b-256 a56b3dd700d93a0dc97c47a1eb4a9f905a00c4a19e6bdb8f322a2f212f39cfd5

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobol_mcp_client-0.1.4.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.4-py3-none-any.whl.

File metadata

File hashes

Hashes for cobol_mcp_client-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ea1e0bbddd9ddb2652a912427bc1198c654256db69c8690d067b22ea1cab3ef5
MD5 a68797d5f1017220301a815e181b0add
BLAKE2b-256 d5c359f41f88de16e4808ba98a55ca81ff0440187e655c5c76e3025f7eff8f5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cobol_mcp_client-0.1.4-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