CLI tool for creating and managing FIPS-compliant AI agent projects
Project description
FIPS Agents CLI
A command-line tool for creating and managing FIPS-compliant AI agent projects, with a focus on MCP (Model Context Protocol) server development.
Features
- ๐ Quick project scaffolding from templates
- ๐ฆ MCP server project generation
- ๐ง Automatic project customization
- โก Component generation (tools, resources, prompts, middleware)
- ๐จ Beautiful CLI output with Rich
- โ Git repository initialization
- ๐งช Comprehensive test coverage with auto-run
Installation
Recommended: Install with pipx for isolated command-line tools:
pipx install fips-agents-cli
pipx installs the CLI in an isolated environment while making it globally available. This prevents dependency conflicts with other Python packages.
Alternative: Using pip
If you prefer pip or don't have pipx installed:
pip install fips-agents-cli
Note: Consider using a virtual environment to avoid dependency conflicts.
Alternative: Install from source (for development)
For contributing or local development:
# Clone the repository
git clone https://github.com/rdwj/fips-agents-cli.git
cd fips-agents-cli
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in editable mode with dev dependencies
pip install -e .[dev]
Quick Start
Create a new MCP server project
fips-agents create mcp-server my-awesome-server
This will:
- Clone the MCP server template
- Customize the project with your chosen name
- Initialize a git repository
- Provide next steps for development
Specify a target directory
fips-agents create mcp-server my-server --target-dir ~/projects
Skip git initialization
fips-agents create mcp-server my-server --no-git
Generate components in an existing project
# Navigate to your MCP server project
cd my-mcp-server
# Generate a new tool
fips-agents generate tool search_documents --description "Search through documents"
# Generate a resource
fips-agents generate resource config_data --description "Application configuration"
# Generate a prompt
fips-agents generate prompt code_review --description "Review code for best practices"
# Generate middleware
fips-agents generate middleware auth_middleware --description "Authentication middleware"
Usage
Basic Commands
# Display version
fips-agents --version
# Get help
fips-agents --help
fips-agents create --help
fips-agents create mcp-server --help
fips-agents generate --help
fips-agents generate tool --help
Create MCP Server
fips-agents create mcp-server <project-name> [OPTIONS]
Arguments:
project-name: Name for your MCP server project (must start with lowercase letter, contain only lowercase letters, numbers, hyphens, and underscores)
Options:
--target-dir, -t PATH: Target directory for the project (default: current directory)--no-git: Skip git repository initialization--help: Show help message
Examples:
# Create in current directory
fips-agents create mcp-server my-mcp-server
# Create in specific directory
fips-agents create mcp-server my-server -t ~/projects
# Create without git initialization
fips-agents create mcp-server my-server --no-git
Generate Components
The generate command group allows you to scaffold MCP components (tools, resources, prompts, middleware) in existing MCP server projects.
Important: Run these commands from within your MCP server project directory.
Generate Tool
fips-agents generate tool <name> [OPTIONS]
Arguments:
name: Tool name in snake_case (e.g.,search_documents,fetch_data)
Options:
--description, -d TEXT: Tool description--async/--sync: Generate async or sync function (default: async)--with-context: Include FastMCP Context parameter--with-auth: Include authentication decorator--params PATH: JSON file with parameter definitions--read-only: Mark as read-only operation (default: true)--idempotent: Mark as idempotent (default: true)--open-world: Mark as open-world operation--return-type TEXT: Return type annotation (default: str)--dry-run: Show what would be generated without creating files
Examples:
# Basic tool generation
fips-agents generate tool search_documents --description "Search through documents"
# Tool with context and authentication
fips-agents generate tool fetch_user_data --description "Fetch user data" --with-context --with-auth
# Tool with parameters from JSON file
fips-agents generate tool advanced_search --params params.json
# Sync tool with custom return type
fips-agents generate tool process_data --sync --return-type "dict[str, Any]"
# Dry run to preview
fips-agents generate tool test_tool --description "Test" --dry-run
Generate Resource
fips-agents generate resource <name> [OPTIONS]
Arguments:
name: Resource name in snake_case (e.g.,config_data,user_profile)
Options:
--description, -d TEXT: Resource description--async/--sync: Generate async or sync function (default: async)--with-context: Include FastMCP Context parameter--uri TEXT: Resource URI (default:resource://<name>)--mime-type TEXT: MIME type for resource (default: text/plain)--dry-run: Show what would be generated without creating files
Examples:
# Basic resource
fips-agents generate resource config_data --description "Application configuration"
# Resource with custom URI
fips-agents generate resource user_profile --uri "resource://users/{id}" --description "User profile data"
# Resource with specific MIME type
fips-agents generate resource json_config --mime-type "application/json"
Generate Prompt
fips-agents generate prompt <name> [OPTIONS]
Arguments:
name: Prompt name in snake_case (e.g.,code_review,summarize_text)
Options:
--description, -d TEXT: Prompt description--params PATH: JSON file with parameter definitions--with-schema: Include JSON schema in prompt--dry-run: Show what would be generated without creating files
Examples:
# Basic prompt
fips-agents generate prompt code_review --description "Review code for best practices"
# Prompt with parameters
fips-agents generate prompt summarize_text --params params.json --with-schema
Generate Middleware
fips-agents generate middleware <name> [OPTIONS]
Arguments:
name: Middleware name in snake_case (e.g.,auth_middleware,rate_limiter)
Options:
--description, -d TEXT: Middleware description--async/--sync: Generate async or sync function (default: async)--dry-run: Show what would be generated without creating files
Examples:
# Basic middleware
fips-agents generate middleware auth_middleware --description "Authentication middleware"
# Sync middleware
fips-agents generate middleware rate_limiter --sync --description "Rate limiting middleware"
Parameters JSON Schema
When using --params flag, provide a JSON file with parameter definitions:
[
{
"name": "query",
"type": "str",
"description": "Search query",
"required": true,
"min_length": 1,
"max_length": 100
},
{
"name": "limit",
"type": "int",
"description": "Maximum results to return",
"required": false,
"default": 10,
"ge": 1,
"le": 100
}
]
Supported Types:
str,int,float,boollist[str],list[int],list[float]Optional[str],Optional[int],Optional[float],Optional[bool]
Pydantic Field Constraints:
min_length,max_length(for strings)ge,le,gt,lt(for numbers)pattern(for regex validation on strings)default(default value when optional)
Project Name Requirements
Project names must follow these rules:
- Start with a lowercase letter
- Contain only lowercase letters, numbers, hyphens (
-), and underscores (_) - Not be empty
Valid examples: my-server, test_mcp, server123, my-awesome-mcp-server
Invalid examples: MyServer (uppercase), 123server (starts with number), my@server (special characters)
After Creating a Project
Once your project is created, follow these steps:
# 1. Navigate to your project
cd my-mcp-server
# 2. Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install the project
pip install -e .[dev]
# 4. Run tests
pytest
# 5. Start developing!
# Edit src/my_mcp_server/ files to add your functionality
Development
Setup Development Environment
# Clone the repository
git clone https://github.com/rdwj/fips-agents-cli.git
cd fips-agents-cli
# Create virtual environment
python -m venv venv
source venv/bin/activate
# Install with dev dependencies
pip install -e .[dev]
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=fips_agents_cli --cov-report=html
# Run specific test file
pytest tests/test_create.py
# Run specific test
pytest tests/test_create.py::TestCreateMcpServer::test_successful_creation
Code Quality
# Format code with Black
black src tests
# Lint with Ruff
ruff check src tests
# Type checking (if using mypy)
mypy src
Project Structure
fips-agents-cli/
โโโ pyproject.toml # Project configuration
โโโ README.md # This file
โโโ src/
โ โโโ fips_agents_cli/
โ โโโ __init__.py # Package initialization
โ โโโ __main__.py # Entry point for python -m
โ โโโ cli.py # Main CLI application
โ โโโ version.py # Version information
โ โโโ commands/ # CLI command implementations
โ โ โโโ __init__.py
โ โ โโโ create.py # Create command
โ โโโ tools/ # Utility modules
โ โโโ __init__.py
โ โโโ filesystem.py # Filesystem operations
โ โโโ git.py # Git operations
โ โโโ project.py # Project customization
โโโ tests/ # Test suite
โโโ __init__.py
โโโ conftest.py # Pytest fixtures
โโโ test_create.py # Create command tests
โโโ test_filesystem.py # Filesystem utilities tests
โโโ test_project.py # Project utilities tests
Requirements
- Python 3.10 or higher
- Git (for cloning templates and initializing repositories)
Dependencies
- click (>=8.1.0): Command-line interface creation
- rich (>=13.0.0): Terminal output formatting
- gitpython (>=3.1.0): Git operations
- tomlkit (>=0.12.0): TOML file manipulation
- jinja2 (>=3.1.2): Template rendering for component generation
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run tests (
pytest) - Format code (
black src tests) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Troubleshooting
Git not found
If you see "Git is not installed" error:
- macOS:
brew install git - Linux:
sudo apt-get install gitorsudo yum install git - Windows: Download from https://git-scm.com/downloads
Directory already exists
If you see "Directory already exists" error:
- Choose a different project name
- Remove the existing directory:
rm -rf project-name - Use a different target directory with
--target-dir
Template clone fails
If template cloning fails:
- Check your internet connection
- Verify the template repository is accessible: https://github.com/rdwj/mcp-server-template
- Try again later if GitHub is experiencing issues
"Not in an MCP server project directory"
When using generate commands:
- Ensure you're running the command from within an MCP server project
- Check that
pyproject.tomlexists withfastmcpdependency - If the project wasn't created with
fips-agents create mcp-server, generator templates may be missing
"Component already exists"
If you see this error:
- Choose a different component name
- Manually remove the existing component file from
src/<component-type>/ - Check the component type directory for existing files
Invalid component name
Component names must:
- Be valid Python identifiers (snake_case)
- Not be Python keywords (
for,class, etc.) - Start with a letter or underscore
- Contain only letters, numbers, and underscores
License
MIT License - see LICENSE file for details
Links
- Repository: https://github.com/rdwj/fips-agents-cli
- Issues: https://github.com/rdwj/fips-agents-cli/issues
- MCP Protocol: https://modelcontextprotocol.io/
Changelog
Version 0.2.0
- Feature: GitHub integration for
create mcp-servercommand - Feature: New
--githubflag to create GitHub repository and push code - Feature: New
--localflag to skip GitHub and create local-only project - Feature: Non-interactive mode (
--yes) for agent/CI workflows - Feature: New
--privateflag to create private GitHub repositories - Feature: New
--orgoption to create repositories in GitHub organizations - Feature: New
--descriptionoption for GitHub repository descriptions - Feature: New
--remote-onlyflag to create GitHub repo without local clone - Feature: Added missing
patch buildsubcommand for updating build/deployment files - Feature: GitHub metadata tracking in
.template-infofile - Feature: New git utilities for remote management (
add_remote,push_to_remote) - Improvement: Auto-detects
ghCLI and prompts user when available - Improvement: Clean git history - customizes project before initial push
Version 0.1.9
- Feature: Added
.fips-agents-clidirectory to ModelCar projects with generation metadata - Feature: ModelCar projects now include
info.jsonwith source, destination, and generator info - Feature: ModelCar projects now include
CLAUDE.mdwith project-specific Claude Code instructions - Improvement: Consistent project metadata structure between MCP server and ModelCar projects
Version 0.1.8
- Feature: Added GitHub Copilot agent template support
- Feature: Added
model-carcommand for creating model car projects - Fix: Subdirectory names now convert hyphens to underscores for valid Python package names
- Fix: Added
module_pathtemplate variable for proper import paths in subdirectory components - Fix: Script generator improvements
- Improvement: Removed download filter for cleaner template handling
- Improvement: Added info file tracking for generated projects
Version 0.1.7
- Critical Fix: Resource generator now automatically extracts URI template parameters (e.g.,
{country_code},{id}) and adds them to function signature - Critical Fix: Generated resources now comply with FastMCP requirement that URI parameters must match function arguments
- Fix: Updated test templates to use
.fnattribute pattern for testing FastMCP decorated functions - Fix: Improved
component_exists()to properly handle subdirectory paths - Fix: Removed obsolete
_preview_prompt_utility.pyfrom template (YAML-based prompts removed) - Improvement: Generated resource tests now pass out of the box
- Improvement: Resource function signatures now include proper type hints and docstring Args sections
Version 0.1.6
- Feature: Added
fips-agents patchcommand for selective template updates without losing custom code - Feature: Resource subdirectory support - organize resources in hierarchies (e.g.,
country-profiles/japan) - Feature:
generate resourcenow supports subdirectory paths for better organization - Improvement: Recursive resource loading from subdirectories with automatic discovery
- Improvement: Patch command shows interactive diffs for files that may be customized
- Improvement: Template version tracking enables smart updates via
.template-infofile - Enhancement: Cleaned up redundant auto-discovery code from template
__init__.pyfiles
Version 0.1.5
- Feature: Added
.template-infofile to track CLI version and template commit hash in generated projects - Improvement: Implemented auto-discovery for tools/resources/prompts/middleware components, eliminating manual registration in
__init__.pyfiles - Improvement: Template components can now be added or removed by simply creating/deleting filesโno registry updates required
Version 0.1.4
- Fix: Fixed Containerfile in template to remove incorrect prompts/ copy line
- Fix: Fixed CLI to correctly update entry point script names for new projects
- Fix: Updated CLI to handle new multi-module template structure (core/, tools/, etc.)
- Fix: Updated fallback project name to match current template (fastmcp-unified-template)
- Improvement: Improved messaging when template uses multi-module structure
Version 0.1.3
- Improvement: Enhanced prompt creation to comply with FastMCP 2.9+ requirements
Version 0.1.2
- Documentation: Updated documentation and improved release management guidance
- Automation: Added
/create-releaseslash command for automated release workflow - Automation: Created
scripts/release.shfor streamlined version management and tagging - Documentation: Added
RELEASE_CHECKLIST.mdwith comprehensive release procedures
Version 0.1.1
- Added
fips-agents generatecommand group - Component generation: tools, resources, prompts, middleware
- Jinja2-based template rendering
- Parameter validation and JSON schema support
- Auto-run pytest on generated components
- Dry-run mode for previewing changes
- Comprehensive error handling and validation
Version 0.1.0 (MVP)
- Initial release
fips-agents create mcp-servercommand- Template cloning and customization
- Git repository initialization
- Comprehensive test suite
- Beautiful CLI output with Rich
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fips_agents_cli-0.2.0.tar.gz.
File metadata
- Download URL: fips_agents_cli-0.2.0.tar.gz
- Upload date:
- Size: 128.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
138332f34eaae2a6dd5142cf12912adce85146cd29725c5439c24f730d0d44ae
|
|
| MD5 |
6e83f877e3037b09babec9ca04c75415
|
|
| BLAKE2b-256 |
a7ffa1f669c6994d06c5cfea55df65a9abe1cd0f5777b917bda57cc380e20797
|
Provenance
The following attestation bundles were made for fips_agents_cli-0.2.0.tar.gz:
Publisher:
workflow.yaml on rdwj/fips-agents-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fips_agents_cli-0.2.0.tar.gz -
Subject digest:
138332f34eaae2a6dd5142cf12912adce85146cd29725c5439c24f730d0d44ae - Sigstore transparency entry: 764169377
- Sigstore integration time:
-
Permalink:
rdwj/fips-agents-cli@8f863c8aba3fa5cbb1663a0abf2209a66d45d0ff -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/rdwj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yaml@8f863c8aba3fa5cbb1663a0abf2209a66d45d0ff -
Trigger Event:
push
-
Statement type:
File details
Details for the file fips_agents_cli-0.2.0-py3-none-any.whl.
File metadata
- Download URL: fips_agents_cli-0.2.0-py3-none-any.whl
- Upload date:
- Size: 47.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e943442c5ecf6eef654a4d0d38854c1cb73291619b3d1f2a8a56fd1fdb24a121
|
|
| MD5 |
978f1942c311e2040645ecde2c716152
|
|
| BLAKE2b-256 |
814cf675a76e84d002d187428a67ed98568526282840e784932c8b87f07c7bb3
|
Provenance
The following attestation bundles were made for fips_agents_cli-0.2.0-py3-none-any.whl:
Publisher:
workflow.yaml on rdwj/fips-agents-cli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fips_agents_cli-0.2.0-py3-none-any.whl -
Subject digest:
e943442c5ecf6eef654a4d0d38854c1cb73291619b3d1f2a8a56fd1fdb24a121 - Sigstore transparency entry: 764169379
- Sigstore integration time:
-
Permalink:
rdwj/fips-agents-cli@8f863c8aba3fa5cbb1663a0abf2209a66d45d0ff -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/rdwj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yaml@8f863c8aba3fa5cbb1663a0abf2209a66d45d0ff -
Trigger Event:
push
-
Statement type: