pjkm.mcp.server

pjkm MCP server — expose project scaffolding as MCP tools and resources.

Install: pip install pjkm[mcp] Run: python -m pjkm.mcp

pjkm-mcp fastmcp run pjkm.mcp.server:mcp

Attributes

mcp

Functions

init_project(name[, recipe, archetype, groups, directory])

Create a new Python project with pjkm.

add_groups(groups[, directory])

Add package groups to an existing pjkm project.

preview_project([recipe, archetype, groups])

Preview what a project would look like without creating it.

list_recipes()

List all 22 available project recipes.

list_groups([category])

List available package groups, optionally filtered by category.

get_group_info(group_id)

Get detailed information about a specific package group.

search_registry([query])

Search the pjkm registry for community group packs.

create_recipe(name, archetype, groups[, description, ...])

Create a custom recipe YAML file for reuse.

adopt_project([directory])

Scan an existing project and suggest pjkm groups to adopt.

project_status([directory])

Show the pjkm status of a project.

get_recipes_resource()

All available pjkm recipes with full details.

get_groups_resource()

All 105 groups organized by category.

get_group_resource(group_id)

Detailed info for a specific group.

get_registry_resource()

Community group pack registry.

get_archetypes_resource()

Available project archetypes.

get_blueprints_resource()

Workspace blueprints for multi-service platforms.

get_categories_resource()

Group categories with counts.

project_advisor(description)

Recommend the best pjkm recipe and groups for a project.

architecture_advisor(requirements)

Design a multi-service architecture using pjkm workspace blueprints.

agent_scaffold([agent_type])

Guide for scaffolding an AI agent project.

main()

Run the pjkm MCP server.

Module Contents

pjkm.mcp.server.mcp[source]
pjkm.mcp.server.init_project(name, recipe=None, archetype=None, groups=None, directory='.')[source]

Create a new Python project with pjkm.

Use recipe for a pre-configured setup (e.g. “fastapi-service”, “ai-agent”), or specify archetype + groups for custom composition.

Parameters:
  • name (str) – Project name (e.g. “my-api”)

  • recipe (str | None) – Recipe name (overrides archetype/groups). See list_recipes().

  • archetype (str | None) – Project archetype: single-package, service, poly-repo, script-tool

  • groups (list[str] | None) – List of group IDs to include (e.g. [“api”, “database”, “redis”])

  • directory (str) – Parent directory to create the project in

Returns:

Summary of what was created.

Return type:

str

pjkm.mcp.server.add_groups(groups, directory='.')[source]

Add package groups to an existing pjkm project.

Merges dependencies into pyproject.toml, renders scaffolded files, and updates [tool.pjkm.groups].

Parameters:
  • groups (list[str]) – Group IDs to add (e.g. [“auth”, “redis”])

  • directory (str) – Project directory containing pyproject.toml

Return type:

str

pjkm.mcp.server.preview_project(recipe=None, archetype=None, groups=None)[source]

Preview what a project would look like without creating it.

Shows the file tree, dependencies, and workflows that would be generated.

Parameters:
  • recipe (str | None) – Recipe name (e.g. “fastapi-service”)

  • archetype (str | None) – Archetype (needed if no recipe)

  • groups (list[str] | None) – Groups to preview

Return type:

str

pjkm.mcp.server.list_recipes()[source]

List all 22 available project recipes.

Returns recipe names, archetypes, group counts, and descriptions. Use a recipe name with init_project() to create a project.

Return type:

str

pjkm.mcp.server.list_groups(category=None)[source]

List available package groups, optionally filtered by category.

Parameters:

category (str | None) – Filter by category. Options: “Core Dev”, “AI / ML”, “Web & API”, “Data & Storage”, “Infrastructure”, “Frontend”, “Docs & Meta”, “Platform”. None returns all groups.

Return type:

str

pjkm.mcp.server.get_group_info(group_id)[source]

Get detailed information about a specific package group.

Parameters:

group_id (str) – Group ID (e.g. “database”, “langchain”, “api”)

Returns:

description, category, dependencies, scaffolded files, required groups, and pyproject.toml tool config.

Return type:

Full details

pjkm.mcp.server.search_registry(query='')[source]

Search the pjkm registry for community group packs.

Parameters:

query (str) – Search term (name, tag, group name, or description). Empty string returns all packs.

Return type:

str

pjkm.mcp.server.create_recipe(name, archetype, groups, description='', directory='.')[source]

Create a custom recipe YAML file for reuse.

Saves a recipe definition that can be shared via git or group sources.

Parameters:
  • name (str) – Recipe name (e.g. “my-stack”)

  • archetype (str) – single-package, service, poly-repo, or script-tool

  • groups (list[str]) – List of group IDs to include

  • description (str) – Human-readable description

  • directory (str) – Where to save (default: .pjkm/recipes/)

Return type:

str

pjkm.mcp.server.adopt_project(directory='.')[source]

Scan an existing project and suggest pjkm groups to adopt.

Detects frameworks and tools from pyproject.toml, requirements.txt, and project structure (Dockerfile, alembic/, etc.).

Parameters:

directory (str) – Project directory to scan

Return type:

str

pjkm.mcp.server.project_status(directory='.')[source]

Show the pjkm status of a project.

Displays applied groups, archetype, and dependency drift.

Parameters:

directory (str) – Project directory

Return type:

str

pjkm.mcp.server.get_recipes_resource()[source]

All available pjkm recipes with full details.

Return type:

str

pjkm.mcp.server.get_groups_resource()[source]

All 105 groups organized by category.

Return type:

str

pjkm.mcp.server.get_group_resource(group_id)[source]

Detailed info for a specific group.

Parameters:

group_id (str)

Return type:

str

pjkm.mcp.server.get_registry_resource()[source]

Community group pack registry.

Return type:

str

pjkm.mcp.server.get_archetypes_resource()[source]

Available project archetypes.

Return type:

str

pjkm.mcp.server.get_blueprints_resource()[source]

Workspace blueprints for multi-service platforms.

Return type:

str

pjkm.mcp.server.get_categories_resource()[source]

Group categories with counts.

Return type:

str

pjkm.mcp.server.project_advisor(description)[source]

Recommend the best pjkm recipe and groups for a project.

Given a description of what the user wants to build, analyze the requirements and suggest the optimal recipe, archetype, and groups.

Parameters:

description (str)

Return type:

str

pjkm.mcp.server.architecture_advisor(requirements)[source]

Design a multi-service architecture using pjkm workspace blueprints.

Given system requirements, suggest a workspace layout with services, shared libraries, and infrastructure.

Parameters:

requirements (str)

Return type:

str

pjkm.mcp.server.agent_scaffold(agent_type='general')[source]

Guide for scaffolding an AI agent project.

Provides step-by-step instructions for creating an agent with the right groups, tools, and configuration.

Parameters:

agent_type (str)

Return type:

str

pjkm.mcp.server.main()[source]

Run the pjkm MCP server.