Create correct directory structure and dependencies

This commit establishes the proper architecture for an HTTP transport wrapper around the official Gitea MCP server, replacing the incorrect standalone implementation.

New structure:
- src/gitea_http_wrapper/ (main package)
  - config/ (configuration loader)
  - middleware/ (HTTP auth middleware)
  - filtering/ (tool filtering for Claude Desktop)
  - tests/ (wrapper test suite)

Updated dependencies:
- mcp>=0.9.0 (MCP SDK for HTTP transport)
- uvicorn>=0.27.0 (ASGI server)
- pydantic>=2.0.0 (config validation)
- pydantic-settings>=2.0.0 (settings management)
- gitea-mcp-server>=0.1.0 (official Gitea MCP to wrap)

Created requirements.txt for Docker deployment convenience.

This architecture correctly separates concerns:
1. Official Gitea MCP server handles Gitea API operations
2. HTTP wrapper provides transport, auth, and filtering

Closes #10

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-03 16:07:06 -05:00
parent acacefeaed
commit 6beb8026df
7 changed files with 44 additions and 5 deletions

View File

@@ -5,14 +5,14 @@ build-backend = "setuptools.build_meta"
[project] [project]
name = "gitea-mcp-remote" name = "gitea-mcp-remote"
version = "0.1.0" version = "0.1.0"
description = "MCP server for Gitea API integration" description = "HTTP transport wrapper for Gitea MCP server"
readme = "README.md" readme = "README.md"
requires-python = ">=3.10" requires-python = ">=3.10"
license = { text = "MIT" } license = { text = "MIT" }
authors = [ authors = [
{ name = "Leo Miranda", email = "lmiranda@example.com" } { name = "Leo Miranda", email = "lmiranda@example.com" }
] ]
keywords = ["mcp", "gitea", "api", "server"] keywords = ["mcp", "gitea", "api", "server", "http", "wrapper"]
classifiers = [ classifiers = [
"Development Status :: 3 - Alpha", "Development Status :: 3 - Alpha",
"Intended Audience :: Developers", "Intended Audience :: Developers",
@@ -24,9 +24,12 @@ classifiers = [
] ]
dependencies = [ dependencies = [
"mcp>=0.1.0", "mcp>=0.9.0",
"httpx>=0.24.0", "uvicorn>=0.27.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"python-dotenv>=1.0.0", "python-dotenv>=1.0.0",
"gitea-mcp-server>=0.1.0",
] ]
[project.optional-dependencies] [project.optional-dependencies]
@@ -37,7 +40,7 @@ dev = [
] ]
[project.scripts] [project.scripts]
gitea-mcp = "gitea_mcp.server:main" gitea-http-wrapper = "gitea_http_wrapper.server:main"
[project.urls] [project.urls]
Homepage = "https://github.com/lmiranda/gitea-mcp-remote" Homepage = "https://github.com/lmiranda/gitea-mcp-remote"

9
requirements.txt Normal file
View File

@@ -0,0 +1,9 @@
# HTTP Transport Wrapper Dependencies
mcp>=0.9.0
uvicorn>=0.27.0
pydantic>=2.0.0
pydantic-settings>=2.0.0
python-dotenv>=1.0.0
# Official Gitea MCP Server (to be wrapped)
gitea-mcp-server>=0.1.0

View File

@@ -0,0 +1,15 @@
"""
Gitea HTTP MCP Wrapper
This package provides an HTTP transport wrapper around the official Gitea MCP server.
It handles configuration loading, tool filtering, and HTTP authentication middleware.
Architecture:
- config/: Configuration loader module
- middleware/: HTTP authentication middleware
- filtering/: Tool filtering for Claude Desktop compatibility
- server.py: Main HTTP MCP server implementation
"""
__version__ = "0.1.0"
__all__ = ["__version__"]

View File

@@ -0,0 +1,3 @@
"""Configuration loader module."""
__all__ = []

View File

@@ -0,0 +1,3 @@
"""Tool filtering module for Claude Desktop compatibility."""
__all__ = []

View File

@@ -0,0 +1,3 @@
"""HTTP authentication middleware module."""
__all__ = []

View File

@@ -0,0 +1,3 @@
"""Test suite for HTTP wrapper functionality."""
__all__ = []