MCP Server live — AI agents can now query 105M+ SEC facts. Connect your agent →
ValueinValuein
ai
beginner
8 min

Building a Financial Agent with MCP

Configure Claude or Cursor to query SEC data via the Valuein MCP Server. Write prompts that generate investment research, screen for opportunities, and analyze risk.

MCP ServerClaudeCursor

What is the Valuein MCP Server?

Model Context Protocol (MCP) is an open standard for connecting AI assistants to external data sources. The Valuein MCP Server exposes 14 financial data tools that any MCP-compatible AI agent can call: Claude, Cursor, Codex, and more. Your agent can search companies, fetch fundamentals, screen the universe, and analyze earnings — all in natural language.

Configure Claude Desktop

Add Valuein to your Claude Desktop MCP configuration.

# ~/.config/claude/claude_desktop_config.json
{
  "mcpServers": {
    "valuein": {
      "url": "https://mcp.valuein.biz/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Configure Cursor

Add Valuein to your Cursor MCP settings.

# .cursor/mcp.json (project-level)
{
  "mcpServers": {
    "valuein": {
      "url": "https://mcp.valuein.biz/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_TOKEN"
      }
    }
  }
}

Example Agent Prompts

Once configured, use natural language to run financial research. The agent calls the appropriate MCP tools automatically.

# Growth screen:
"Screen the Technology sector for companies with strong revenue growth
 and high FCF-to-assets rank. Show top 10 by composite score."

# Single company deep-dive:
"Get Apple's last 5 years of fundamentals. Calculate revenue CAGR
 and FCF margin trend. Flag any deterioration."

# Earnings momentum:
"Which S&P 500 companies have beaten their EPS trend estimate
 by more than 10% in the last 3 quarters?"

# Risk analysis:
"Find companies with rapidly rising debt-to-equity and
 declining operating margins. Use the latest available data."

Understanding Tool Responses

Every MCP tool response includes an _meta envelope with plan info, tool latency, and PIT-safety flags.

# Example response structure from get_company_fundamentals:
{
  "_meta": {
    "tool": "get_company_fundamentals",
    "plan": "sp500",
    "pit_safe": true,
    "latency_ms": 142
  },
  "ticker": "AAPL",
  "company_name": "Apple Inc.",
  "periods_returned": 5,
  "data": [
    {
      "fiscal_year": 2024,
      "fiscal_period": "FY",
      "period_end": "2024-09-28",
      "revenue": 391035000000,
      "net_income": 93736000000,
      "eps_diluted": 6.08
    }
  ]
}

You've finished all guides

Ready to run code? See the examples.

Back to guides