Skip to main content
Glama
20251009-0004-fastmcp-server-setup.md2.06 kB
--- story_id: "0004" title: "FastMCP server initialization and configuration" created: "2025-10-09" status: done dependencies: ["0001"] estimated_complexity: "low" tags: ["server", "infrastructure", "phase1"] - status: in-progress timestamp: 2025-10-09T21:13:31Z - status: ready-for-review timestamp: 2025-10-09T21:20:53Z - status: done timestamp: 2025-10-09T21:22:59Z --- # Story 0004: FastMCP server initialization and configuration ## Description Set up the FastMCP server instance with stdio transport and configure it for use as an MCP server by Claude Code/Desktop. This creates the foundation for registering MCP tools. ## Acceptance Criteria - [x] `src/mcp_test_mcp/server.py` created - [x] FastMCP instance created with name "mcp-test-mcp" - [x] `src/mcp_test_mcp/__main__.py` created as entry point - [x] Entry point calls `mcp.run()` for stdio transport - [x] Server starts successfully with `python -m mcp_test_mcp` - [x] Logging configured (structured JSON to stdout) - [x] Basic health check or ping capability - [x] Integration test verifying server starts and responds ## Technical Notes **Basic server setup:** ```python # src/mcp_test_mcp/server.py from fastmcp import FastMCP mcp = FastMCP(name="mcp-test-mcp") # Tools will be registered here in subsequent stories ``` **Entry point:** ```python # src/mcp_test_mcp/__main__.py from mcp_test_mcp.server import mcp if __name__ == "__main__": mcp.run() # stdio by default ``` **Logging configuration:** - Format: Structured JSON - Output: stdout - Levels: DEBUG, INFO, WARNING, ERROR - Configurable via MCP_TEST_LOG_LEVEL environment variable ## AI Directives **IMPORTANT**: As you work through this story, please mark checklist items as complete `[x]` as you finish them. This ensures that if we need to pause and resume work, we have a clear record of progress. Update the `status` field in the frontmatter when moving between stages (in-progress, ready-for-review, done, blocked). Search for current FastMCP v2 server initialization patterns if needed.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rdwj/mcp-test-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server