Secure Public API MCP Server
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., "@Secure Public API MCP ServerGet the latest EUR to USD rate and weather alerts for Texas"
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.
Secure Public API MCP Server
FastAPI hosts an OAuth-protected FastMCP server for eight read-only public APIs.
The /query convenience endpoint accepts request_id and request_message,
then selects the relevant allow-listed API tools.
Routing modes
By default, routing is deterministic and does not need an LLM or API key:
export LLM_ROUTING_ENABLED=falseTo enable Gemini reasoning, configure Google Cloud Application Default Credentials (ADC) and restart the server:
export LLM_ROUTING_ENABLED=true
export GOOGLE_CLOUD_PROJECT='your-gcp-project-id'
export GOOGLE_CLOUD_LOCATION='us-central1' # optional
# Optional; defaults to gemini-2.5-flash
export GEMINI_MODEL='gemini-2.5-flash'For local development, authenticate the Google SDK once:
gcloud auth application-default loginFor a deployed workload, attach a service account with Vertex AI access and
use its ambient credentials (or set GOOGLE_APPLICATION_CREDENTIALS to the
service-account credential file). Do not put a Gemini API key in this project.
With LLM routing enabled, Gemini receives a constrained prompt and must return
validated JSON naming only the eight local tools. It cannot access arbitrary
URLs, execute code, or bypass authorization. The service validates and bounds
each selected argument before calling any public API. If the flag is enabled
without project/ADC configuration or the SDK, /query returns 503; it does not silently switch
to rule routing.
Related MCP server: OpenAPI MCP Server
Local setup
cd /Users/nkrishnakumar/Documents/Mohaan/public-api-mcp
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtCreate the local configuration before starting the app. It prompts for a local
password, generates the JWT and OAuth client secrets, and writes every required
export to .env.local (which is Git-ignored):
python3 setup.py
source .env.local
uvicorn main:app --reloadEnable Gemini/Vertex AI routing while creating the configuration:
python3 setup.py --llm --gcp-project 'your-gcp-project-id'
source .env.local
gcloud auth application-default login
uvicorn main:app --reloadsetup.py configures APP_ENV, JWT issuer/audience/expiry/signing key,
allow-listed users and OAuth clients, LLM mode, Google Cloud project/location,
and Gemini model. It also exports LOCAL_OAUTH_CLIENT_ID and
LOCAL_OAUTH_CLIENT_SECRET for local curl testing. Re-run it whenever you want
new local secrets; it replaces .env.local.
The service runs at http://127.0.0.1:8000; OpenAPI documentation is at
/docs.
Authentication and authorization
POST /token requires both an approved OAuth client (client_id and
client_secret) and an approved user credential. It issues a short-lived JWT
containing issuer, audience, expiry, role, and scopes. Every /mcp/* request
and /query needs this Bearer token. user has read; admin has read
and write. All current public API tools are read-only.
curl -X POST http://127.0.0.1:8000/token \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d "username=local-user&password=<the-password-you-entered>&client_id=$LOCAL_OAUTH_CLIENT_ID&client_secret=$LOCAL_OAUTH_CLIENT_SECRET"curl -X POST http://127.0.0.1:8000/query \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json' \
-d '{"request_id":"local-001","request_message":"Show Texas weather alerts and the EUR exchange rate"}' | jqMCP clients connect to GET /mcp/sse with the same Bearer token and call the
tools get_currency_rate, get_artworks, get_dog_pic, get_cat_pic,
get_dictionary_meaning, get_weather_alerts, get_random_pic, and
get_vehicle_manufacturers.
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
- Alicense-qualityDmaintenanceFastMCP is a comprehensive MCP server allowing secure and standardized data and functionality exposure to LLM applications, offering resources, tools, and prompt management for efficient LLM interactions.3MIT
- Alicense-qualityCmaintenanceA generic MCP server that dynamically converts OpenAPI-defined REST APIs into tools for LLMs like Claude. It supports multiple authentication methods and transport protocols, enabling seamless interaction with any OpenAPI-compliant API.17MIT
- Flicense-qualityAmaintenanceStateless MCP server providing tools for weather forecasts and alerts, real-time stock quotes, DC Metro rail incidents and arrivals, and live flight tracking, secured with OAuth 2.0.
- Flicense-qualityDmaintenanceMCP server for Arbisoft's ERP system, enabling AI assistants to read and write project time logs via OAuth-authenticated tool calls.
Related MCP Connectors
MCP server for Argo RPG Platform — connects AI assistants to campaign data via OAuth2
Multi-tenant FastMCP server for Charles Schwab brokerage data, monetized via DPYC Tollbooth
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/rmohaan/mcp-api'
If you have feedback or need assistance with the MCP directory API, please join our Discord server