home / mcp / mcp templates server

MCP Templates Server

Stores and enables searching 1C BSL templates through an MCP server with a web UI and Cursor integration.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "alonehobo-1c_templates_mcp": {
      "url": "http://localhost:8023/mcp"
    }
  }
}

You can store, search, and manage 1C BSL code templates with an MCP server that provides a web interface for editing and retrieving templates. This makes it easy to reuse reusable BSL snippets across your 1C projects and share them with Cursor clients.

How to use

You connect to the MCP server from your MCP client or Cursor by using the server’s HTTP endpoint. The web interface lets you view templates, search by name/description/tags, and create or edit templates directly in your browser.

How to install

Prerequisites you need before starting are Docker and Docker Compose on the host machine.

1) Start the server in detached mode using Docker Compose.

docker compose up -d

2) Open the web interface in your browser.

http://localhost:8023

3) After the first launch, two demo templates are created automatically: a printing form module and a SDI report for a value table. Templates are stored on the host in data/templates/ (Docker volume).

4) To add a template manually, create a JSON file under data/templates, for example data/templates/my_template.json, with the following structure. The file is picked up immediately without restarting the container.

{
  "id": "my_template",
  "name": "My Template",
  "description": "Description",
  "tags": ["tag1", "tag2"],
  "code": "// BSL code..."
}

Additional sections

Web interface features include listing templates with search, creating and editing templates (code is edited in a built-in editor), and deleting templates.

Connection from Cursor uses the Streamable HTTP transport. Configure the MCP server in Cursor with an explicit transport type and URL as shown in the example below.

{
  "mcpServers": {
    "1c-templates": {
      "type": "streamableHttp",
      "url": "http://localhost:8023/mcp"
    }
  }
}

Project structure and manual template addition

The project layout includes a simple FastAPI-based MCP server, a JSON-based storage system, and a minimal web UI.

Project layout (high level): - Dockerfile - docker-compose.yml - requirements.txt - app/ - main.py # FastAPI + FastMCP - storage.py # CRUD by JSON files - seeds.py # Initial templates - html/ # Jinja2 web UI - data/ - templates/ # JSON template files

Adding a template manually

Create a JSON file at data/templates/my_template.json with the following content. The server picks it up immediately without needing a restart.

{
  "id": "my_template",
  "name": "My Template",
  "description": "Description",
  "tags": ["tag1", "tag2"],
  "code": "// BSL code..."
}

Available tools

list_templates

Returns a list of all templates with their id, name, description, and tags.

get_template

Retrieves the full template including its BSL code by template id.

search_templates

Searches templates by substring in name, description, or tags.