Skip to content
Development
Command

/setupmcp

Connect already installed MCP servers and available memory providers to the current repository by asking for their endpoints and project scope

BOOST
From plugin
ai-rules-1c
48745 skills13 agents45 commands
Install
> /plugin marketplace add comol/ai_rules_1c
> /plugin install 1c-rules@1c-rules

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/setupmcp

Context preview

What this command does when you run it.

Connect already installed MCP servers and available memory providers to the current repository by asking for their endpoints and project scope

Command definition

setupmcp.md
description: Connect already installed MCP servers and available memory providers to the current repository by asking for their endpoints and project scope
userOnly: true

/setupmcp — connect existing MCP servers to this project

Use when MCP servers are already installed locally or remotely and a new repository needs its own client connections and memory scope. Ask for missing addresses, merge the selected connections into the current project's active client config, and verify them. Reuse confirmed answers from the current request.

This command configures connections only. It does not download distributions, install packages, start or recreate servers, change Docker mounts, register/reindex server-side projects, or migrate memory. Fresh installation belongs to `content/commands/installmcp.md`, `content/commands/install-cognee.md` and `content/commands/install-openviking.md`; updates belong to `content/commands/updatemcp.md`.

Load `content/rules/mcp-deployment.md` for target/address handling. A shared Debian/Ubuntu Docker host is an optional existing deployment; the client needs no local Docker/Desktop/WSL. Reuse its recorded endpoints and allocated ports. This connection-only command never scans for replacement ports or reallocates them; automatic allocation belongs to fresh installation on the deployment host.

1. Inspect the current repository

Resolve the repository root and active AI client from the session and `.ai-rules.json` when present. A global command file still operates on the current repository, not on its own directory or on a previously configured project. If several clients are installed, use the current one unless the user selected more; ask only if the active client cannot be determined.

Read the current project MCP config, relevant user-level MCP entries (read-only), `.dev.env`, `USER-RULES.md` and the existing contour catalog when declared. Never print credentials. Resolve the target and schema from `adapters/<tool>.yaml` in the rules source; installed copies can use `content/commands/installmcp.md` → Step 7. Per-client MCP config. Do not invent a second vendor directory or use a global CLI add command that silently writes outside the repository.

Apply `TOOL_*` policy from `content/rules/mcp-policy.md`. Preserve existing values, including `off` and `required`. Explicit setup permits inspecting a disabled provider; only explicit selection permits configuring it, and neither action silently changes its ordinary-use policy. Missing `.dev.env` keys use the documented defaults; do not copy the entire example over existing settings.

**External installation:** detect `.ai-rules.json` `integrations.mcp.mode = "external"`, `BASESAI_MCP_GLOBAL_ROOT`, or `.dev.env` `MCP_GLOBAL_ROOT`. Resolve the installation manifest and its global/project consumers using the external-installation contract in `AGENT-INSTALL.md` (or the matching section of the installed `/checkmcp` procedure). Use actual server IDs and URLs, not the default catalog ports. A missing or stale external manifest is an unresolved ownership issue, not permission to reset the connection to catalog defaults.

2. Collect endpoints in one question

Show the discovered connections with their purpose, scope (global/project), and whether their addresses are confirmed for this repository. Use `content/mcp-servers.json` only as a server-purpose catalog when available. An installer-generated localhost URL is a candidate, not evidence that this server is installed or serves the new project.

Ask only for missing or ambiguous choices, in one compact question in the user's language. For a new project without confirmed connections, use this shape:

> Укажите полные MCP-адреса уже установленных серверов для этого репозитория: справка 1С, БСП, шаблоны, проверка синтаксиса, проверка кода, поиск по коду/метаданным и граф. Это могут быть локальные адреса или DNS/IP общего сервера Debian/Ubuntu с Docker вместо 127.0.0.1. Можно написать «оставить найденные» или «пропустить» для отдельных серверов. Есть ли уже установленная память Cognee или OpenViking? Если да, укажите MCP-адрес и существующий dataset/область проекта, если она задана; если нет — напишите «нет».

Keep confirmed entries out of the question. Accept full URLs with their actual scheme, host, port and path, including remote hosts, reverse-proxy prefixes, `/mcp`, `/mcp/` or an existing SSE endpoint. Ask for clarification on a bare host or missing transport/path; do not derive all addresses from one hostname, assume default ports, or replace SSE with HTTP without evidence. Reuse an existing stdio connection only when its command, arguments and durable paths are known; prefer an existing shared HTTP memory endpoint over spawning another process against the same store.

For optional live-infobase MCP, ask for its existing endpoint only when selected or already configured. Read any existing `INFOBASE_PUBLISH_URL` without changing the publication or credentials. EDT and browser MCP are not implicit members of the 1C bundle.

Ask for authentication requirements only when the selected connection needs them. Request the client's supported environment/secret reference, not a token pasted into tracked files. Preserve existing auth settings and keep secrets out of reports, `USER-RULES.md`, memory notes and version control. Never forward credentials from an old endpoint to a changed host without confirming that they belong to the new service.

If no memory provider exists, skip that branch and continue MCP setup. Do not install memory or treat its absence as an installation request. An explicitly skipped server is left untouched, not deleted or disabled.

3. Resolve project and memory scope

**Search indexes.** A successful connection does not prove that Graph or Code Metadata contains this repository. Load `content/rules/multi-contour-search.md` and, for a base with extensions, `content/rules/extension-workspace.md`. Before using 1C tools, load `content/skills/mcp-1

Read more
Ships withai-rules-1c

Rules\skills\subagens for vibecoding in 1C(bsl)

Get the whole plugin

Other commands on ai-rules-1c.