Expose context as tools and resources
The Model Context Protocol lets a server expose tools for actions and resources for context. A SolarflareDB MCP server can use both: tools perform scoped queries and writes, while resources expose read-only schemas, graph metadata, saved views, and specific context items through stable URIs.
Start with a small, permissioned tool set
context_query: hybrid retrieval with current/as-of mode and result budget.context_remember: commit an episode with source and idempotency key.context_get: fetch one item and provenance by identifier.context_neighbors: bounded typed neighborhood traversal.context_explain: inspect retrieval signals and watermarks.
Administrative operations such as schema registration, region sealing, billing, and erasure should not be exposed to an ordinary model-facing MCP server.
Use resources for inspectable, stable context
Possible resource URIs include solarflare://graphs/{graph}/schema, solarflare://contexts/{id}, and solarflare://views/{view}. Resource templates must remain tenant-scoped and validate every expanded identifier.
Resources should communicate content type, temporal status, source, and cache behavior. Sensitive data should not be embedded in discovery metadata.
Bind MCP identity to SolarflareDB policy
The MCP host or transport authenticates the user or service. The server exchanges that identity for a narrowly scoped SolarflareDB credential or performs requests server-side. Tool arguments may narrow an allowed scope but cannot broaden it.
Return authorization-safe errors that do not reveal whether an inaccessible context item exists.
Production checklist
- Validate against the current MCP specification and official SDK version.
- Publish JSON Schemas with strict limits and descriptions.
- Require confirmation for durable writes where the host supports it.
- Set per-call result, traversal, payload, and token limits.
- Attach trace, principal, client, and request identity to every operation.
- Provide an MCP Inspector test collection and threat model.