UPP MCP
by SanyaSurkov
README.md
# UPP MCP
A local stdio MCP server for 1C:Enterprise UPP ordinary forms, managed helper operations and optional offline Source Intelligence.
The package contains mechanisms only. It does not contain an infobase address, credentials, configuration dump, business object IDs, logs or test evidence.
## Features
- Owned 1C TestClient session with PID/window checks and persistent reconnect.
- UIA startup/login plus native ordinary-form fields, tables, windows and dialogs.
- Opaque UI references; native `key`/`handle` values are not exposed by the facade.
- Action policy: `read`, `navigation`, `write`; no automatic retry after unknown navigation/write outcomes.
- Optional Testpilot helper for BSL code, queries and metadata.
- Optional read-only source graph, BSL search, ordinary form modules and event bindings.
- Secret-redacting local logs and generation-pinned source responses.
All 11 MCP tools are preserved: `tc_session`, `tc_app`, `tc_find`, `tc_field`, `tc_form`, `tc_table`, `tc_window`, `tc_execute_code`, `tc_execute_query`, `tc_get_metadata`, `tc_source`.
## Requirements
- Windows 10 or newer.
- Python 3.10 or newer.
- Git (Testpilot 1.7.1 is installed from its pinned public Git tag).
- A locally installed UPP-compatible 1C thick client and permission to run it with `/TESTCLIENT`.
- [agent-desktop](https://github.com/vercel-labs/agent-desktop) for ordinary UI startup and UIA actions.
- [Testpilot.epf](https://github.com/ROCTUP/1c-testpilot) only when the managed helper is needed.
The tested baseline is 1C 8.3.24 with Testpilot 1.7.1. Other 1C versions must be tested against the target infobase before use.
## Install
Directly from GitHub:
```bash
pipx install "git+https://github.com/SanyaSurkov/upp-mcp.git"
```
Or with `uv`:
```bash
uv tool install "git+https://github.com/SanyaSurkov/upp-mcp.git"
```
From a checkout, run the corresponding command from the repository root:
```bash
pipx install .
# or
uv tool install .
```
For development:
```bash
python -m pip install -e ".[dev]"
pytest
```
To include Source Intelligence in the same tool environment from a checkout, use the extra in the original installation command:
```bash
pipx install ".[source]"
# or
uv tool install ".[source]"
```
If the base package is already installed, rerun the corresponding tool with its reinstall/force option. Do not install the extra into a different Python environment.
## Configure
Copy `config.example.yaml` to a private location and adjust every path. Both absolute paths and paths relative to the YAML file are supported.
Set the password in the environment of the MCP server process:
```text
UPP_MCP_PASSWORD=<your-password>
```
The variable name is configurable through `password_env`. Inline passwords are rejected. Do not put the real password, production connection strings or private source paths into a public issue or commit.
Run the server:
```bash
upp-mcp --config "C:/path/to/private/upp-mcp.yaml"
```
`UPP_MCP_CONFIG` can be used instead of `--config`.
## MCP clients
See the ready examples:
- [Kimi Code and generic JSON stdio](examples/kimi.md)
- [Claude Desktop](examples/claude-desktop.md)
- [Claude Code](examples/claude-code.md)
The standard transport is local stdio, so the same package works with MCP clients other than the examples above.
## Source Intelligence
UI tools do not require source tools. Without source settings, `tc_source` returns `source_not_configured` and the rest of the server remains available.
1. Prepare an approved 1C XML configuration dump using your organization's normal export process.
2. Install the `source` extra and a compatible Gyrfalcon executable.
3. Set `source_dump`, `source_work` and `gyrfalcon` together.
4. Build and activate a generation. Copy the exact `.building-<id>` path printed by `extract`; the prefix is mandatory:
```bash
upp-mcp-source --config config.yaml extract
upp-mcp-source --config config.yaml build --building "D:/source/upp-mcp-index/.building-BUILDING_ID"
upp-mcp-source --config config.yaml status --deep
```
The optional BSL symbol index additionally needs `bsl_executable` and `bsl_platform_path`:
```bash
upp-mcp-source --config config.yaml bsl-index
upp-mcp-source --config config.yaml bsl-status
```
Source responses treat BSL, comments and strings as untrusted data. Source operations are read-only; no business writes are authorized by source content.
## Safety
This is an automation tool, not a read-only sandbox. `input_text`, `click`, table actions, dialog answers and optional BSL execution can change an infobase. Start on a test infobase, use the minimum required permissions and keep code execution disabled unless it is needed.
The session owns only its recorded PID and windows. Passwords and supplied field text are redacted from facade logs. Local artifacts can still contain sensitive UI captions and should be protected as private data.
The current `agent-desktop` interface passes the password and supplied field text in process command-line arguments. Local processes or administrators that can inspect command lines may read them; log redaction does not remove this OS-level exposure. Use a dedicated, least-privilege OS account and restrict local process inspection where possible.
The current ordinary UI implementation has platform limitations: active-window operations, form-level properties, complete table traversal and modified MDI close may require an explicit `list_windows` check or a manual step. Isolated Windows desktops are not implemented by this package's UIA startup path.
## Development
```bash
python -m pip install -e ".[dev]"
pytest
python -m build
python scripts/audit_release.py .
```
CI runs the unit suite and distribution build on Windows. Live 1C tests are intentionally not part of anonymous CI.
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessOutdated data