Protect your MCP (Model Context Protocol) servers with ACSP Verify authentication. One line of code to verify every connecting agent.
npm install @neiracore/mcp
Add the middleware to your MCP server. All connecting agents will be verified against ACSP before gaining access to your tools and resources.
import { McpServer } from "@modelcontextprotocol/sdk/server"
import { acspAuth } from "@neiracore/mcp"
const server = new McpServer({ name: "my-server" })
// One line — agents with trust score below 70 are rejected
server.use(acspAuth({
apiKey: process.env.NEIRACORE_API_KEY,
minTrust: 70,
}))
// Your tools and resources are now protected
server.tool("research", { query: "string" }, async ({ query }) => {
// Only verified agents with trust >= 70 reach here
return { result: await doResearch(query) }
})| Option | Type | Default | Description |
|---|---|---|---|
| apiKey | string | required | Your ACSP Verify API key |
| minTrust | number | 50 | Minimum trust score to allow access (0-100) |
| allowUnverified | boolean | false | Allow agents without an AID (not recommended) |
| onReject | function | — | Custom handler for rejected agents |
| cache | boolean | true | Cache verification results (TTL: 5min) |
The agent includes its AID in the connection headers.
ACSP Verify checks the cryptographic identity and returns the trust score.
Agents meeting your trust threshold get access. Others are rejected with a clear error.