# MCP Proxy Adapter
A powerful framework for creating JSON-RPC-enabled microservices with built-in security, authentication, and proxy registration capabilities.
## Features
- **JSON-RPC Framework**: Complete JSON-RPC 2.0 implementation
- **Security Integration**: Built-in support for mcp_security_framework
- **Authentication**: Multiple auth methods (API Key, JWT, Certificate, Basic Auth)
- **Proxy Registration**: Automatic registration and discovery of services
- **Command System**: Extensible command framework with role-based access control
- **SSL/TLS Support**: Full SSL/TLS support including mTLS
- **Async Support**: Built on FastAPI with full async support
- **Extensible**: Plugin system for custom commands and middleware
## Quick Start
### Installation
```bash
pip install mcp-proxy-adapter
```
### Basic Usage
```python
from mcp_proxy_adapter import create_app, Command, SuccessResult
# Create a custom command
class HelloCommand(Command):
name = "hello"
descr = "Say hello"
async def execute(self, **kwargs) -> SuccessResult:
name = kwargs.get("name", "World")
return SuccessResult(f"Hello, {name}!")
# Create and run the application
app = create_app()
```
### Configuration
```json
{
"server": {
"host": "0.0.0.0",
"port": 8000
},
"security": {
"enabled": true,
"framework": "mcp_security_framework"
},
"commands": {
"auto_discovery": true,
"builtin_commands": ["echo", "health", "config"]
}
}
```
## Examples
### Proxy Registration Example
```python
# Example of proxy registration with authentication
import asyncio
from mcp_proxy_adapter.examples.proxy_registration_example import ProxyRegistrationExample
async def main():
async with ProxyRegistrationExample("http://localhost:8002", "your-token") as client:
result = await client.test_registration({
"server_id": "my-server",
"server_url": "http://localhost:8001",
"server_name": "My Server"
})
print(f"Registration result: {result}")
asyncio.run(main())
```
### Security Testing
The framework includes comprehensive security testing examples:
- HTTP with Token Authentication
- HTTPS with Certificate Authentication
- mTLS (Mutual TLS) Authentication
- Role-based Access Control
- Permission Validation
## Documentation
For detailed documentation, examples, and API reference, see the [documentation](https://github.com/maverikod/mcp-proxy-adapter).
## Development
### Setup Development Environment
```bash
git clone https://github.com/maverikod/mcp-proxy-adapter.git
cd mcp-proxy-adapter
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
pip install -e ".[dev]"
```
### Running Tests
```bash
pytest tests/
```
### Running Examples
```bash
# Start server
python -m mcp_proxy_adapter.main --config examples/server_configs/config_simple.json
# Run proxy registration example
python examples/proxy_registration_example.py
```
## License
MIT License - see LICENSE file for details.
## Author
**Vasiliy Zdanovskiy** - vasilyvz@gmail.com
## Version
6.1.0 - Major release with security framework integration and proxy registration capabilities.
Raw data
{
"_id": null,
"home_page": "https://github.com/maverikod/mcp-proxy-adapter",
"name": "mcp-proxy-adapter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": "Vasiliy Zdanovskiy <vasilyvz@gmail.com>",
"keywords": "mcp, proxy, adapter, json-rpc, microservice, security, fastapi",
"author": "Vasiliy Zdanovskiy",
"author_email": "Vasiliy Zdanovskiy <vasilyvz@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ff/d7/6d9ef1d9084da0406bf85ea342a4f901a53117329bed95c188ac5b5f531c/mcp_proxy_adapter-6.1.1.tar.gz",
"platform": null,
"description": "# MCP Proxy Adapter\n\nA powerful framework for creating JSON-RPC-enabled microservices with built-in security, authentication, and proxy registration capabilities.\n\n## Features\n\n- **JSON-RPC Framework**: Complete JSON-RPC 2.0 implementation\n- **Security Integration**: Built-in support for mcp_security_framework\n- **Authentication**: Multiple auth methods (API Key, JWT, Certificate, Basic Auth)\n- **Proxy Registration**: Automatic registration and discovery of services\n- **Command System**: Extensible command framework with role-based access control\n- **SSL/TLS Support**: Full SSL/TLS support including mTLS\n- **Async Support**: Built on FastAPI with full async support\n- **Extensible**: Plugin system for custom commands and middleware\n\n## Quick Start\n\n### Installation\n\n```bash\npip install mcp-proxy-adapter\n```\n\n### Basic Usage\n\n```python\nfrom mcp_proxy_adapter import create_app, Command, SuccessResult\n\n# Create a custom command\nclass HelloCommand(Command):\n name = \"hello\"\n descr = \"Say hello\"\n \n async def execute(self, **kwargs) -> SuccessResult:\n name = kwargs.get(\"name\", \"World\")\n return SuccessResult(f\"Hello, {name}!\")\n\n# Create and run the application\napp = create_app()\n```\n\n### Configuration\n\n```json\n{\n \"server\": {\n \"host\": \"0.0.0.0\",\n \"port\": 8000\n },\n \"security\": {\n \"enabled\": true,\n \"framework\": \"mcp_security_framework\"\n },\n \"commands\": {\n \"auto_discovery\": true,\n \"builtin_commands\": [\"echo\", \"health\", \"config\"]\n }\n}\n```\n\n## Examples\n\n### Proxy Registration Example\n\n```python\n# Example of proxy registration with authentication\nimport asyncio\nfrom mcp_proxy_adapter.examples.proxy_registration_example import ProxyRegistrationExample\n\nasync def main():\n async with ProxyRegistrationExample(\"http://localhost:8002\", \"your-token\") as client:\n result = await client.test_registration({\n \"server_id\": \"my-server\",\n \"server_url\": \"http://localhost:8001\",\n \"server_name\": \"My Server\"\n })\n print(f\"Registration result: {result}\")\n\nasyncio.run(main())\n```\n\n### Security Testing\n\nThe framework includes comprehensive security testing examples:\n\n- HTTP with Token Authentication\n- HTTPS with Certificate Authentication \n- mTLS (Mutual TLS) Authentication\n- Role-based Access Control\n- Permission Validation\n\n## Documentation\n\nFor detailed documentation, examples, and API reference, see the [documentation](https://github.com/maverikod/mcp-proxy-adapter).\n\n## Development\n\n### Setup Development Environment\n\n```bash\ngit clone https://github.com/maverikod/mcp-proxy-adapter.git\ncd mcp-proxy-adapter\npython -m venv .venv\nsource .venv/bin/activate # On Windows: .venv\\Scripts\\activate\npip install -e \".[dev]\"\n```\n\n### Running Tests\n\n```bash\npytest tests/\n```\n\n### Running Examples\n\n```bash\n# Start server\npython -m mcp_proxy_adapter.main --config examples/server_configs/config_simple.json\n\n# Run proxy registration example\npython examples/proxy_registration_example.py\n```\n\n## License\n\nMIT License - see LICENSE file for details.\n\n## Author\n\n**Vasiliy Zdanovskiy** - vasilyvz@gmail.com\n\n## Version\n\n6.1.0 - Major release with security framework integration and proxy registration capabilities. \n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Model Context Protocol Proxy Adapter with Security Framework",
"version": "6.1.1",
"project_urls": {
"Bug Tracker": "https://github.com/vasilyvz/mcp-proxy-adapter/issues",
"Documentation": "https://mcp-proxy-adapter.readthedocs.io/",
"Homepage": "https://github.com/vasilyvz/mcp-proxy-adapter",
"Repository": "https://github.com/vasilyvz/mcp-proxy-adapter.git",
"Security Policy": "https://github.com/vasilyvz/mcp-proxy-adapter/security/policy"
},
"split_keywords": [
"mcp",
" proxy",
" adapter",
" json-rpc",
" microservice",
" security",
" fastapi"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "ff5cf22da0abcdf6e4cfd75cf835a710ccfb00221a0d1c8f38eeeb84074598e2",
"md5": "4fe2a157436e1e48f4c8bef5789e7b2a",
"sha256": "384339e84eb7b305f2007c25e823c3d2f98b8208ee26673a70e6e37a18c76f6f"
},
"downloads": -1,
"filename": "mcp_proxy_adapter-6.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4fe2a157436e1e48f4c8bef5789e7b2a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 353580,
"upload_time": "2025-08-30T12:54:23",
"upload_time_iso_8601": "2025-08-30T12:54:23.314961Z",
"url": "https://files.pythonhosted.org/packages/ff/5c/f22da0abcdf6e4cfd75cf835a710ccfb00221a0d1c8f38eeeb84074598e2/mcp_proxy_adapter-6.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ffd76d9ef1d9084da0406bf85ea342a4f901a53117329bed95c188ac5b5f531c",
"md5": "a0c21dd0815a5b306f0ac2265c90dafa",
"sha256": "0b19167e5cc152e692f6bff1896ccfd71dddcb9e6abd9d672fffd9a102aefd07"
},
"downloads": -1,
"filename": "mcp_proxy_adapter-6.1.1.tar.gz",
"has_sig": false,
"md5_digest": "a0c21dd0815a5b306f0ac2265c90dafa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 297305,
"upload_time": "2025-08-30T12:54:25",
"upload_time_iso_8601": "2025-08-30T12:54:25.414830Z",
"url": "https://files.pythonhosted.org/packages/ff/d7/6d9ef1d9084da0406bf85ea342a4f901a53117329bed95c188ac5b5f531c/mcp_proxy_adapter-6.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-30 12:54:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "maverikod",
"github_project": "mcp-proxy-adapter",
"github_not_found": true,
"lcname": "mcp-proxy-adapter"
}