{
  "markdown": "# COBOL MCP Server\r\n\r\nA basic \"Hello World\" Model Context Protocol (MCP) server written in COBOL (GnuCOBOL).\r\n\r\n## Overview\r\n\r\nThis server implements a subset of the MCP specification over HTTP (JSON-RPC 2.0). It provides a single tool: `hello_world`.\r\n\r\n## Requirements\r\n\r\n- Docker\r\n\r\n## Building\r\n\r\nTo build the Docker image:\r\n\r\n```bash\r\ndocker build -t cobol-mcp .\r\n```\r\n\r\n## Running\r\n\r\nTo run the server on port 8090:\r\n\r\n```bash\r\ndocker run -p 8090:8090 cobol-mcp\r\n```\r\n\r\n## Testing\r\n\r\nThere is a provided `test.sh` script that launches the container and runs a test suite against it.\r\n\r\n```bash\r\n./test.sh\r\n```\r\n\r\n### Manual Testing\r\n\r\nYou can send a POST request with curl:\r\n\r\n```bash\r\ncurl -X POST http://localhost:8090/mcp \\\r\n     -H \"Content-Type: application/json\" \\\r\n     -d '{\r\n           \"jsonrpc\": \"2.0\",\r\n           \"method\": \"tools/call\",\r\n           \"params\": {\r\n               \"name\": \"hello_world\",\r\n               \"arguments\": {\r\n                   \"name\": \"Developer\"\r\n               }\r\n           },\r\n           \"id\": 1\r\n         }'\r\n```\r\n\r\n## Implementation Details\r\n\r\n- **Language**: COBOL (GnuCOBOL)\r\n- **Transport**: HTTP (TCP Sockets)\r\n- **Files**:\r\n  - `server.cbl`: Main TCP server loop.\r\n  - `mcp-handler.cbl`: Request parser and response generator.\r\n  - `socket-defs.cpy`, `http-structs.cpy`: Data structures.\r\n\r\n## Http Streamable Docker\r\n\r\nRun it in docker, e.g.\r\n```\r\n$ docker run --name cobol-mcp-server -p 8090:8090 idjohnson/cobolmcp:latest\r\n```\r\n\r\n### Copilot settings\r\n\r\nYou can use the MCP server add UI to add an HTTP server for http://localhost:8090 or add this block in the mcp.json file:\r\n\r\n```\r\n\t\t\"cobolMCP\": {\r\n\t\t\t\"url\": \"http://localhost:8090/mcp\",\r\n\t\t\t\"type\": \"http\"\r\n\t\t}\r\n```\r\n\r\n### Gemini CLI settings\r\n\r\nUsing in either `~/.gemini/settings.json` or a local `.gemini/settings.json`, access the httpStreamable server:\r\n```json\r\n  \"mcpServers\": {\r\n    \"cobolMCP\": {\r\n      \"httpUrl\": \"http://localhost:8090\",\r\n      \"timeout\": 5000\r\n    }\r\n  },\r\n```\r\n\r\n# Installing into Kubernetes\r\n\r\nThere is a local chart in /charts you can use.\r\n\r\nFor instance, I set this up with my local Kubernetes and a proper TLS ingress using the following values file:\r\n```yaml\r\n# Default values for cobolmcp.\r\n# This is a YAML-formatted file.\r\n# Declare variables to be passed into your templates.\r\n\r\nreplicaCount: 1\r\n\r\nimage:\r\n  repository: idjohnson/cobolmcp\r\n  pullPolicy: Always\r\n  # Overrides the image tag whose default is the chart appVersion.\r\n  tag: \"latest\"\r\n\r\ningress:\r\n  enabled: true\r\n  className: \"nginx\"\r\n  annotations:\r\n    cert-manager.io/cluster-issuer: gcpleprod2\r\n    ingress.kubernetes.io/proxy-body-size: \"0\"\r\n    ingress.kubernetes.io/ssl-redirect: \"true\"\r\n    kubernetes.io/tls-acme: \"true\"\r\n    nginx.ingress.kubernetes.io/proxy-body-size: \"0\"\r\n    nginx.ingress.kubernetes.io/proxy-read-timeout: \"3600\"\r\n    nginx.ingress.kubernetes.io/proxy-send-timeout: \"3600\"\r\n  hosts:\r\n    - host: cobolmcp.steeped.icu\r\n      paths:\r\n        - path: /\r\n          pathType: ImplementationSpecific\r\n  tls:\r\n   - secretName: cobolmcpgcp-tls\r\n     hosts:\r\n       - cobolmcp.steeped.icu\r\n\r\nresources:\r\n  limits:\r\n    cpu: 250m\r\n    memory: 256Mi\r\n  requests:\r\n    cpu: 100m\r\n    memory: 128Mi\r\n\r\nautoscaling:\r\n  enabled: true\r\n  minReplicas: 1\r\n  maxReplicas: 10\r\n  targetCPUUtilizationPercentage: 80\r\n\r\n```\r\n\r\nThen installed:\r\n```\r\n$ helm upgrade --install cobolmcp -f ./values.yaml ./charts/cobolmcp\r\nRelease \"cobolmcp\" has been upgraded. Happy Helming!\r\nNAME: cobolmcp\r\nLAST DEPLOYED: Thu Jan  8 14:15:41 2026\r\nNAMESPACE: default\r\nSTATUS: deployed\r\nREVISION: 3\r\nNOTES:\r\n1. Get the application URL by running these commands:\r\n  https://cobolmcp.steeped.icu/\r\n```\r\n\r\nIf you opt not to use a public ingress, it will create a ClusterIP service you could use with port-forward\r\n```\r\n$ kubectl get svc | grep cobol\r\ncobolmcp                                                ClusterIP   10.43.183.219   <none>        8090/TCP                                                      18m\r\n\r\n$ kubectl port-forward svc/cobolmcp 8099:8090\r\nForwarding from 127.0.0.1:8099 -> 8090\r\nForwarding from [::1]:8099 -> 8090\r\n```\r\n\r\n## License\r\n\r\nMIT\r\n",
  "bytes": 4164,
  "sha": "8cfaf6a931898fcecace5de6a0b6b6c1f380bd90ef57a3da98f971c5fd2f7a33",
  "repo_slug": "idjohnson/cobolmcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_idjohnson_cobolmcp_047d7370/readme"
}