A Model Context Protocol server for iCost application integration
Project description
iCost App MCP Server
A Model Context Protocol (MCP) server for iCost application integration, providing seamless communication between AI models and the iCost cost management system.
Features
- ๐ Fast and Reliable: Built with FastAPI and modern Python async/await patterns
- ๐ง Extensible: Modular architecture for easy customization and extension
- ๐ Cost Management Integration: Direct integration with iCost application APIs
- ๐ก๏ธ Type Safe: Full type hints and Pydantic models for data validation
- ๐งช Well Tested: Comprehensive test suite with pytest
- ๐ Well Documented: Complete API documentation and usage examples
Installation
From PyPI (when published)
pip install icost-app-mcp-server
From Source
git clone https://github.com/yourusername/icost-app-mcp-server.git
cd icost-app-mcp-server
pip install -e .
Development Installation
git clone https://github.com/yourusername/icost-app-mcp-server.git
cd icost-app-mcp-server
pip install -e ".[dev]"
Quick Start
Basic Usage
from icost_app_mcp_server import MCPServer
# Initialize the server
server = MCPServer()
# Start the server
server.start()
Configuration
from icost_app_mcp_server import MCPServer
# Custom configuration
config = {
"host": "localhost",
"port": 8080,
"debug": True
}
server = MCPServer(config)
server.start()
Project Structure
icost-app-mcp-server/
โโโ src/
โ โโโ icost_app_mcp_server/
โ โโโ __init__.py
โ โโโ server.py
โ โโโ ...
โโโ tests/
โ โโโ __init__.py
โ โโโ test_server.py
โ โโโ ...
โโโ docs/
โโโ examples/
โโโ scripts/
โโโ pyproject.toml
โโโ requirements.txt
โโโ requirements-dev.txt
โโโ README.md
โโโ LICENSE
Development
Setting up Development Environment
-
Clone the repository:
git clone https://github.com/yourusername/icost-app-mcp-server.git cd icost-app-mcp-server
-
Create virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install development dependencies:
pip install -r requirements-dev.txt
-
Install pre-commit hooks:
pre-commit install
Running Tests
# Run all tests
pytest
# Run with coverage
pytest --cov=icost_app_mcp_server
# Run specific test file
pytest tests/test_server.py
Code Formatting and Linting
# Format code with black
black src/ tests/
# Sort imports with isort
isort src/ tests/
# Lint with flake8
flake8 src/ tests/
# Type checking with mypy
mypy src/
Building Documentation
cd docs/
make html
API Reference
MCPServer
The main server class for handling MCP protocol communications.
Methods
__init__(config: Optional[Dict[str, Any]] = None): Initialize the serverstart(): Start the MCP serverstop(): Stop the MCP server
Configuration
The server can be configured using a dictionary passed to the constructor:
config = {
"host": "localhost", # Server host
"port": 8080, # Server port
"debug": False, # Debug mode
"log_level": "INFO", # Logging level
}
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Development Workflow
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Add tests for your changes
- Ensure all tests pass (
pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Changelog
See CHANGELOG.md for a list of changes and version history.
Support
- ๐ง Email: your.email@example.com
- ๐ Issues: GitHub Issues
- ๐ฌ Discussions: GitHub Discussions
Acknowledgments
- Thanks to the MCP protocol developers
- Built with FastAPI
- Inspired by modern Python development practices
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file icost_app_mcp_server-0.1.0.tar.gz.
File metadata
- Download URL: icost_app_mcp_server-0.1.0.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd3c88a6ee27f08ac895d94c2a6d531e271e5140f94d2624e153ee57430650b8
|
|
| MD5 |
b5e6785bc1f002a689c96038bfa7f6da
|
|
| BLAKE2b-256 |
f6a82fe39ddac003640c1479e17b547005c0dcb680c25981a9ef6ef14ef2fc2c
|
File details
Details for the file icost_app_mcp_server-0.1.0-py3-none-any.whl.
File metadata
- Download URL: icost_app_mcp_server-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0c4754427c370259b36f09f1e546f729bea032daf28e74b3ef1a610d00cfb66
|
|
| MD5 |
e69ccea0bb8503710a96cebddebb7bb8
|
|
| BLAKE2b-256 |
d19120785ecce8be151e7b5fbd7bcb9a845ac999c1a24934a37aad9dbc13ff55
|