Investidor10 MCP Server

Integrations

  • Provides input validation for MCP tools, ensuring data integrity when interacting with the Investidor10 API for stock market data.

Investidor10-MCP服务器

该项目是模型上下文协议 (MCP) 生态系统的一部分,提供与外部 API 交互和管理特定领域模型的工具。它旨在演示如何构建具有外部 API 集成和数据验证功能的 MCP 服务器。

目录

特征

  • get-acoes :获取基本股票信息。
  • 使用Zod进行输入验证。
  • 使用fetch (基础设施层)与 Investidor10 API 集成。

建筑学

该项目遵循受领域驱动设计(DDD)模式启发的分层架构:

  • src/domain ):定义表示数据结构的接口和类型(例如, Investidor10 )。
  • 基础设施src/infrastructure ):实现外部服务,例如Investidor10ApiService ,负责对 Investidor10 API 进行 HTTP 调用。
  • 应用程序src/application ):包含Investidor10Service中的业务逻辑,用于处理和格式化来自基础设施的数据。
  • 接口src/interface ):包括在 MCP 服务器中注册工具、定义验证模式和返回结果的控制器( Investidor10ToolsController )。
  • 入口点src/main.ts ):初始化McpServer ,配置传输( StdioServerTransport ),实例化服务和控制器,并开始监听stdio

文件夹结构如下:

src/ ├── domain/ │ └── models/ # Domain interfaces ├── infrastructure/ │ └── services/ # External API implementations (Investidor10) ├── application/ │ └── services/ # Business logic and data formatting ├── interface/ │ └── controllers/ # MCP tool registration and validation └── main.ts # Server entry point build/ # Compiled JavaScript code .vscode/ # Contains the mcp.json file, MCP Server config

安装

git clone git@github.com:newerton/mcp-investidor10.git cd mcp-investidor10 npm install npm run build

VSCode 中的 MCP 服务器配置

  1. Ctrl+Shift+P并选择“MCP:列出服务器”
  2. 选择“股票”,然后选择“启动服务器”

VSCode 中的 MCP 服务器输出

  1. Ctrl+Shift+P并选择“MCP:列出服务器”
  2. 选择“股票”,然后选择“显示输出”

贡献

欢迎提交 Pull 请求!欢迎随时提出问题并讨论改进。

执照

该项目根据 MIT 许可证进行授权 - 有关详细信息,请参阅LICENSE文件。

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Investidor10 MCP 服务器:用于与 Status Invest API 交互的模型上下文协议 (MCP) 服务器。提供用于获取股票数据和指标的工具,采用分层架构并使用 Zod 进行数据验证。

  1. Table of Contents
    1. Features
      1. Architecture
        1. Installation
          1. MCP Server Configuration in VSCode
            1. MCP Server Output in VSCode
              1. Contribution
                1. License

                  Related MCP Servers

                  View all related MCP servers

                  ID: 1vpjui2mbm