Naive Context Protocol
This is a single-page spec for solving the context problem for large language models.
Why?
I realize this is a competing standard to Model Context Protocol, but after spending many hours implementing "simple" MCP servers and following the development of the protocol, I think MCP sucks, so I started making NCP everything I believe, MCP should've been.
Feedback & contribution welcome (see tasks at the bottom).
Goals:
- Simple to implement
- Use existing standards and best practices
- Hostable on a basic HTTP server
- Community driven
Even if this spec makes the original MCP spec a bit simpler then, I'd consider it a win, but for now, we're in this situation:
Spec
- Use OpenAPI for tool discovery (by default hosted on
/.well-known/ncp-tools.json
but can be configured on the client) - Use JSON Schema for tool definition (With OpenAPI)
- Use HTTP for tool calling
- Use OpenAPI for defining Authorization
ncp-tools.json
is an OpenAPI specification for the tools that are available on this server
and how to call them.
Resources
Within the ncp-tools.json
, use OpenAPI tags:
resource_list
to annotate the endpoint for listing resourcesresource_read
to annotate the endpoint for fetching the resource
Prompts
Within the ncp-tools.json
use OpenAPI tags:
prompt_list
to annotate the endpoint for listing promptsprompt_read
to annotate the endpoint for fetching the prompt
Contribution
Please create a pull request.
Tasks:
- Define the input & output for resource endpoints
- Define the input & output for the prompt endpoints
- Add examples to the spec
- Explain the advantages
- Add a section for real-time communication
- Make an example server (hosted)
- Make an MCP server that uses NCP behind the scene to make adoption easier
- Expand on the Authorization
- Create a reference implementation (if needed)