Skip to main content

A Model Context Protocol server for iCost application integration

Project description

iCost App MCP Server

Python Version License Code Style

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

  1. Clone the repository:

    git clone https://github.com/yourusername/icost-app-mcp-server.git
    cd icost-app-mcp-server
    
  2. Create virtual environment:

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install development dependencies:

    pip install -r requirements-dev.txt
    
  4. 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 server
  • start(): Start the MCP server
  • stop(): 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

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Add tests for your changes
  5. Ensure all tests pass (pytest)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. 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

Acknowledgments

  • Thanks to the MCP protocol developers
  • Built with FastAPI
  • Inspired by modern Python development practices

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

icost_app_mcp_server-0.1.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

icost_app_mcp_server-0.1.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

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

Hashes for icost_app_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd3c88a6ee27f08ac895d94c2a6d531e271e5140f94d2624e153ee57430650b8
MD5 b5e6785bc1f002a689c96038bfa7f6da
BLAKE2b-256 f6a82fe39ddac003640c1479e17b547005c0dcb680c25981a9ef6ef14ef2fc2c

See more details on using hashes here.

File details

Details for the file icost_app_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for icost_app_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b0c4754427c370259b36f09f1e546f729bea032daf28e74b3ef1a610d00cfb66
MD5 e69ccea0bb8503710a96cebddebb7bb8
BLAKE2b-256 d19120785ecce8be151e7b5fbd7bcb9a845ac999c1a24934a37aad9dbc13ff55

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page