About MCP Server Financeiro
A Go example MCP server for registering and listing financial tools and querying stock prices through the Alpha Vantage API. It also provides MCP-formatted metadata for client agents.
Key features
- 01Register financial tools dynamically
- 02List registered financial tools
- 03Query stock prices via Alpha Vantage
- 04Expose MCP server metadata
Use cases
- 01Register and inspect financial tools
- 02Retrieve a stock price by symbol
- 03Provide server metadata to client agents
MCP support
Exposes server metadata at `/metadata` for MCP clients and demonstrates a financial-tool server structure.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Server Financeiro
Este projeto é um exemplo prático de como construir um MCP Server simples utilizando Go.
Ele simula a gestão de ferramentas financeiras e realiza consultas reais de cotações de ações utilizando a API pública da Alpha Vantage.
O objetivo é mostrar como estruturar um servidor que siga os princípios básicos do Model Context Protocol (MCP), incluindo a exposição de um endpoint /metadata.
Funcionalidades
- Registrar ferramentas financeiras dinamicamente
- Listar todas as ferramentas registradas
- Consultar preços de ações em tempo real (Alpha Vantage)
- Expor metadados no padrão MCP para agentes clientes
Estrutura de Endpoints
1. Registrar ferramenta financeira
POST http://localhost:8080/register-financial-tool
Content-Type: application/json
{
"name": "Consulta Ações",
"description": "Consulta cotações de ações em tempo real",
"endpoint": "https://www.alphavantage.co/query",
"service_type": "cotacao"
}
2. Listar ferramentas financeiras
GET http://localhost:8080/list-financial-tools
Accept: application/json
3. Consultar preço de uma ação (Alpha Vantage)
POST http://localhost:8080/query-stock-price
Content-Type: application/json
{
"symbol": "AAPL"
}
4. Consultar metadados do MCP Server
GET http://localhost:8080/metadata
Accept: application/json
Pré-requisitos
- Conta gratuita na Alpha Vantage para gerar sua API Key
Como rodar o projeto
- Clone o repositório
git clone https://github.com/seuusuario/go-mcp-server-financeiro.git
cd go-mcp-server-financeiro
- Crie um arquivo
.envna raiz do projeto:
ALPHA_VANTAGE_API_KEY=sua_api_key_aqui
- Instale as dependências
go mod tidy
- Rode o servidor
go run cmd/main.go
O servidor ficará disponível em http://localhost:8080.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.