Demo HTTP MCP Server
The Demo HTTP MCP Server provides tools for data fetching, request handling, and session tracking, plus advice generation capabilities.
• Get Weather: Retrieve current weather for any location with customizable temperature units (celsius default)
• Get Current Time: Obtain the current time in standardized format
• Access Request Context: Interact with request headers (e.g., Authorization) using a username parameter
• Track Tool Usage: View a list of all tools called during the current session
• Generate Advice: Get structured advice on topics with optional actionable steps
• Multiple Connectivity: Operates over HTTP (Starlette/Uvicorn) or stdio for broad MCP client compatibility
Provides OAuth2 authentication for the MCP endpoint, requiring valid Auth0 Bearer tokens with specific tool scopes, and supports dynamic client registration via RFC 7591.
Manages environment variables for backend configuration through .envrc and .env files.
Provides linting for the frontend codebase as part of the development workflow.
Serves as the backend framework for the MCP server, handling HTTP routes and mounting the MCP app with authentication middleware.
Renders formatted responses in the chat interface using the marked library for markdown processing.
Powers the chat interface agent that can call MCP tools to search for vulnerabilities in the National Vulnerability Database (NVD).
Handles configuration settings and data validation throughout the backend application.
Used for testing the Python backend codebase as part of the development workflow.
Provides the frontend chat interface for querying vulnerabilities, built with React and TypeScript using Vite.
Provides linting for the Python backend codebase as part of the development workflow.
Persists chat history and message data locally through SQLite database integration for the chat interface.
Used for Python dependency management and configuration in pyproject.toml files.
Used for the frontend implementation with typed interfaces for the chat application and API client.
Builds and serves the React frontend in development with proxy configuration to the backend, and handles production builds.
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., "@Demo HTTP MCP Serverwhat's the weather in London right now?"
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.
test-http-mcp
Demo Model Context Protocol (MCP) server implemented in Python using the
http-mcp package. It can run over HTTP (Starlette/Uvicorn) or over stdio,
exposing example Tools and Prompts to any MCP-capable client. The project
includes a React frontend that provides a chat interface for querying
vulnerabilities via the NVD (National Vulnerability Database).

