mcp/mcp library
MCP protocol components for the finance-mcp server.
This library centralizes all MCP-related code including:
- Tools: Actions that LLMs can invoke
- Prompts: Structured input templates for common tasks
- Resources: Data that LLMs can read
Classes
- BasePrompt
- Base class for all MCP prompts.
- BaseResource
- Base class for all MCP resources.
- BaseTool
- Base class for all MCP tools.
- CompareStocksPrompt
- Generates a structured prompt for comparing multiple stocks using the comprehensive analysis framework.
- ComprehensiveAnalysisPrompt
- Generates a comprehensive analysis prompt that covers all aspects of stock analysis in a single structured workflow.
- GetCompanyInfoTool
- Tool for retrieving basic company metadata and CIK number.
- GetFinancialStatementsTool
- Tool for retrieving comprehensive financial statements with computed metrics.
- GetSecFilingsTool
- Tool for retrieving SEC EDGAR filings for sentiment analysis.
Extensions
- PromptRegistration on McpServer
- Extension to register prompts with an MCP server.
- ResourceRegistration on McpServer
- Extension to register resources with an MCP server.
- ToolRegistration on McpServer
- Extension to register tools with an MCP server.
Functions
-
createAllPrompts(
) → List< BasePrompt> - Creates all available prompts.
-
createAllResources(
) → List< BaseResource> - Creates all available resources.
-
createAllTools(
FinancialDataService dataService) → List< BaseTool> - Creates all available tools with the provided FinancialDataService.
-
createMcpServer(
FinancialDataService dataService) → McpServer - Creates a fully configured MCP server instance.