From 002f854b338c01e64daaeed96640542fbeb38c2f Mon Sep 17 00:00:00 2001 From: Itay Shemer Date: Sat, 8 Mar 2025 15:08:13 +0200 Subject: [PATCH] cosmetics --- CHANGELOG.md | 20 +++++++++++ CONTRIBUTING.md | 76 +++++++++++++++++++++++++++++++++++++++++ INSTALL.md | 2 +- LICENSE | 2 +- MANIFEST.in | 10 ++++++ README.md | 8 +++-- fastapi_mcp/__init__.py | 2 ++ pyproject.toml | 15 ++++++-- setup.py | 20 +++++++++-- 9 files changed, 146 insertions(+), 9 deletions(-) create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md create mode 100644 MANIFEST.in diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7a6e103 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,20 @@ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +## [0.1.0] - 2024-03-08 + +### Added +- Initial release of FastAPI-MCP +- Core functionality for converting FastAPI applications to MCP servers +- CLI tool for generating, running, and installing MCP servers +- Automatic discovery of FastAPI endpoints +- Type-safe conversion from FastAPI endpoints to MCP tools +- Documentation preservation from FastAPI to MCP +- Claude integration for easy installation and use +- API integration that automatically makes HTTP requests to FastAPI endpoints +- Examples directory with sample FastAPI application +- Basic test suite \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..93b6c03 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,76 @@ +# Contributing to FastAPI-MCP + +First off, thank you for considering contributing to FastAPI-MCP! + +## Development Process + +1. Fork the repository +2. Create a feature branch (`git checkout -b feature/amazing-feature`) +3. Make your changes +4. Run the tests (`pytest`) +5. Format your code (`black .` and `isort .`) +6. Commit your changes (`git commit -m 'Add some amazing feature'`) +7. Push to the branch (`git push origin feature/amazing-feature`) +8. Open a Pull Request + +## Setting Up Development Environment + +```bash +# Clone your fork +git clone https://github.com/tadata-org/fastapi_mcp +cd fastapi-mcp + +# Create a virtual environment +python -m venv venv +source venv/bin/activate # On Windows: venv\Scripts\activate + +# Install development dependencies +pip install -e ".[dev]" +``` + +## Code Style + +We use the following tools to ensure code quality: + +- **Black** for code formatting +- **isort** for import sorting +- **ruff** for linting +- **mypy** for type checking + +Please make sure your code passes all checks before submitting a pull request: + +```bash +black . +isort . +ruff check . +mypy . +``` + +## Testing + +We use pytest for testing. Please write tests for any new features and ensure all tests pass: + +```bash +pytest +``` + +## Pull Request Process + +1. Ensure your code follows the style guidelines of the project +2. Update the README.md with details of changes if applicable +3. The versioning scheme we use is [SemVer](http://semver.org/) +4. Include a descriptive commit message +5. Your pull request will be merged once it's reviewed and approved + +## Code of Conduct + +Please note we have a code of conduct, please follow it in all your interactions with the project. + +- Be respectful and inclusive +- Be collaborative +- When disagreeing, try to understand why +- A diverse community is a strong community + +## Questions? + +Don't hesitate to open an issue if you have any questions about contributing to FastAPI-MCP. \ No newline at end of file diff --git a/INSTALL.md b/INSTALL.md index 36439ac..5582deb 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -21,7 +21,7 @@ You can also install FastAPI-MCP from source: ```bash # Clone the repository -git clone https://github.com/yourusername/fastapi-mcp.git +git clone https://github.com/tadata-org/fastapi_mcp.git cd fastapi-mcp # Install the package diff --git a/LICENSE b/LICENSE index 011dc06..e2829fe 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 FastAPI-MCP Team +Copyright (c) 2024 Tadata Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..2a78153 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,10 @@ +include LICENSE +include README.md +include INSTALL.md +include pyproject.toml +include setup.py + +recursive-include examples *.py *.md +recursive-include tests *.py + +global-exclude *.py[cod] __pycache__ *.so *.dylib .DS_Store \ No newline at end of file diff --git a/README.md b/README.md index 641acac..25415e3 100644 --- a/README.md +++ b/README.md @@ -183,8 +183,12 @@ For more examples, see the [examples](examples) directory. ## Contributing -Contributions are welcome! Please feel free to submit a pull request. +Contributions are welcome! Please feel free to submit a pull request. See [CONTRIBUTING.md](CONTRIBUTING.md) for more information. ## License -MIT +MIT License. Copyright (c) 2024 Tadata Inc. + +## About + +Developed and maintained by [Tadata Inc.](https://github.com/tadata-org) diff --git a/fastapi_mcp/__init__.py b/fastapi_mcp/__init__.py index 3dc23c2..b9cbd85 100644 --- a/fastapi_mcp/__init__.py +++ b/fastapi_mcp/__init__.py @@ -1,5 +1,7 @@ """ FastAPI-MCP: Automatic MCP server generator for FastAPI applications. + +Created by Tadata Inc. (https://github.com/tadata-org) """ __version__ = "0.1.0" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 64859c9..96737b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,12 +5,12 @@ build-backend = "hatchling.build" [project] name = "fastapi-mcp" version = "0.1.0" -description = "Automatic MCP server generator for FastAPI applications" +description = "Automatic MCP server generator for FastAPI applications - converts FastAPI endpoints to MCP tools for LLM integration" readme = "README.md" requires-python = ">=3.10" license = {file = "LICENSE"} authors = [ - {name = "FastAPI MCP Team", email = "contact@example.com"}, + {name = "Tadata Inc.", email = "itay@tadata.com"}, ] classifiers = [ "Development Status :: 3 - Alpha", @@ -20,7 +20,11 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Internet :: WWW/HTTP", + "Framework :: FastAPI", ] +keywords = ["fastapi", "mcp", "llm", "claude", "ai", "tools", "api", "conversion"] dependencies = [ "fastapi>=0.100.0", "typer>=0.9.0", @@ -28,8 +32,15 @@ dependencies = [ "mcp>=1.3.0", "pydantic>=2.0.0", "uvicorn>=0.20.0", + "requests>=2.25.0", + "inspect-mate>=0.0.2", ] +[project.urls] +Homepage = "https://github.com/tadata-org/fastapi_mcp" +Documentation = "https://github.com/tadata-org/fastapi_mcp#readme" +"Bug Tracker" = "https://github.com/tadata-org/fastapi_mcp/issues" + [project.optional-dependencies] dev = [ "pytest>=7.0.0", diff --git a/setup.py b/setup.py index d6af3b5..c35f065 100644 --- a/setup.py +++ b/setup.py @@ -3,9 +3,9 @@ from setuptools import setup setup( name="fastapi-mcp", version="0.1.0", - description="Automatic MCP server generator for FastAPI applications", - author="FastAPI MCP Team", - author_email="contact@example.com", + description="Automatic MCP server generator for FastAPI applications - converts FastAPI endpoints to MCP tools for LLM integration", + author="Tadata Inc.", + author_email="itay@tadata.com", packages=["fastapi_mcp"], python_requires=">=3.10", install_requires=[ @@ -15,6 +15,7 @@ setup( "mcp>=1.3.0", "pydantic>=2.0.0", "uvicorn>=0.20.0", + "requests>=2.25.0", "inspect-mate>=0.0.2", ], entry_points={ @@ -22,4 +23,17 @@ setup( "fastapi-mcp=fastapi_mcp.cli:app", ], }, + classifiers=[ + "Development Status :: 3 - Alpha", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Topic :: Software Development :: Libraries :: Python Modules", + "Topic :: Internet :: WWW/HTTP", + "Framework :: FastAPI", + ], + keywords=["fastapi", "mcp", "llm", "claude", "ai", "tools", "api", "conversion"], ) \ No newline at end of file