Preços, atas, contratos e sanções das APIs públicas de compras do governo brasileiro
registry version 0.4.0
Python
uvx compras-mcpPython
uvx compras-mcp@0.4.0Streamable HTTP
https://mcp-compras.up.railway.app/mcp
Pick your client — the config below is generated for this server (both local and hosted-endpoint forms). Copy respects the “Pin version” switch above.
claude_desktop_config.json
{
"mcpServers": {
"mcp-compras": {
"command": "uvx",
"args": [
"compras-mcp"
],
"env": {
"TRANSPARENCIA_API_KEY": "<YOUR_TRANSPARENCIA_API_KEY>",
"REDIS_URL": "<YOUR_REDIS_URL>"
}
}
}
}{
"mcpServers": {
"mcp-compras": {
"command": "uvx",
"args": [
"compras-mcp@0.4.0"
],
"env": {
"TRANSPARENCIA_API_KEY": "<YOUR_TRANSPARENCIA_API_KEY>",
"REDIS_URL": "<YOUR_REDIS_URL>"
}
}
}
}Remote (hosted) endpoint
https://mcp-compras.up.railway.app/mcp
Claude Desktop: Settings → Connectors → Add custom connector, paste this URL.
Format verified against the official Claude Desktop docs ↗.
terminal
claude mcp add --env TRANSPARENCIA_API_KEY=<YOUR_TRANSPARENCIA_API_KEY> --env REDIS_URL=<YOUR_REDIS_URL> mcp-compras -- uvx compras-mcp
claude mcp add --env TRANSPARENCIA_API_KEY=<YOUR_TRANSPARENCIA_API_KEY> --env REDIS_URL=<YOUR_REDIS_URL> mcp-compras -- uvx compras-mcp@0.4.0
terminal
claude mcp add --transport http mcp-compras https://mcp-compras.up.railway.app/mcp
Format verified against the official Claude Code docs ↗.
.cursor/mcp.json
{
"mcpServers": {
"mcp-compras": {
"command": "uvx",
"args": [
"compras-mcp"
],
"env": {
"TRANSPARENCIA_API_KEY": "<YOUR_TRANSPARENCIA_API_KEY>",
"REDIS_URL": "<YOUR_REDIS_URL>"
}
}
}
}{
"mcpServers": {
"mcp-compras": {
"command": "uvx",
"args": [
"compras-mcp@0.4.0"
],
"env": {
"TRANSPARENCIA_API_KEY": "<YOUR_TRANSPARENCIA_API_KEY>",
"REDIS_URL": "<YOUR_REDIS_URL>"
}
}
}
}.cursor/mcp.json (hosted endpoint)
{
"mcpServers": {
"mcp-compras": {
"url": "https://mcp-compras.up.railway.app/mcp"
}
}
}Format verified against the official Cursor docs ↗.
.vscode/mcp.json
{
"servers": {
"mcp-compras": {
"command": "uvx",
"args": [
"compras-mcp"
],
"env": {
"TRANSPARENCIA_API_KEY": "<YOUR_TRANSPARENCIA_API_KEY>",
"REDIS_URL": "<YOUR_REDIS_URL>"
}
}
}
}{
"servers": {
"mcp-compras": {
"command": "uvx",
"args": [
"compras-mcp@0.4.0"
],
"env": {
"TRANSPARENCIA_API_KEY": "<YOUR_TRANSPARENCIA_API_KEY>",
"REDIS_URL": "<YOUR_REDIS_URL>"
}
}
}
}.vscode/mcp.json (hosted endpoint)
{
"servers": {
"mcp-compras": {
"type": "http",
"url": "https://mcp-compras.up.railway.app/mcp"
}
}
}Format verified against the official VS Code docs ↗.
mcp_config.json
{
"mcpServers": {
"mcp-compras": {
"command": "uvx",
"args": [
"compras-mcp"
],
"env": {
"TRANSPARENCIA_API_KEY": "<YOUR_TRANSPARENCIA_API_KEY>",
"REDIS_URL": "<YOUR_REDIS_URL>"
}
}
}
}{
"mcpServers": {
"mcp-compras": {
"command": "uvx",
"args": [
"compras-mcp@0.4.0"
],
"env": {
"TRANSPARENCIA_API_KEY": "<YOUR_TRANSPARENCIA_API_KEY>",
"REDIS_URL": "<YOUR_REDIS_URL>"
}
}
}
}mcp_config.json (hosted endpoint)
{
"mcpServers": {
"mcp-compras": {
"serverUrl": "https://mcp-compras.up.railway.app/mcp"
}
}
}Format verified against the official Windsurf docs ↗.
Defined in the server's official registry manifest. Required secrets are shown as <YOUR_…> placeholders in the configs above.
TRANSPARENCIA_API_KEY secret — Chave gratuita do Portal da Transparência (CGU). Habilita as tools de sanções (CEIS, CNEP, CEAF, CEPIM). Sem ela, as demais tools seguem funcionando. Cadastro: api.portaldatransparencia.gov.br/api-de-dados/cadastrar-emaiREDIS_URL secret — Opcional. Compartilha o cache TTL entre processos; sem ela o cache fica em memória local.INCLUIR_CPF_COMPLETO — Default 'false': CPFs de servidores vêm mascarados (123.***.***-45) por LGPD. Use 'true' apenas quando estritamente necessário.Distributed as Python, Streamable HTTP, listed under Developer Tools. Review our MCP security guide before granting access to real data.
Run the install command shown above, then paste the config for your client (Claude Desktop, Claude Code, Cursor, VS Code or Windsurf) into its MCP settings and restart the client.
The MCP server itself is free to install. The source is public on https://github.com/opedrosoares/MCP_Compras. Any third-party service it calls may require its own API key and account.
Any MCP-compatible client can use it, including Claude Desktop, Claude Code, Cursor, VS Code, Windsurf and custom agents.
Publish this server? Link back with a badge on your README or site — copy either snippet.
Markdown
[](https://mcpnav.net/server/mcp-compras/)
HTML
<a href="https://mcpnav.net/server/mcp-compras/"><img src="https://mcpnav.net/badge/mcp-compras.svg" alt="Listed on MCPNav" height="20"></a>