Technology
The mcp module provides a complete Model Context Protocol server implementation for your application. MCP is a standardized protocol that enables Large Language Models to securely connect to external tools and data sources.
Overview
This module provides a complete MCP protocol implementation with tools, resources, and prompts. A UI is provided for testing, and the server can be exposed over HTTP and called via command line
Usage
Server Registration
Configure your MCP client to use your application as an MCP server via CLI:
1 | |
If your tools support “http” server types, you can use:
1 | |
Otherwise, you can use the mcp-remote tool:
1 | |
Integration
lib/mcpserver/ - MCP server implementation. Register your tools and resources here.
Tools
1 | |
Resources (static)
1 | |
Resources (dynamic)
1 | |
Prompts
1 | |
Web Admin Interface
Access the web admin interface at /mcp to:
- View registered tools
- Test tool execution
- Inspect request/response data
- Debug tool implementations
Example Tools
The module includes example tools to demonstrate usage:
- Random Number Generator - Generates random numbers within specified ranges
- Generated Tools - Tools created from Project Forge export configurations (if enabled)
Configuration
The MCP module uses standard Project Forge configuration patterns:
- Debug Mode: Enable detailed logging with
DEBUG=true - Build Info: Automatic version and build information integration
- Tool Registration: Tools are registered during server initialization
Source Code
- Repository: https://github.com/kyleu/projectforge/tree/main/module/mcp
- License: CC0 (Public Domain)
- Author: Kyle U (kyle@kyleu.com)
See Also
- Model Context Protocol Specification - Official MCP documentation
- MCP Go Library - Underlying Go implementation
- Project Forge Documentation - Complete Project Forge documentation
- Customization Guide - Advanced customization options