mcp_cimd_server
This MCP server provides a greeting tool and implements server-side processing for Client ID Metadata Documents (CIMD) with robust security and caching.
say_hello(name)– Returns a friendly greeting for a given name (defaults to 'world').cimd_resolve(client_id)– Fetches, validates, and caches CIMD metadata from an HTTPS URL. Applies SSRF protections: HTTPS-only, blocks private/loopback/link-local IPs, DNS rebinding protection, TLS validation, 5 KB size limit,application/jsoncontent-type enforcement, and max 3 redirects. Validates the JSON schema (client_id must match, redirect_uris required). Returns specific OAuth error codes on failure (e.g.,invalid_client,invalid_client_metadata). Caches results with a 10-minute TTL.cimd_cache_info()– Inspects the current CIMD metadata cache, showing cached client IDs and their remaining TTLs (admin tool).cimd_clear_cache()– Clears all cached CIMD metadata, forcing a re-fetch on the nextcimd_resolvecall (admin tool).Runs as an MCP server over stdio, compatible with MCP clients like Claude Desktop or Cline.
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., "@mcp_cimd_serverResolve the CIMD document for https://client.example.com/metadata.json"
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.
MCP Hello CIMD
A Model Context Protocol (MCP) hello world server with a say_hello tool, that also implements the server side of CIMD — Client ID Metadata Documents (https://client.dev/servers).
⚠️ Important: this project is a server, not a client. It serves MCP tools to MCP clients and it consumes CIMD documents exactly as an OAuth authorization server would.
What is CIMD?
CIMD (Client ID Metadata Documents) is a new OAuth approach that lets clients identify themselves using HTTPS URLs instead of preregistration. Instead of a client registry, an authorization server fetches the client's metadata just-in-time from the client_id URL.
This project implements the server-side CIMD processing flow from https://client.dev/servers:
Receive OAuth request — client sends
client_idas an HTTPS URLFetch CIMD document — HTTPS GET to the
client_idURL withAccept: application/jsonValidate schema & content — parse JSON, verify required fields, check redirect URIs
Enforce policies — SSRF protections, size limits, TTL caching
Proceed with OAuth flow — return the validated metadata
Related MCP server: mcp_auth_server
Features
MCP (the hello world part)
say_hello(name)— the classic hello world MCP tool
CIMD (server-side implementation)
cimd_resolve(client_id)— full CIMD server flow: validate URL → fetch → validate schema → cachecimd_cache_info()— admin tool to inspect the metadata cachecimd_clear_cache()— admin tool to force re-fetch of metadata
Security (SSRF protections)
HTTPS only — rejects non-HTTPS client_id URLs immediately
Private/loopback/link-local address blocking — RFC 1918, 127.0.0.0/8, 169.254.0.0/16, IPv6 equivalents, and more
DNS rebinding protection — resolves and validates DNS, pins IPs for requests
TLS validation — validates certificates, modern TLS only
Size limits — 5 KB max document size (per the CIMD spec)
Content-Type enforcement — requires
application/jsonRedirect limits — max 3 redirects, each hop re-validated
Cache with TTL — 10 minute default TTL to balance freshness and performance
Installation
pip install -e .Running the server
The server speaks MCP over stdio:
Or directly:
uvicorn mcp_hello_cimd.main:app --port 8001
Add to an MCP client (e.g. Claude Desktop / Cline)
Add to your MCP settings configuration (mcpServers):
{
"mcpServers": {
"hello-cimd": {
"command": "python",
"args": ["-m", "mcp_hello_cimd.cli"]
}
}
}The CIMD flow in action
When an OAuth request arrives with a client_id like:
GET /authorize?client_id=https://client.example.com/.well-known/oauth-client-metadata.json&...cimd_resolve performs the server-side flow:
1. Validate URL format → must be https://
2. Check cache first → TTL 600s, returns if fresh
3. Fetch with SSRF protections → 5KB limit, 10s timeout, 3 redirects max
4. Parse and validate JSON → client_id must match URL, redirect_uris required
5. Cache and return metadata → cached for 10 minutesExample metadata document a client would host
{
"client_id": "https://client.example.com/.well-known/oauth-client-metadata.json",
"client_name": "Example OAuth Client",
"client_uri": "https://client.example.com",
"redirect_uris": ["https://client.example.com/callback"],
"grant_types": ["authorization_code"],
"response_types": ["code"],
"token_endpoint_auth_method": "private_key_jwt",
"scope": "openid profile email"
}Error semantics
Per the CIMD server spec, failures produce clear OAuth-style errors:
Condition | Error code |
Metadata fetch failed (network, HTTP error) |
|
Malformed JSON / missing required fields |
|
SSRF violation (non-HTTPS, private IP, etc.) |
|
Project layout
src/mcp_hello_cimd/
├── __init__.py
├── main.py # CLI entry point (stdio transport)
├── server.py # MCP server: say_hello + CIMD tools
└── cimd/
├── __init__.py
├── ssrf.py # SSRF protections (blocked ranges, DNS pinning)
└── processor.py # CIMD server flow: fetch → validate → cache
tests/
└── test_server.py # TestsTesting
pip install -e ".[dev]"
pytestResources
running test pytest -k test_say_hello
test client
start server
uvicorn mcp_hello_cimd.main:app --port 8001And then run the client
python streamable_http_client.pyMaintenance
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
- Flicense-qualityCmaintenanceA proof-of-concept MCP server implementing OAuth 2.1 authorization with CIMD client registration and PKCE, demonstrating protected resource access and step-up authentication.Last updated
- Flicense-qualityDmaintenanceA simple MCP server with OAuth 2.0 authentication for testing OAuth support in mcp-cli.Last updated
- Flicense-qualityBmaintenanceA simple HTTP-based MCP server that provides demo tools (get_test_string, echo, check_maintenance), greeting prompts, and test resources, with optional OAuth 2.1 support.Last updated
Related MCP Connectors
MCP server for verifying EUDI/Talao wallet data via OIDC4VP (pull) for AI agents.
An MCP server that let you interact with Cycloid.io Internal Development Portal and Platform
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
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/kepungnzai/mcp_cimd_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server