FastAPI MCP-Style Server
Provides database connectivity for querying data through the query_manse tool, enabling retrieval of records from MariaDB databases with configurable connection parameters.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FastAPI MCP-Style Serverecho 'Hello, how are you?'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FastAPI MCP-Style Server
Minimal FastAPI implementation that mimics a subset of Model Context Protocol (MCP) functionality.
Features
Echo-style POST
/mcpendpoint returning structured response (id, status, outputs)JSON-RPC 2.0 endpoint
/mcp/rpcsupporting:mcp.list_toolsmcp.call_tool(tools:echo,uppercase,query_manse,calc_daewoon)
GET usage helper
/mcpPydantic models for request/response
Basic logging
Tests (pytest) for REST + RPC
Related MCP server: JSON-RPC
Quick Start
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
uvicorn main:app --reloadREST Usage
curl -X POST http://127.0.0.1:8000/mcp \
-H 'Content-Type: application/json' \
-d '{"inputs": {"text": "hello"}}'JSON-RPC Examples
List tools:
curl -X POST http://127.0.0.1:8000/mcp/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"mcp.list_tools"}'Call echo:
curl -X POST http://127.0.0.1:8000/mcp/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":"abc","method":"mcp.call_tool","params":{"name":"echo","arguments":{"text":"hello"}}}'Call query_manse (first 5 rows):
curl -X POST http://127.0.0.1:8000/mcp/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":2,"method":"mcp.call_tool","params":{"name":"query_manse","arguments":{"limit":5}}}'Call calc_daewoon (example date):
curl -X POST http://127.0.0.1:8000/mcp/rpc \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":3,"method":"mcp.call_tool","params":{"name":"calc_daewoon","arguments":{"yyyymmdd":"20250115"}}}'Response example:
{
"jsonrpc": "2.0",
"id": 3,
"result": {
"outputs": [
{"type": "json", "content": {"asc_diff_days": 3, "desc_diff_days": 2}}
]
}
}Meaning:
asc_diff_days: 기준일 이후 다음 절기까지 (일수 / 3 반올림)
desc_diff_days: 기준일 이전 직전 절기까지 (일수 / 3 반올림)
없으면 null
Environment Variables (DB)
Variable | Default | Description |
MCP_DB_HOST | 192.168.31.136 | MariaDB host |
MCP_DB_PORT | 3306 | MariaDB port |
MCP_DB_USER | DB user | |
MCP_DB_PASSWORD | DB password | |
MCP_DB_NAME | manse | Database name |
Example run with overrides:
MCP_DB_HOST=127.0.0.1 MCP_DB_USER=app MCP_DB_PASSWORD=secret uvicorn main:app --reloadRun Tests
pytest -qNext Ideas
Streaming (SSE) outputs
Prompts/resources primitives
Auth layer (OAuth / API key)
Tool change events
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityDmaintenanceA minimal Model Context Protocol server built with FastAPI that provides a basic "Hello World" resource and tool. Serves as a starting point for building and validating MCP client integrations with richer resources and tools.Last updated
- AlicenseBqualityDmaintenanceA Model Context Protocol (MCP) server based on OpenRPC, providing JSON-RPC function invocation and method discovery services.Last updated21Apache 2.0
- FlicenseBqualityDmaintenanceA demonstration server that implements JSON-RPC 2.0 methods for basic arithmetic using FastAPI. It provides integration examples for the Model Context Protocol (MCP) using FastMCP to connect with Claude Desktop.Last updated1
- Alicense-qualityDmaintenanceEnables MCP clients to connect to LLM/API services using the Model Context Protocol, providing real-time interaction and tool access. Also offers RESTful API endpoints via FastAPI for programmatic integration with existing systems.Last updatedApache 2.0
Related MCP Connectors
MCP (Model Context Protocol) server for Appwrite
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/ilyoungkim/mcp-test'
If you have feedback or need assistance with the MCP directory API, please join our Discord server