{
  "markdown": "# Dev Context MCP Server\n\nDev Context MCP is a .NET 10 Model Context Protocol server that gives coding\nagents grounded, version-aware access to internal NuGet packages.\n\nIt indexes package metadata, README files, XML documentation, packaged text\nfiles, public .NET symbols, dependencies, and target frameworks. Agents can then\ndiscover libraries, select an indexed version, search package documentation,\ninspect real API signatures, and open the exact source material behind each\nanswer.\n\nCompany coding standards (architecture, naming, unit test templates) are provided\nas project Cursor skills under [`.cursor/skills/`](.cursor/skills/), not through\nthe MCP index.\n\nThe system never loads or executes package assemblies. Retrieval is served\nentirely from a local SQLite/FTS5 index.\n\n## Why This Project Exists\n\nCoding agents often know public libraries but lack reliable context for private\npackages, generated API clients, environment-specific builds, and company\nstandards. Dev Context MCP turns those sources into a small, deterministic MCP\nsurface:\n\n- Package discovery by exact ID or implementation concept.\n- Explicit environment and semantic-version selection.\n- Documentation search isolated to one package version.\n- Metadata-only lookup of public types and members.\n- Stable citations that can be opened as MCP resources.\n- Machine-readable `ok`, `not_found`, and `insufficient_evidence` outcomes.\n\nGenerated clients do not need special handling. If a client is published as a\nNuGet package with public assemblies and useful documentation, it follows the\nsame indexing and retrieval path as any other package.\n\n## How It Works\n\nIndex production and MCP retrieval are separate processes:\n\n```mermaid\nflowchart LR\n    Feeds[NuGet feeds or local package folders]\n    Indexer[DevContextMcp.Indexer]\n    Database[(SQLite and FTS5)]\n    Server[DevContextMcp.Server]\n    Client[MCP client or coding agent]\n    Skills[Cursor skills]\n\n    Feeds --> Indexer\n    Indexer -->|only writer| Database\n    Database -->|read only| Server\n    Client -->|stdio or Streamable HTTP| Server\n    Skills --> Client\n```\n\n1. The one-shot Indexer reads configured sources and package-policy files.\n2. It safely downloads or opens selected `.nupkg` files.\n3. It extracts metadata, documents, and symbols without executing package code.\n4. It atomically publishes changed content to SQLite and updates FTS5.\n5. The Server opens the same database read-only and exposes MCP tools and\n   resources.\n\nRun only one Indexer process against a database at a time. The Server can stay\nindependent of feeds and credentials because it never refreshes data itself.\n\n- [Product specification](design/spec.md)\n- [Solution architecture](design/architecture.md)\n\n> Solution was designed and implemented with Codex AI agent using specs and plans defined in [design folder](./design/).\n\n**Configuration:**\n- [Indexer Configuration](./docs/indexer-configuration.md) — how to set up NuGet indexing sources and package policies.\n- [Server Configuration](./docs/server-configuration.md) — how to configure transport (stdio or HTTP) and logging.\n\n## Demo\n\nRepository contains Demo Indexer data for [Demo Project](https://github.com/iJustHelp/dev-context-mcp-server-demo). The demo project design and implementation were AI-generated using DevContext MCP server. The [demo folder](./demo/) contains:\n\n**Demo Applications** — .NET applications that generate demo NuGet packages:\n- [Demo.Cities](./demo/nuget-apps/Demo.Cities/) — generates `prod` and `qa` versions of a sample NuGet package.\n- [OpenMeteo.Api.Client](./demo/nuget-apps/OpenMeteo.Client/) — OpenAPI-generated client library.\n\n**Demo Data** — source material for indexing:\n- [NuGets Repo](./demo/data/nuget-repos/) — contains `.nupkg` files organized by `prod` and `qa` feeds (paths defined in Indexer Configuration).\n- [Indexer](./demo/data/indexer/) — package policies for indexing.\n\n## Quick Start\n\n### Prerequisites\n\n- The .NET SDK selected by [`global.json`](global.json), currently .NET SDK\n  `10.0.301` with latest-patch roll-forward.\n- Internet access when restoring packages and when indexing the bundled public\n  NuGet example.\n\n### 1. Build and test\n\n```powershell\ndotnet build .\\DevContextMcp.slnx\ndotnet test .\\DevContextMcp.slnx\n```\n\n### 2. Build the local index\n\nThe checked-in Indexer configuration uses:\n\n- NuGet.org for `Formula.SimpleRepo`.\n- Local `prod` and `qa` feeds under `demo/data/nuget-repos`.\n- Package policies under `demo/data/indexer/nugets`.\n\nRun the Indexer:\n\n```powershell\ndotnet run --project .\\src\\DevContextMcp.Indexer\\DevContextMcp.Indexer.csproj\n```\n\nThe demo database is created at `database/docs.db`.\n> Re-running the command is safe. Content hashes prevent unchanged package data\n> from being rewritten, while index-run history records each execution.\n\n### 3. Start the MCP server\n\nRun the server:\n\n```powershell\ndotnet run --project .\\src\\DevContextMcp.Server\\DevContextMcp.Server.csproj\n```\n\nThe checked-in development configuration starts stateless Streamable HTTP at:\n\n```text\nhttp://127.0.0.1:2222/mcp\n```\nHTTP is deliberately restricted to an unauthenticated loopback `http://`\naddress. It is suitable for local development, not shared-network deployment.\nLogs are written to standard error and to the configured Serilog file sink.\n\n### 4. Connect MCP Inspector\n\nFor the default HTTP configuration, start the Server and then run:\n\n```powershell\nnpx -y @modelcontextprotocol/inspector\n```\n\nChoose **Streamable HTTP** and connect to\n`http://127.0.0.1:2222/mcp`.\n\nTry this workflow after connecting:\n\n1. Call `resolve_library` with `Demo.Cities`.\n2. Pass a returned ID such as `nuget:prod/Demo.Cities` to `list_versions`.\n3. Call `query_docs` or `get_symbol` with the selected version.\n4. Open a returned `nuget://` citation under Resources.\n\n## MCP Surface\n\n### Tools\n\n| Tool | Purpose | Important inputs |\n| --- | --- | --- |\n| `resolve_library` | Finds indexed NuGet packages by ID, name, or concept. | `query`, `environment`, `includePrerelease`, `limit` |\n| `list_versions` | Lists indexed package versions and identifies the recommended version. | `libraryId`, `includePrerelease` |\n| `query_docs` | Searches version-scoped package evidence. | `libraryId`, `question`, `version`, `projectVersion`, `targetFramework`, `maxResults` |\n| `get_symbol` | Finds a public type or member and returns its indexed signature and XML documentation. | `libraryId`, `symbol`, `version`, `projectVersion`, `targetFramework` |\n\n`get_symbol` accepts fully qualified, simple, or partial names. If a lookup is\nambiguous, it returns bounded candidates instead of silently choosing one.\n\n### Library IDs\n\nDiscovery returns stable IDs:\n\n```text\nnuget:prod/Demo.Cities\nnuget:qa/Demo.Cities\n```\n\nAn environment-qualified NuGet ID never falls back to another environment.\nLegacy IDs such as `nuget:Demo.Cities` use the configured environment and\nsource order.\n\nLibrary IDs must use the `nuget:` prefix. Legacy `docs:` IDs are not supported.\n\n### Resources and citations\n\nSuccessful `query_docs` and `get_symbol` responses return ordered `data`\nfragments and symbols, each with a `citationUri`. Those URIs point to read-only\nMCP resources:\n\n```text\nnuget://{source}/{packageId}/{version}/artifact/{path}\nnuget://{source}/{packageId}/{version}/symbol/{qualifiedName}\n```\n\nOpening a resource reads the exact indexed artifact or symbol. The Server does\nnot contact a NuGet feed during retrieval.\n\n## Version Selection\n\nFor `query_docs` and `get_symbol`, one version is selected in this order:\n\n1. Exact `version` from the tool request.\n2. Exact `projectVersion` supplied as calling-project context.\n3. Environment-qualified version selection entry.\n4. Package-wide version selection entry.\n5. Latest indexed, listed stable version.\n6. Latest indexed, listed prerelease when prereleases are allowed.\n\nThe selected version must already be in the local index. Evidence from\ndifferent package versions is never combined.\n\n**Example:** If `Demo.Cities` has indexed versions `1.0.0`, `1.1.0` (stable), and `2.0.0-beta` (prerelease):\n- A tool request with `version: \"1.0.0\"` uses `1.0.0`.\n- No explicit version and latest stable returns `1.1.0`.\n- If `includePrerelease: true` and no explicit version, returns `2.0.0-beta`.\n\n## Indexed Content and Safety\n\nFor each selected NuGet version, the Indexer stores:\n\n- Package identity, title, description, authors, tags, URLs, and publication\n  state.\n- Dependencies and target frameworks.\n- Markdown, text, and XML documentation.\n- Public symbols from assemblies under `ref/` and `lib/`.\n- Content hashes, searchable document chunks, and run diagnostics.\n\nPackage archives are treated as untrusted input. Processing enforces package\nsize, document size, archive entry count, extracted-size, and compression-ratio\nlimits. Paths are validated against traversal, and assemblies are inspected\nthrough metadata APIs rather than loaded into the runtime.\n\nSQLite publication is transactional. A failed package refresh preserves the\nlast successfully indexed data. The Server applies query timeouts, result\nlimits, response budgets, and citation-safe URI encoding.\n\nDo not put feed credentials or API tokens in package-policy files or the\nchecked-in settings. Source authentication is intentionally isolated behind an\ninfrastructure interface for future approved credential providers.\n\n## Further Reading\n\n- [Product specification](design/spec.md)\n- [Solution architecture](design/architecture.md)\n- [Stage plans](design/stages)\n- [Test plan](design/test-plan.md)\n\nThe design documents contain historical stage context. This README describes\nthe current repository and its end-to-end operating model.\n",
  "bytes": 9673,
  "sha": "1575c5692a847398abd08e2b26cce255d9522b55e7ab58882806c09e3abd3871",
  "repo_slug": "ijusthelp/dev-context-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/okf_ijusthelp_dev_context_mcp_server_okf_ind_88d619e4/readme"
}