mcp_census_server

How to Run MCP Census Server & Client

This guide explains how to configure environment variables and start both the server and client applications.

Prerequisites

Single Command Setup

From the project root (mcp_census_server/), run the helper script:

chmod +x start.sh
./start.sh

Follow the prompts to enter:

This script will:

  1. Create and populate .env in the server folder
  2. Create and populate .env.local in the client folder
  3. Launch the FastAPI server on port 8000
  4. Launch the Next.js client on port 3000

Manual Setup

1. Server

cd mcp_census_server
cp .env.example .env
# Edit .env → set CENSUS_API_KEY and SERVER_API_KEY
pip install -r requirements.txt
uvicorn app:app --host 0.0.0.0 --port 8000 --reload

2. Client

cd client
cp .env.example .env.local
# Edit .env.local → set OPENAI_API_KEY, MCP_SERVER_URL, SERVER_API_KEY
npm install
npm run dev

Then open http://localhost:3000 in your browser.