- Home
- MCP servers
- MCP Templates Server
MCP Templates Server
- python
2
GitHub Stars
python
Language
1 month ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
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.
- Start the server in detached mode using Docker Compose.
docker compose up -d
- Open the web interface in your browser.
http://localhost:8023
-
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).
-
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.