Overview
TPsoftMCP is my private Model Context Protocol server. It connects an AI assistant to tools I use for development and everyday work: Gitea repositories, email draft preparation and Telegram.
I built it as my own infrastructure for internal automation. I also use its repository tools while working on this portfolio.
The brief
An AI assistant needs context from actual projects and a way to perform clearly defined operations. Manually copying files and moving results between services interrupts the workflow.
The goal was to expose my services through a shared interface with authentication and predictable inputs and outputs.
The solution
The server provides tools for browsing repositories, reading and downloading files, and writing changes to Gitea. Each successful write creates a commit; updates and deletions check the file SHA to avoid overwriting a newer version.
Another integration prepares email drafts and saves them via IMAP. The draft remains available for review and sending in an email client. The server also includes Telegram tools.
My role
I designed and implemented the server, service integrations, authentication and result handling. The work also includes diagnosing communication with MCP clients and verifying tools through the actual transport.
Technical implementation
The server uses PHP and mcp/sdk. It supports remote connections over Streamable HTTP and a local STDIO mode.
- OAuth Authorization Code with PKCE and refresh token rotation for HTTP access.
- Gitea API integration for text files, commits and binary attachments.
- Images and other files returned in standard MCP content blocks alongside structured metadata.
- Email draft preparation with Symfony Mime and storage via IMAP.
- Input validation, file size limits and integration tests.
The result
I now have a working connection between an AI assistant and my own work infrastructure. The assistant can access current project files and prepare results in the services I already use.
This is an internal tool with private source code. This public case study describes its purpose and architecture.