Project structure
test-http-mcp/
├── backend/ # Python backend (FastAPI + MCP server)
│ ├── app/ # Application source code
│ │ ├── app.py # FastAPI app, routes, MCP mount
│ │ ├── main.py # Entry points (HTTP / stdio)
│ │ ├── agen_memory.py # SQLite message persistence
│ │ ├── config.py # Settings via pydantic-settings
│ │ ├── auth0/ # Auth0 integration
│ │ │ ├── __init__.py # JWT token validator
│ │ │ └── client_store.py # Dynamic client registration (RFC 7591)
│ │ ├── tools/ # MCP tools (CPE/CVE search via NVD)
│ │ └── prompts/ # MCP prompt templates
│ ├── pyproject.toml # Python deps & scripts
│ ├── uv.lock # Locked dependencies
│ ├── ruff.toml # Linter config
│ ├── mypy.ini # Type-checker config
│ └── .envrc # direnv auto-activation
├── frontend/ # React + TypeScript frontend (Vite)
│ ├── src/
│ │ ├── components/ # ChatApp, ChatInput, MessageList, MessageBubble
│ │ ├── api.ts # API client (fetch history, stream messages)
│ │ ├── types.ts # Shared TypeScript types
│ │ ├── App.tsx # Root component
│ │ └── App.css # Styles
│ ├── vite.config.ts # Vite config with dev proxy
│ └── package.json # Node dependencies
├── AGENTS.md
├── LICENSE
└── README.mdAuthentication (Auth0)
The MCP endpoint (/mcp/) is protected with Auth0 OAuth2 authentication.
Tools require scopes (tool:search_cpe, tool:search_cve) to be present in
the access token.
Required environment variables
Variable | Description |
| Auth0 tenant domain (e.g. |
| API identifier for token validation |
| Auth0 application client ID for the MCP app |
| Management API client ID (for dynamic registration) |
| Management API client secret |
| Set to |
Place these in backend/.env (git-ignored).
App mount structure
Path | App | Auth |
| Protected MCP server | Auth0 Bearer token required |
| Dynamic client registration (RFC 7591) | Unauthenticated |
| OAuth/resource metadata | Unauthenticated |
| Chat interface endpoints | Unauthenticated (see note) |
| Frontend static files | Unauthenticated |
Note: The chat endpoints are intentionally unauthenticated for local development. Add authentication before exposing beyond localhost.
Requirements
Python 3.13
Node.js 18+ and npm
uv(recommended) orpip
Install
Backend (using uv):
cd backend
uv run python -V # creates a venv and syncs deps from pyprojectBackend (using pip):
cd backend
python3.13 -m venv .venv
source .venv/bin/activate
pip install .Frontend:
cd frontend
npm installRun
Development (frontend + backend separately)
Start the backend:
cd backend
uv run run-app
# → API on http://localhost:8000
# → MCP endpoint on http://localhost:8000/mcp/Start the frontend dev server (in a separate terminal):
cd frontend
npm run dev
# → UI on http://localhost:5173 (proxies /api/* → backend)Production (backend serves the built frontend)
Build the frontend and start the backend:
cd frontend && npm run build && cd ..
cd backend && uv run run-app
# → Everything on http://localhost:8000Run (stdio mode)
Use with Cursor or other MCP clients
With Auth0 enabled, clients must obtain an OAuth2 access token. The server
supports RFC 7591 Dynamic Client Registration
at /register, so MCP clients that implement the auth spec will register
automatically.
Example .cursor/mcp.json for HTTP mode:
{
"mcpServers": {
"test-http-mcp": {
"type": "http",
"url": "http://localhost:8000/mcp/"
}
}
}Usage with Gemini:
{
"mcpServers": {
"test": {
"httpUrl": "http://localhost:8000/mcp/",
"timeout": 5000
}
}
}Example .cursor/mcp.json entry to connect via stdio:
{
"mcpServers": {
"test_studio": {
"command": "uv",
"args": ["run", "--project", "backend", "run-stdio"],
"env": { "AUTHORIZATION_TOKEN": "Bearer TEST_TOKEN" }
}
}
}What this server exposes
Tools (see
backend/app/tools/):search_cpe(product, version, vendor)— search Common Platform Enumerations via NVDsearch_cve(cpe_name)— search Common Vulnerabilities and Exposures for a given CPE
Prompts (see
backend/app/prompts/):sync_nvd_search(dependency, version)— simple vulnerability search promptasync_nvd_search(dependency, version)— advanced prompt with pre-fetched CVE data
Project scripts
Two console entry points are defined in backend/pyproject.toml:
run-app→app.main:run_httprun-stdio→app.main:run_stdiorun-app-local→app.app:main(with auto-reload)
Development
Common tasks (run from the backend/ directory):
uv run ruff check . # lint
uv run mypy . # type check
uv run pytest # tests
uv run mdformat . # format markdownFrontend tasks (run from the frontend/ directory):
npm run dev # start dev server
npm run build # production build
npm run lint # lint with ESLint
npx tsc --noEmit # type checkImplementation notes
The root ASGI app is an Auth0-protected MCP app created by
auth_mcp, which mounts the FastAPI sub-app at/api.The MCP endpoint at
/mcp/requires a valid Auth0 Bearer token with the appropriate tool scopes.Dynamic client registration at
/registerproxies to a pre-created Auth0 application, updating its allowed callback URLs. Redirect URIs are validated (HTTPS required; HTTP allowed only for localhost).The chat interface uses
pydantic-aiwith an Ollama agent that can call MCP tools to search for vulnerabilities.Chat history is persisted in a local SQLite database via
agen_memory.py.The React frontend streams responses as newline-delimited JSON and renders markdown with the
markedlibrary.In production, the backend serves the built frontend from
frontend/dist/with SPA fallback routing (path traversal protected).In development, Vite proxies
/api/*requests to the backend on port 8000.
License
MIT — see LICENSE.
Available Tools
4 toolsget_called_toolsGet Called ToolsAIdempotent
Get the list of called tools.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| called_tools | Yes | The list of called tools |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description doesn't contradict annotations and adds some context by specifying 'list of called tools' (implying retrieval of historical tool usage data). However, annotations already provide rich behavioral information: readOnlyHint=false (potentially confusing for a 'get' operation), openWorldHint=true, idempotentHint=true, destructiveHint=false. The description doesn't add significant behavioral details beyond what annotations already cover, but it doesn't contradict them either.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with zero wasted words. It's front-loaded with the essential information and perfectly sized for a simple tool. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, rich annotations, output schema exists), the description is reasonably complete. The annotations cover safety and behavioral traits, and the output schema will document return values. The description could be more specific about what 'called tools' means in context, but for a simple retrieval tool, it's mostly adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0 parameters and 100% schema description coverage, the schema already fully documents the lack of inputs. The description doesn't need to explain parameters, and it correctly doesn't mention any. The baseline for 0 parameters is 4, as the description appropriately focuses on the tool's purpose rather than nonexistent parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get the list of called tools' clearly states the verb ('Get') and resource ('list of called tools'), making the purpose understandable. However, it doesn't distinguish this tool from its siblings (get_time, get_weather, tool_that_access_request) - all are 'get' operations but for different data. The description is adequate but lacks sibling differentiation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There's no mention of context, prerequisites, or comparison with sibling tools. The agent must infer usage from the tool name alone, which offers minimal guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_timeGet TimeAIdempotent
Get the current time.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
| time | Yes | The current time |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide key behavioral hints (readOnlyHint=false, openWorldHint=true, idempotentHint=true, destructiveHint=false), so the description doesn't need to repeat these. The description adds minimal context about what 'current time' means, but doesn't elaborate on format, timezone, or other behavioral details beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description 'Get the current time' is a single, efficient sentence that front-loads the core purpose with zero wasted words. It's appropriately sized for a simple tool with no parameters.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, annotations covering key behaviors, and an output schema that presumably handles return values), the description is reasonably complete. However, it could slightly improve by hinting at the output format (e.g., timestamp vs. string) since sibling tools suggest varied contexts.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 0 parameters and 100% schema description coverage, the schema fully documents the lack of inputs. The description doesn't need to add parameter information, so it appropriately avoids redundancy. A baseline of 4 is justified since no parameters exist to explain.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get the current time' clearly states the verb ('Get') and resource ('current time'), making the purpose immediately understandable. However, it doesn't distinguish this tool from potential sibling tools like 'get_called_tools' or 'get_weather', which prevents a perfect score.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There are sibling tools like 'get_weather' that might serve related time/weather queries, but the description doesn't mention any context, prerequisites, or exclusions for usage.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_weatherGet WeatherBIdempotent
Get the current weather in a given location.
| Name | Required | Description | Default |
|---|---|---|---|
| location | Yes | The location to get the weather for | |
| unit | No | The unit of temperature | celsius |
Output Schema
| Name | Required | Description |
|---|---|---|
| weather | Yes | The weather in the given location |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide key behavioral hints (readOnlyHint=false, openWorldHint=true, idempotentHint=true, destructiveHint=false), so the description doesn't need to repeat these. It adds minimal context by implying real-time data retrieval, but doesn't disclose additional traits like rate limits, error handling, or authentication needs, which would elevate the score.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose without unnecessary details. Every word earns its place, making it highly concise and well-structured for quick understanding.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (2 parameters, 100% schema coverage, annotations provided, and an output schema exists), the description is reasonably complete. It states what the tool does, though it could benefit from slight enhancements like mentioning the output includes current conditions, but the output schema likely covers return values, reducing the burden.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema fully documents the parameters (location and unit). The description mentions 'location' but adds no extra meaning beyond what the schema provides, such as format examples or usage nuances, meeting the baseline for high coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with a specific verb ('Get') and resource ('current weather'), and it specifies the scope ('in a given location'). However, it doesn't distinguish this tool from potential siblings like 'get_forecast' or 'get_historical_weather', which would require explicit differentiation for a score of 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. It lacks any mention of prerequisites, exclusions, or comparisons with sibling tools (e.g., 'get_time' or 'get_called_tools'), leaving the agent without context for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
tool_that_access_requestTool That Access RequestCIdempotent
Access the request.
| Name | Required | Description | Default |
|---|---|---|---|
| username | Yes | The username of the user |
Output Schema
| Name | Required | Description |
|---|---|---|
| message | Yes | The message to the user |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations provide significant behavioral information: readOnlyHint=false (implies mutation), openWorldHint=true (handles unknown inputs), idempotentHint=true (safe to retry), and destructiveHint=false (non-destructive). The description adds no behavioral context beyond these annotations—it doesn't explain what 'access' entails operationally, potential side effects, or any constraints like rate limits. However, it doesn't contradict the annotations, so it meets the lower bar with annotations present.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise at just three words ('Access the request.'), with no wasted language or unnecessary elaboration. It is front-loaded and efficiently communicates the core idea, though this brevity contributes to its vagueness in other dimensions.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's moderate complexity (1 parameter, annotations provide behavioral hints, output schema exists), the description is minimally adequate but incomplete. It lacks context on what the tool actually does, usage scenarios, or output expectations. The presence of an output schema means return values needn't be explained, but the description should still clarify purpose and guidelines better to be fully helpful.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with the 'username' parameter fully documented in the schema. The description adds no parameter semantics beyond what the schema provides—it doesn't explain why the username is needed, how it relates to the request, or any contextual details about parameter usage. With high schema coverage, the baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Access the request' is a tautology that essentially restates the tool name 'tool_that_access_request' without adding meaningful specificity. It doesn't clarify what type of request is being accessed, what resource is involved, or what 'access' means in this context (read, modify, submit?). While it includes a verb ('access') and resource ('request'), it remains vague about the actual purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives. There are sibling tools like 'get_called_tools', 'get_time', and 'get_weather', but the description doesn't explain how this tool differs from them or in what context it should be selected. No prerequisites, exclusions, or comparative context are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool has a clearly distinct purpose: get_called_tools retrieves internal server usage data, get_time provides current time, get_weather fetches location-based weather, and tool_that_access_request handles request metadata. There is no overlap in functionality, making tool selection unambiguous.
Three tools follow a consistent 'get_*' verb_noun pattern, but tool_that_access_request deviates with a noun_verb structure and uses 'that' as a connector. This mixed convention reduces predictability, though the names remain readable.
With 4 tools, the count is reasonable for a demo HTTP server, covering basic utilities like time, weather, and request handling. It is slightly thin for broader HTTP operations but appropriate for a limited scope.
The server covers basic utilities but lacks core HTTP operations like making requests (GET, POST) or handling responses, which are expected for an HTTP server. The tools are standalone utilities rather than a cohesive HTTP interface, leaving notable gaps in functionality.
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 Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server exposing the Backtest360 engine API as tools for AI agents.
Hosted MCP server for live public-data APIs and Skills for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA minimal Model Context Protocol server demo that exposes tools through HTTP API, including greeting, weather lookup, and HTTP request capabilities. Demonstrates MCP server implementation with stdio communication and HTTP gateway functionality.10ISC
- FlicenseBqualityDmaintenanceA demonstration server showcasing MCP capabilities with basic tools including addition calculations and weather API integration for fetching city weather data.22
- FlicenseNot gradedqualityDmaintenanceA basic MCP server for testing with echo, datetime, and calculator tools.88
- AlicenseAqualityDmaintenanceA minimal MCP server example demonstrating Tools, Resources, and Prompts. It enables calculations, time queries, note management, and code review prompts via stdio transport.310MIT
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/yeison-liscano/demo_http_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server