Use AI Tools with Essential C#
Connect GitHub Copilot, Claude, Cursor, or any MCP-compatible AI client directly to the Essential C# book content. Search chapters by concept or browse the full table of contents — right from your editor.
Sign in to get a token → Setup guide ↓Setup Guide
Three steps to connect any MCP-compatible client.
Step 1 — Create an account
Register or sign in to your Essential C# account.
Step 2 — Generate a token
Go to MCP Access under your account settings. Enter a name for the token (e.g. "VS Code"), keep the default 6-month expiry or choose an earlier date, and click Create Token. Copy the token — it won't be shown again.
Step 3 — Configure your client
Add to your VS Code user mcp.json so the server is available across all workspaces.
Open it via Ctrl+Shift+P → MCP: Open User Configuration:
- Windows:
%APPDATA%\Code\User\mcp.json - macOS:
~/Library/Application Support/Code/User/mcp.json - Linux:
~/.config/Code/User/mcp.json
{
"inputs": [
{
"type": "promptString",
"id": "ecs-token",
"description": "Essential C# MCP token (from essentialcsharp.com)",
"password": true
}
],
"servers": {
"essentialcsharp": {
"type": "http",
"url": "https://essentialcsharp.com/mcp",
"headers": {
"Authorization": "Bearer ${input:ecs-token}"
}
}
}
}
VS Code will prompt you to enter your token once and store it securely — it's never written
to disk in plain text.
To scope to a single workspace instead, add the same servers block (without the outer
mcp wrapper) to .vscode/mcp.json in your project root.
Add to ~/.copilot/mcp-config.json (create the file if it doesn't exist)
to make the server available in every Copilot CLI session:
{
"mcpServers": {
"essentialcsharp": {
"type": "http",
"url": "https://essentialcsharp.com/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
Replace <your-token> with the token you created in Step 2.
To scope to a single project instead, add the same config to .mcp.json
in your project root.
Edit your Claude Desktop config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"essentialcsharp": {
"url": "https://essentialcsharp.com/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
Replace <your-token> with the token you created in Step 2.
If your version of Claude Desktop doesn't support remote MCP yet, use
npx -y mcp-remote https://essentialcsharp.com/mcp with the
MCP_REMOTE_HEADER_AUTHORIZATION env var set to your Bearer token.
Run this command once to register the server for all your projects:
claude mcp add --transport http essentialcsharp https://essentialcsharp.com/mcp \
--scope user \
--header "Authorization: Bearer <your-token>"
Replace <your-token> with the token you created in Step 2.
Omit --scope user to limit to the current project only, or use
--scope project to commit the server to .mcp.json for your team.
Add to ~/.cursor/mcp.json to make the server available in all Cursor workspaces
(create the file if it doesn't exist):
{
"mcpServers": {
"essentialcsharp": {
"url": "https://essentialcsharp.com/mcp",
"headers": {
"Authorization": "Bearer <your-token>"
}
}
}
}
Replace <your-token> with the token you created in Step 2.
To scope to a single project instead, use .cursor/mcp.json in your project root.
Available Tools
Once connected, your AI client has access to 15 tools:
▸ check_topic_coverage Check Topic Coverage
Determine whether and how thoroughly the Essential C# book covers a given topic. Returns a coverage assessment: 'Comprehensive', 'Mentioned', or 'Not found in headings'. Use this before citing the book to calibrate confidence.
-
topic - The C# topic, feature, or concept to check (e.g., 'source generators', 'records', 'LINQ').
▸ find_book_help_for_diagnostic Find Book Help For Diagnostic
Find Essential C# book sections, content, and coding guidelines that help explain a C# compiler error, warning, or runtime exception. Accepts a CS diagnostic code (e.g., 'CS8600') or a plain description (e.g., 'null reference exception', 'cannot implicitly convert'). Returns relevant sections, explanatory prose, and related guidelines.
-
diagnostic - A C# compiler diagnostic code (e.g., 'CS8600', 'CS0029') or a plain error description (e.g., 'null reference exception', 'async method lacks await').
▸ find_related_sections Find Related Sections
Find other sections in the Essential C# book that are semantically related to a given section. Uses the section heading as a search query to discover thematically connected content across the entire book. Requires AI services to be configured.
-
sectionKey - The section slug/key to find related content for (e.g., 'async-await'). Use GetChapterSections to get valid slugs.
-
maxResults(optional) - Number of related sections to return (1–10).
▸ get_c_sharp_guidelines Get C# Guidelines
Retrieve C# coding guidelines from the Essential C# book. Filter by keyword (case-insensitive substring match), chapter number, or guideline type. Use the 'topic' parameter for relevance-ranked discovery by concept (e.g., 'exception handling', 'naming', 'async'). Each guideline includes its chapter and subsection context. Tip: use 'topic' for broad discovery; use 'keyword' for precise substring matching.
-
keyword(optional) - Optional keyword for case-insensitive substring search in guideline text and subsection name.
-
chapter(optional) - Optional chapter number to restrict results to a specific chapter.
-
type(optional) - Optional guideline type: 'do', 'consider', 'avoid', or 'donot' (also accepts 'do not', 'dont').
-
topic(optional) - Optional topic or concept for relevance-ranked search (e.g., 'exception handling', 'naming', 'async'). Results are ordered by relevance. Use for broad discovery; use 'keyword' for substring text matching.
-
maxResults(optional) - Maximum number of guidelines to return (1–50).
▸ get_chapter_list Get Chapter List
Get the table of contents for the Essential C# book, listing all chapters and their sections with navigation links.
▸ get_chapter_sections Get Chapter Sections
Get all sections and subsections in a specific chapter of the Essential C# book, in reading order. Returns each section's heading, slug, anchor link, and indent level. Use the returned slugs with other tools like GetSectionContent or GetNavigationContext.
-
chapter - The chapter number (e.g., 5 for Chapter 5).
▸ get_chapter_summary Get Chapter Summary
Get a structural overview of a book chapter: its top-level section headings in reading order, and the coding guidelines associated with that chapter. Useful for understanding what a chapter covers before diving in.
-
chapter - The chapter number (e.g., 5 for Chapter 5).
▸ get_direct_content_url Get Direct Content URL
Get the canonical deep-link URL and section metadata for a specific book section or subsection. Use this to include precise references in responses.
-
sectionKey - The section slug/key (e.g., 'hello-world'). Use GetChapterSections or GetChapterList to find valid slugs.
▸ get_listing_source_code Get Listing Source Code
Retrieve the complete source code for a specific numbered listing from the Essential C# book. Example: chapter=5, listing=3 retrieves Listing 5.3. Returns the code and its file type.
-
chapter - The chapter number containing the listing (e.g., 5 for Chapter 5).
-
listing - The listing number within the chapter (e.g., 3 for Listing 5.3).
▸ get_listing_with_context Get Listing With Context
Retrieve a specific book listing's source code together with the semantic book content that explains it. Combines code from GetListingSourceCode with related explanatory text found via search. Ideal for understanding what a listing demonstrates.
-
chapter - The chapter number of the listing.
-
listing - The listing number (e.g., 3 for Listing 5.3).
▸ get_navigation_context Get Navigation Context
Get the navigation context for a book section: its breadcrumb path, the previous and next sections, its parent section, and its sibling sections. Useful for understanding where a section sits in the book's structure.
-
sectionKey - The section slug/key (e.g., 'hello-world'). Use GetChapterSections to get valid slugs.
▸ get_section_content Get Section Content
Retrieve the prose content of a specific book section identified by its slug/key (e.g., 'hello-world', 'creating-editing-compiling-and-running-c-source-code'). Returns the section text with code examples preserved. Use GetChapterSections to discover available slugs.
-
sectionKey - The section slug/key (e.g., 'hello-world'). Use GetChapterSections to get valid slugs.
-
maxChars(optional) - Maximum number of characters to return (500–8000). Long sections are truncated.
▸ lookup_concept Lookup Concept
Find all sections in the Essential C# book that cover a specific C# concept. Combines section heading search with semantic vector search (when available) to give broad coverage. Returns section slugs, chapter numbers, and direct links.
-
concept - The C# concept, feature, or topic to find in the book (e.g., 'LINQ', 'async/await', 'pattern matching', 'generics').
-
maxResults(optional) - Number of semantic search results to return (1–10).
▸ search_book_content Search Book Content
Search the Essential C# book content using semantic vector search. Returns relevant text chunks with chapter and heading context. Use this to find information about C# programming concepts covered in the book.
-
query - The search query describing the C# concept or topic to find in the book.
-
maxResults(optional) - Number of results to return (1–10). Use a higher value for broad topics or comprehensive research; lower for quick lookups.
▸ search_listings_by_code Search Listings By Code
Search all code listings in the Essential C# book for a specific code pattern, keyword, or identifier. Searches actual C# source code (not prose). Useful for finding examples of Task.WhenAll, yield return, IDisposable, pattern matching, and similar code constructs.
-
pattern - The code pattern or keyword to search for in listing source code (case-insensitive substring match).
-
maxResults(optional) - Maximum number of matching listings to return (1–20).
Troubleshooting & FAQ
- Make sure you've included the
Authorization: Bearer mcp_...header in your client config. - Check that the token hasn't been revoked or expired on the MCP Access page.
- Token values are case-sensitive — copy/paste carefully.
- The token must start with
mcp_. Tokens from other systems (e.g. GitHub tokens) won't work.
Yes — create a dedicated token for each client. For example: one token named "VS Code", a separate one named "Claude Desktop", and so on. This way, if a token is ever compromised or you stop using a particular client, you can revoke just that token without disrupting your other tools. Tokens are free and easy to create, so there's no reason to share them.
Token values are stored as a one-way hash and cannot be recovered. Revoke the old token on the MCP Access page and create a new one.
The Model Context Protocol (MCP) is an open standard that lets AI assistants call external tools and data sources in a structured, secure way. It's supported by GitHub Copilot, Claude, Cursor, and many other AI coding tools. This site exposes its book content as an MCP server so AI assistants can answer C# questions with accurate, up-to-date content from the book.