generated from personal-projects/leo-claude-mktplace
Implemented MCP server core infrastructure with authentication and HTTP client: - Created auth.py for API token management - Loads GITEA_API_URL and GITEA_API_TOKEN from environment - Uses python-dotenv for .env file support - Validates required configuration on initialization - Provides authentication headers for API requests - Created client.py with base HTTP client - GiteaClient class using httpx AsyncClient - Async HTTP methods: get(), post(), patch(), delete() - Comprehensive error handling for HTTP status codes - Custom exception hierarchy for different error types - Configurable timeout (default 30s) - Updated server.py with MCP server setup - Initialized MCP server with StdioServerTransport - Integrated AuthConfig and GiteaClient - Registered placeholder tool handlers (list_repositories, create_issue, create_pull_request) - Added CLI with --help and --version options - Proper error handling for configuration failures - Updated pyproject.toml - Added console script entry point: gitea-mcp - Created comprehensive unit tests - test_auth.py: Tests for AuthConfig validation and headers - test_client.py: Tests for GiteaClient initialization and error handling All acceptance criteria met: - MCP server initializes with StdioServerTransport - Authentication loads from environment variables - Base HTTP client with auth headers implemented - Error handling for API connection failures - Server reports available tools (placeholders for future issues) Closes #2 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
54 lines
1.3 KiB
TOML
54 lines
1.3 KiB
TOML
[build-system]
|
|
requires = ["setuptools>=61.0", "wheel"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[project]
|
|
name = "gitea-mcp-remote"
|
|
version = "0.1.0"
|
|
description = "MCP server for Gitea API integration"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10"
|
|
license = { text = "MIT" }
|
|
authors = [
|
|
{ name = "Leo Miranda", email = "lmiranda@example.com" }
|
|
]
|
|
keywords = ["mcp", "gitea", "api", "server"]
|
|
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",
|
|
]
|
|
|
|
dependencies = [
|
|
"mcp>=0.1.0",
|
|
"httpx>=0.24.0",
|
|
"python-dotenv>=1.0.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=7.0.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
gitea-mcp = "gitea_mcp.server:main"
|
|
|
|
[project.urls]
|
|
Homepage = "https://github.com/lmiranda/gitea-mcp-remote"
|
|
Repository = "https://github.com/lmiranda/gitea-mcp-remote"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["src"]
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|