1C OData MCP

v1.0.1
io.github.alexgrebeshok-coder/onec-odata-mcp Checked 2 days ago Published 4 months ago

Read-only MCP server for 1C:Enterprise via OData with metadata and query builder tools.

Values you need

VariableWhat it is
ONEC_BASE_URLrequired 1C OData endpoint URL (e.g. https://host/db/odata/standard.odata)
ONEC_USERNAMErequired Basic auth username for the OData endpoint
ONEC_PASSWORDrequired secret Basic auth password for the OData endpoint
ONEC_DATABASEoptional Optional database name hint
ONEC_METADATA_CACHE_TTL_MSoptional Metadata cache TTL in milliseconds (default 3600000)
ONEC_CONFIG_PATHoptional Optional path to JSON config file ({ baseUrl, username, password })

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add onec-odata-mcp -e 'ONEC_BASE_URL=<ONEC_BASE_URL>' -e 'ONEC_PASSWORD=<ONEC_PASSWORD>' -e 'ONEC_USERNAME=<ONEC_USERNAME>' -- npx -y onec-odata-mcp@1.0.1
Add to claude_desktop_config.json
{
  "mcpServers": {
    "onec-odata-mcp": {
      "args": [
        "-y",
        "onec-odata-mcp@1.0.1"
      ],
      "command": "npx",
      "env": {
        "ONEC_BASE_URL": "<ONEC_BASE_URL>",
        "ONEC_PASSWORD": "<ONEC_PASSWORD>",
        "ONEC_USERNAME": "<ONEC_USERNAME>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "onec-odata-mcp": {
      "args": [
        "-y",
        "onec-odata-mcp@1.0.1"
      ],
      "command": "npx",
      "env": {
        "ONEC_BASE_URL": "<ONEC_BASE_URL>",
        "ONEC_PASSWORD": "<ONEC_PASSWORD>",
        "ONEC_USERNAME": "<ONEC_USERNAME>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "ONEC_BASE_URL",
      "id": "onec-base-url",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "ONEC_PASSWORD",
      "id": "onec-password",
      "password": true,
      "type": "promptString"
    },
    {
      "description": "ONEC_USERNAME",
      "id": "onec-username",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "onec-odata-mcp": {
      "args": [
        "-y",
        "onec-odata-mcp@1.0.1"
      ],
      "command": "npx",
      "env": {
        "ONEC_BASE_URL": "${input:onec-base-url}",
        "ONEC_PASSWORD": "${input:onec-password}",
        "ONEC_USERNAME": "${input:onec-username}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.onec-odata-mcp]
command = "npx"
args = ["-y", "onec-odata-mcp@1.0.1"]
env = { "ONEC_BASE_URL" = "<ONEC_BASE_URL>", "ONEC_PASSWORD" = "<ONEC_PASSWORD>", "ONEC_USERNAME" = "<ONEC_USERNAME>" }

For AI agents

  1. Ask the user for: ONEC_BASE_URL, ONEC_USERNAME, ONEC_PASSWORD. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: odata_config, odata_list_entities, odata_metadata, odata_explain_entity, odata_build_query, odata_query, odata_count, odata_financial_summary.
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json