home / mcp / mcp templates server
Stores and enables searching 1C BSL templates through an MCP server with a web UI and Cursor integration.
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.
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.
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 -d2) Open the web interface in your browser.
http://localhost:80233) 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..."
}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"
}
}
}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
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..."
}Returns a list of all templates with their id, name, description, and tags.
Retrieves the full template including its BSL code by template id.
Searches templates by substring in name, description, or tags.