Get the FREE Ultimate OpenClaw Setup Guide →

1C_MCP_SERVER_OWN

Доработка и адаптация MCP 1С под текущие задачи при работе с Агентами

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio alexmiawat-1c_mcp_server_own python -m src.py_server stdio \
  --env MCP_HOST="server host (default 127.0.0.1)" \
  --env MCP_PORT="server port (default 8000)" \
  --env MCP_ONEC_URL="URL of 1C base" \
  --env MCP_AUTH_MODE="Authorization mode (e.g., none or oauth2)" \
  --env MCP_ONEC_PASSWORD="1C password" \
  --env MCP_ONEC_USERNAME="1C username"

How to use

This MCP server acts as a proxy between AI agents (such as Claude Desktop or Cursor) and your 1C:Enterprise database. It translates natural-language MCP requests into JSON-RPC calls to 1C, then formats 1C responses back into MCP-friendly results for the AI agents. The server supports two operation modes: stdio for local client development and HTTP for web-based clients. With OAuth2 support, each user can authenticate and access the 1C data securely, enabling scalable multi-user workflows for metadata extraction, structure analysis, and predefined data generation.

To use the server, start it in stdio mode for local testing or in HTTP mode to expose endpoints for web clients. Once running, you can query metadata (list, structure, predefined data) using the provided API methods, and the MCP proxy will handle authentication, request translation, and response mapping automatically. Ensure your 1C base URL and credentials are correctly configured in environment variables or an .env file when running in HTTP mode.

How to install

Prerequisites:

  • Python 3.11 or newer
  • Git

Step-by-step installation:

  1. Clone the repository git clone https://github.com/your-repo/1c-mcp-server-own.git cd 1c-mcp-server-own

  2. Create a virtual environment python -m venv venv

    Windows

    venv\Scripts\activate

    Linux/macOS

    source venv/bin/activate

  3. Install dependencies pip install -r requirements.txt

  4. Configure environment variables Create a local env file or export variables, for example: MCP_ONEC_URL=http://localhost/base MCP_ONEC_USERNAME=admin MCP_ONEC_PASSWORD=password MCP_HOST=127.0.0.1 MCP_PORT=8000 MCP_AUTH_MODE=none

  5. Run the server (stdio mode for local testing) python -m src.py_server stdio

To run in HTTP mode and expose endpoints, use: python -m src.py_server http --port 8000

  1. Optional: health check curl http://localhost:8000/health

Additional notes

Tips and notes:

  • If you enable OAuth2, ensure MCP_AUTH_MODE=oauth2 and set MCP_PUBLIC_URL to your public server URL.
  • In stdio mode, the server communicates via stdin/stdout and logs to stderr; use it for local client development.
  • In HTTP mode, endpoints include /mcp/, /sse, /health, /info. Ensure CORS and network access are configured as needed for your environment.
  • When troubleshooting, enable verbose logs or DEBUG level to capture detailed interactions between the proxy and 1C.
  • Keep your Python dependencies up to date and pin versions in requirements.txt to avoid breaking changes.
  • This server acts as a bridge; ensure the underlying 1C service is reachable from the host running the MCP server.

Related MCP Servers

Sponsor this space

Reach thousands of developers