DSPy Tools
Dspy built MCP tools on a FastAPI server connected to a Golang server, client and cli
What is DSPy Tools?
DSPy Tools is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to dspy built mcp tools on a fastapi server connected to a golang server, client and cli
Dspy built MCP tools on a FastAPI server connected to a Golang server, client and cli
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Dspy built MCP tools on a FastAPI server connected to a Gola
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx dspy-mcp-toolsConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use DSPy Tools
DSPy MCP Tools is a financial analysis platform that combines DSPy-optimized AI pipelines with a FastAPI Python server and a Go-based API server, CLI, and job queue. It exposes stock price analysis, market sentiment, company fundamentals, regulatory compliance, and macro economic tools through MCP, with support for both OpenRouter-backed LLMs and local Ollama models via a PostgreSQL-backed RAG system.
Prerequisites
- Python 3.10+ and Go 1.21+ installed
- PostgreSQL database running (for RAG/regulatory analysis)
- Alpaca API key and secret for market data
- OpenRouter API key (or local Ollama install) for LLM backend
- uv or pip for Python dependency management
Clone the repository
Clone the dspy-mcp-tools repository and enter the project directory.
git clone https://github.com/marcusjihansson/dspy-mcp-tools.git
cd dspy-mcp-toolsSet up the Python environment and install dependencies
Create a virtual environment and install all required Python packages including FastAPI, DSPy, and Alpaca client libraries.
python3 -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\Activate.ps1
pip install fastapi uvicorn pydantic dspy-ai python-dotenv requests pandas numpy alpaca-py psycopg2-binary ollamaConfigure environment variables
Copy the example environment file and fill in your API credentials and database connection details.
cp .env.example .env
# Required .env keys:
# PORT=8080
# PYTHON_HOST=localhost
# PYTHON_PORT=8000
# TIMEOUT_SECONDS=30
# CHATBOT_KEY=<your-openrouter-api-key>
# DB_HOST=localhost
# DB_USER=<pg-user>
# DB_PASSWORD=<pg-password>
# DB_NAME=<database-name>
# ALPACA_API_KEY=<alpaca-key>
# ALPACA_API_SECRET=<alpaca-secret>Build and start the Go server
Compile the Go components (server, job queue, security module, CLI, and client) and then start the Go API server.
go build server.go jobqueue.go security.go
go build cli.go client.go
go run server.goStart the FastAPI Python server
In a separate terminal, activate the virtual environment and start the FastAPI server that hosts the DSPy-powered analysis tools.
source .venv/bin/activate
python fast_server.pyConfigure Claude Desktop
Add the DSPy MCP tools server to your Claude Desktop configuration. Since the server runs locally, point your MCP config to the Go server port.
{
"mcpServers": {
"dspy-mcp-tools": {
"command": "npx",
"args": ["dspy-mcp-tools"]
}
}
}Verify the server is healthy
Test that both servers are running and responding before connecting through Claude.
curl http://localhost:8080/health
curl http://localhost:8080/mcp/toolsDSPy Tools Examples
Client configuration
Claude Desktop configuration for the DSPy MCP Tools server.
{
"mcpServers": {
"dspy-mcp-tools": {
"command": "npx",
"args": ["dspy-mcp-tools"]
}
}
}Prompts to try
Use these prompts with Claude once the DSPy financial analysis tools are available.
- "Analyze AAPL stock price from 2024-01-01 to 2024-06-01 and identify key trends"
- "What is the current market sentiment for NVDA based on recent news?"
- "Generate a company profile for Microsoft including fundamental metrics"
- "Run a regulatory compliance check on TSLA and summarize any flagged issues"Troubleshooting DSPy Tools
Go server fails to connect to the FastAPI Python server
Ensure the FastAPI server is started first in a separate terminal and is listening on the port specified by PYTHON_PORT in .env (default 8000). Check that PYTHON_HOST and PYTHON_PORT in .env match the actual FastAPI server address.
Alpaca API returns empty or error responses for price data
Verify ALPACA_API_KEY and ALPACA_API_SECRET are set correctly in .env. Ensure you have a valid Alpaca account with market data access enabled. Free-tier Alpaca accounts may have delayed data; use paper trading credentials for testing.
DSPy optimization errors on startup
Ensure dspy-ai is installed with 'pip install dspy-ai' and that CHATBOT_KEY (OpenRouter API key) is set in .env. If using Ollama locally, ensure the Ollama service is running and the desired model has been pulled with 'ollama pull <model-name>'.
Frequently Asked Questions about DSPy Tools
What is DSPy Tools?
DSPy Tools is a Model Context Protocol (MCP) server that dspy built mcp tools on a fastapi server connected to a golang server, client and cli It connects AI assistants to external tools and data sources through a standardized interface.
How do I install DSPy Tools?
Follow the installation instructions on the DSPy Tools GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with DSPy Tools?
DSPy Tools works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is DSPy Tools free to use?
Yes, DSPy Tools is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
DSPy Tools Alternatives — Similar Developer Tools Servers
Looking for alternatives to DSPy Tools? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up DSPy Tools in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use DSPy Tools?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.