Skip to main content
Glama
hsiangjenli

Gitignore MCP Tool

by hsiangjenli

A MCP server for generating .gitignore files using gitignore.io API

🌟 Features

  • Gitignore Generation: Generate .gitignore files

  • Template Listing: Browse all available gitignore templates

πŸ› οΈ Getting Started

Environment Variables

Variable

Default

Description

GITIGNORE_API_BASE

https://www.toptal.com/developers/gitignore/api

Base URL for gitignore.io API

Local Development

  • Install dependencies:

uv sync
  • (Optional) Set custom API endpoint:

export GITIGNORE_API_BASE="https://your-custom-api.com/api"
  • Run the MCP server:

uv run --with fastmcp fastmcp run mcp_tools/main.py

Docker

  • Build the Docker image:

docker build -t mcp-gitignore:latest .
  • Run the container:

docker run -i --rm -p 8000:8000 mcp-gitignore:latest
  • Run with custom API endpoint:

docker run -i --rm -p 8000:8000 -e GITIGNORE_API_BASE="https://your-custom-api.com/api" mcp-gitignore:latest
  • Run MCP Server:

{ "mcpServers": { "mcp-gitignore": { "command": "docker", "args": [ "run", "--rm", "-i", "-p", "8000:8000", "mcp-gitignore:latest" ], "env": { "GITIGNORE_API_BASE": "https://www.toptal.com/developers/gitignore/api" } } } }

🎯 API Endpoints

List Templates

GET /gitignore/templates/

List all available gitignore templates.

Generate .gitignore

POST /gitignore/generate/

Generate .gitignore file based on templates.

Request Body:

{ "templates": ["python", "visualstudiocode", "macos"], "output_path": ".gitignore" }

πŸ“š Documentation

  • Documentation is built using MkDocs and deployed to GitHub Pages.

  • To build the documentation locally:

chmod +x scripts/build_docs.sh scripts/build_docs.sh mkdocs build
Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hsiangjenli/mcp-gitignore'

If you have feedback or need assistance with the MCP directory API, please join our Discord server