elements-mcp Project Guide
elements-mcp is a read-only MCP server that packages shared Elements engineering standards, skills, and templates as a Python package for Codex, GitHub Copilot, and other AI coding agents.
This document is for maintainers. It describes the project structure, development verification, release flow, and content maintenance rules. For user installation and MCP client setup, see docs/install-elements-mcp-user-guide-zh.md.
Goals and Boundaries
Goals:
- Consolidate engineering standards, domain knowledge, skills, prompts, and templates shared by multiple business repositories into reusable MCP content.
- Distribute the Python package through PyPI so users get the latest version by default, while still allowing pinned versions when needed.
- Expose packaged skills/templates and reusable prompts through MCP tools, resources, and prompts.
- Keep the server read-only to reduce security risk.
Boundaries:
- The server may list, search, and read packaged skills/templates.
- The server must not write files, delete files, execute shell commands, install dependencies, or read paths outside the package.
- Any future write-capable or execution-capable tools require a separate security design.
Repository Layout
elements-mcp/
README.md
README.zh-CN.md
MANIFEST.in
pyproject.toml
docs/
install-elements-mcp-user-guide-zh.md
scripts/
install_elements_mcp.py
publish-pypi.ps1
pypi-publish.env.example.ps1
update-package-metadata.ps1
src/
elements_mcp/
__init__.py
server.py
tools/
resources/
registry.py
handlers.py
content/
skills/
ui-standard-layout/
api-integration/
prompts/
registry.py
handlers.py
content/
tests/
Key File Responsibilities
pyproject.toml: Python package configuration, including package name, version, dependencies, entry point, package data, and pytest configuration.MANIFEST.in: source distribution rules; keeps runtime content and excludesdocs/.src/elements_mcp/tools/: MCP tool registration and implementations.src/elements_mcp/resources/: MCP resource registration, skills/templates index, and packaged resource content.src/elements_mcp/prompts/: MCP prompt registration, prompt index, and packaged prompt content.src/elements_mcp/server.py: FastMCP server assembly layer that registers tools, resources, and prompts.tests/: development and pre-release verification; not a user runtime dependency.docs/install-elements-mcp-user-guide-zh.md: user installation and client setup guide.scripts/install_elements_mcp.py: cross-platform isolated-install helper; installs to the fixedTools\elements-mcpdirectory and usesuvto install the latestelements-mcpfrom PyPI.scripts/publish-pypi.ps1: release script; usesuvto prepare the project-root.venv, then runs tests, builds, checks, and uploads.scripts/pypi-publish.env.example.ps1: local PyPI token configuration template.scripts/update-package-metadata.ps1: maintenance script for synchronizing package name and version text.
MCP Contract
Tools:
get_elements_diagnostics(task="", max_skills=5)
get_project_guidance(task, max_skills=3, profile="summary")
list_project_skills()
read_project_skill(skill_name)
search_project_skills(query)
list_skill_templates(skill_name)
read_skill_template(skill_name, template_name)
list_skill_references(skill_name)
read_skill_reference(skill_name, reference_name)
Resources:
elements-skill://i18n-usage/SKILL.md
elements-skill://naming-conventions/SKILL.md
elements-skill://page-structure/SKILL.md
elements-skill://{skill_name}/SKILL.md
elements-template://{skill_name}/{template_name}
elements-reference://{skill_name}/{reference_name}
The three concrete elements-skill://.../SKILL.md resources are core static
skills that show up in list_resources(). Parameterized skill, template, and
reference URIs remain available for reading packaged content by name.
Prompts:
apply_project_skill(skill_name, task)
check-i18n
create-filter-table
All tools should be marked as read-only, non-destructive, idempotent, and closed-world.
The current project, IDE integration, or other AI host should automatically call
get_project_guidance(userMessage, profile="summary") after the user starts a
coding request. Users should not need to type MCP tool names manually. Callers
should read the routed skill/template resource URIs only when their details are
needed.
summary is the default and the only profile intended for automatic agent
preflight. Agents should read routed resource URIs for details instead of
automatically escalating profiles. primary and full remain available only
for explicit deep retrieval, compatibility checks, and diagnostics.
When matched=true, the caller should use route as the canonical structured
result, present every required_inputs item before implementation, and use
guidance only as a compact compatibility rendering. required_template
remains a metadata-only alias for the first required input during migration.
When matched=false, continue the normal coding flow, do not block the user
request, and do not invent nonexistent project rules.
Content Maintenance
Add skills under:
src/elements_mcp/resources/content/skills/
Add a skill:
src/elements_mcp/resources/content/skills/<skill-name>/
SKILL.md
templates/
example.template.mdx
Add prompts:
src/elements_mcp/prompts/content/<prompt-name>.prompt.md
Rules:
SKILL.mdis required.templates/is optional.references/is optional and should hold full guides, deep recipes, and other details retrieved intentionally.- Skill and template file names should use letters, digits, dots, underscores, and hyphens.
- Do not use spaces, Chinese file names, path separators, or special characters.
- Put long reusable examples in
templates/*.template.mdxinstead of making a singleSKILL.mdtoo long. - Every packaged skill must declare
metadata.routing.kindasspecializedorsupporting. - Gated skills must declare
metadata.intake.required: trueand a validmetadata.intake.template. - Keep
SKILL.mdentrypoints at or below 10 KB when possible. Content above 10 KB is a warning; content above 15 KB requires explicit review.
Supported metadata example:
metadata:
routing:
kind: specialized
intake:
required: true
template: request-input.template.yaml
get_elements_diagnostics reports metadata support, content sizes, catalog
names, and optional raw routing scores. The project intentionally keeps the
validated frontmatter subset and cached linear search: the current small corpus
does not justify a new YAML dependency or precomputed search index.
Local Development
Maintainers should use uv and the project-root .venv as the development, testing, and publishing environment. Do not install development dependencies into the global Python environment or user site-packages.
cd C:\Code\elements-mcp
uv venv .venv
uv pip install --python .\.venv\Scripts\python.exe -e ".[dev]"
Run tests:
.\.venv\Scripts\python.exe -m pytest
Run the server:
.\.venv\Scripts\python.exe -m elements_mcp.server
Verify the registry:
.\.venv\Scripts\python.exe -c "from elements_mcp.resources.registry import SkillRegistry; print([skill.name for skill in SkillRegistry().list_skills()])"
Verify the server:
.\.venv\Scripts\python.exe -c "from elements_mcp.server import create_server; print(create_server().name)"
Build and Publish
If code or packaged content changes, update the version before publishing a new package and rebuild clean distribution artifacts.
Publishing also uses only the project-root .venv. scripts\publish-pypi.ps1 uses uv to create or update that environment, then calls .\.venv\Scripts\python.exe to run tests, build, check, and upload. To prepare manually, run:
uv pip install --python .\.venv\Scripts\python.exe -U build twine
For normal publishing, run the one-step script. The script cleans dist/, runs tests, builds distributions, runs twine check, and uploads:
.\scripts\publish-pypi.ps1
Publish to a non-default repository:
.\scripts\publish-pypi.ps1 -Repository <repository-name>
Expected artifacts:
dist/elements_mcp-<version>.tar.gz
dist/elements_mcp-<version>-py3-none-any.whl
If you need to troubleshoot build or publish issues, run the main script steps manually:
Remove-Item -LiteralPath dist -Recurse -Force -ErrorAction SilentlyContinue
.\.venv\Scripts\python.exe -m pytest
.\.venv\Scripts\python.exe -m build
.\.venv\Scripts\python.exe -m twine check dist/*
When publishing a new version:
- Update
versioninpyproject.toml. - If needed, run
.\scripts\update-package-metadata.ps1 -Version <version> -WhatIfto preview version text updates, then rerun without-WhatIf. - Confirm
scripts/pypi-publish.env.ps1is configured with a PyPI token and keepsTWINE_USERNAMEas__token__. - Run
.\scripts\publish-pypi.ps1; the script cleans olddist/, runs tests, builds, runstwine check, and uploads to PyPI. - If the script fails midway, fix the failure and rerun the same command.
- Confirm the new version appears at https://pypi.org/project/elements-mcp/.
- Verify installation in a clean virtual environment:
uv venv C:\Temp\elements-mcp-publish-check
uv pip install --python C:\Temp\elements-mcp-publish-check\Scripts\python.exe elements-mcp==<version>
C:\Temp\elements-mcp-publish-check\Scripts\python.exe -c "from elements_mcp.server import create_server; print(create_server().name)"
- Tell users who use
uvxto restart their MCP client. If they use a fixed virtual environment, tell them to rerun the isolated-environment update command from the user guide. For rollback or staged verification, specifyelements-mcp==<version>.
src/elements_mcp/__init__.py reads __version__ from installed package metadata, so it does not need separate manual version maintenance.
Documentation Roles
README.md: English version of this maintainer guide.README.zh-CN.md: Chinese version of this maintainer guide.docs/install-elements-mcp-user-guide-zh.md: Chinese user guide for installingelements-mcp, configuring MCP clients, and troubleshooting connection issues.
Metadata
Release files for elements-mcp 0.1.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| elements_mcp-0.1.17.tar.gz | 105.3 kB | Without provenance | Details for elements_mcp-0.1.17.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| elements_mcp-0.1.17-py3-none-any.whl | Python 3 | none | any | Details for elements_mcp-0.1.17-py3-none-any.whl |
Total release size: 223.1 kB
Release files / elements_mcp-0.1.17.tar.gz
| Download URL | elements_mcp-0.1.17.tar.gz |
|---|---|
| Size | 105.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
efa4ab1bd9c3143971f5cbcb8e96a270c80080c5f857b49bd59f99b81b93bb9f
|
|
BLAKE2b-256 checksum How to use checksums |
846bca4a397a694300106c3e77a7b35c14513c8094df005d33603d7553d42001
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / elements_mcp-0.1.17-py3-none-any.whl
| Download URL | elements_mcp-0.1.17-py3-none-any.whl |
|---|---|
| Size | 117.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c4a64e38950ee45950b76d9e15ae249c569fa67ad704a7362982bf99011665f
|
|
BLAKE2b-256 checksum How to use checksums |
5ee841f426447db4a36eab98afbb0e8d6d1cfd66f9d282d7bc74049c26a9e5ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for elements-mcp 0.1.17
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.